예스스탁
예스스탁 답변
2025-07-31 13:25:20
안녕하세요
예스스탁입니다.
input : b1(116);
input : b1ls(1.5),b1tr(2.7),mi1(0.5),bg1(150);
input : b2(122);
input : b2ls(2),b2tr(3.6),mi2(0),bg2(0);
var : T1(0),entry(0),LL(0),EH(0);
if Bdate != Bdate[1] Then
{
T1 = TotalTrades;
}
if MarketPosition == 0 Then
entry = TotalTrades-T1;
Else
entry = (TotalTrades-T1)+1;
if MarketPosition == 0 and entry == 0 and C >= daylow+PriceScale*B1 Then
buy("b1");
if TotalTrades > TotalTrades[1] Then
LL = L;
if L < LL Then
LL = L;
if MarketPosition == 0 and
entry == 1 and
C >= LL+PriceScale*B2 and C[1] < LL+PriceScale*B2 and
c<dayopen-2.5 and
IsExitName("StopInactivity",1) == true Then
buy("b2");
if MarketPosition== 1 Then
{
if IsEntryName("b1") == true Then
{
SetStopLoss(b1ls,PointStop);
SetStopTrailing(b1tr,0,PointStop,1);
SetStopInactivity(mi1,bg1,PointStop);
}
Else if IsEntryName("b2") == true Then
{
SetStopLoss(b2ls,PointStop);
SetStopTrailing(b2tr,0,PointStop,1);
SetStopInactivity(mi2,bg2,PointStop);
}
Else
{
SetStopLoss(0);
SetStopTrailing(0,0);
SetStopInactivity(0,0);
}
}
즐거운 하루되세요
> 목마와숙녀 님이 쓴 글입니다.
> 제목 : 문의
> 하루 2번 거래하는 수식입니다.
두번째 b2 진입에 필터를 두고 싶습니다.
필터 내용입니다.
1) b1 진입이 SetStopInactivity로 청산되면 b2 진입에 필터가 작동됩니다.
2) b2 진입은 ( c<dayopen-2.5 and b2 진입조건) 이 경우에만 허용됩니다.
항상 고맙습니다.
***************************************************************************************
input : b1(116);
input : b1ls(1.5),b1tr(2.7),mi1(0.5),bg1(150);
input : b2(122);
input : b2ls(2),b2tr(3.6),mi2(0),bg2(0);
var : T1(0),entry(0),LL(0),EH(0);
if Bdate != Bdate[1] Then
T1 = TotalTrades;
if MarketPosition == 0 Then
entry = TotalTrades-T1;
Else
entry = (TotalTrades-T1)+1;
if MarketPosition == 0 and entry == 0 and C >= daylow+PriceScale*B1 Then
buy("b1");
if TotalTrades > TotalTrades[1] Then
LL = L;
if L < LL Then
LL = L;
if MarketPosition == 0 and entry == 1 and C >= LL+PriceScale*B2 and C[1] < LL+PriceScale*B2 Then
buy("b2");
if MarketPosition== 1 Then
{
if IsEntryName("b1") == true Then
{
SetStopLoss(b1ls,PointStop);
SetStopTrailing(b1tr,0,PointStop,1);
SetStopInactivity(mi1,bg1,PointStop);
}
Else if IsEntryName("b2") == true Then
{
SetStopLoss(b2ls,PointStop);
SetStopTrailing(b2tr,0,PointStop,1);
SetStopInactivity(mi2,bg2,PointStop);
}
Else
{
SetStopLoss(0);
SetStopTrailing(0,0);
SetStopInactivity(0,0);
}
}