커뮤니티
문의 드립니다
2017-02-23 10:37:52
111
글번호 107163
답변대로 했는데 잘 안되네요. 부탁드립니다.
1.고점대비 2.2pt 하락시 and 20이평 하향이탈시 청산
#청산
if MarketPosition()==1 Then {
ExitLong("bp1",AtLimit,EntryPrice+2.5,"",1,1);
ExitLong("bp2",AtLimit,EntryPrice+4.0,"",1,1);
ExitLong("bp3",AtLimit,EntryPrice+5.5,"",1,1);
ExitLong("bp4",AtLimit,EntryPrice+7.0,"",1,1);
ExitLong("bx1",AtStop,Highest(H,BarsSinceEntry)-2.2);
}
if MarketPosition()==-1 Then {
ExitShort("sp1",AtLimit,EntryPrice-2.5,"",1,1);
ExitShort("sp2",AtLimit,EntryPrice-4.0,"",1,1);
ExitShort("sp3",AtLimit,EntryPrice-5.5,"",1,1);
ExitShort("sp4",AtLimit,EntryPrice-7.0,"",1,1);
ExitShort("sx1",AtStop,Lowest(L,BarsSinceEntry)+2.2);
}
2. No.52073에 재문의 드렸습니다.
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
부탁드립니다. 꾸벅~
답변 1
예스스탁 예스스탁 답변
2017-02-23 14:39:57
안녕하세요
예스스탁입니다.
1.
#청산
if MarketPosition()==1 Then {
ExitLong("bp1",AtLimit,EntryPrice+2.5,"",1,1);
ExitLong("bp2",AtLimit,EntryPrice+4.0,"",1,1);
ExitLong("bp3",AtLimit,EntryPrice+5.5,"",1,1);
ExitLong("bp4",AtLimit,EntryPrice+7.0,"",1,1);
ExitLong("bx1",AtStop,Highest(H,BarsSinceEntry)-2.2);
if C <= highest(H,BarsSinceEntry)-2.2 and CrossDown(c,ma(c,20)) Then
exitlong("bx2");
}
if MarketPosition()==-1 Then {
ExitShort("sp1",AtLimit,EntryPrice-2.5,"",1,1);
ExitShort("sp2",AtLimit,EntryPrice-4.0,"",1,1);
ExitShort("sp3",AtLimit,EntryPrice-5.5,"",1,1);
ExitShort("sp4",AtLimit,EntryPrice-7.0,"",1,1);
ExitShort("sx1",AtStop,Lowest(L,BarsSinceEntry)+2.2);
if C >= Lowest(L,BarsSinceEntry)+2.2 and Crossup(c,ma(c,20)) Then
ExitShort("sx2");
}
2.
if CrossDown(Close,Sma3) and (Condition15 and Condition16) == True and
(Condition17 == False or (Condition17 == True and abs(선행스팬1-선행스팬2) <= 0.8)) == true and MarketPosition == 0 Then
Sell();
#2
if CrossDown(Close,Sma3) and Condition18 == True and MarketPosition == 0 Then
Sell();
즐거운 하루되세요
> 천리포 님이 쓴 글입니다.
> 제목 : 문의 드립니다
> 답변대로 했는데 잘 안되네요. 부탁드립니다.
1.고점대비 2.2pt 하락시 and 20이평 하향이탈시 청산
#청산
if MarketPosition()==1 Then {
ExitLong("bp1",AtLimit,EntryPrice+2.5,"",1,1);
ExitLong("bp2",AtLimit,EntryPrice+4.0,"",1,1);
ExitLong("bp3",AtLimit,EntryPrice+5.5,"",1,1);
ExitLong("bp4",AtLimit,EntryPrice+7.0,"",1,1);
ExitLong("bx1",AtStop,Highest(H,BarsSinceEntry)-2.2);
}
if MarketPosition()==-1 Then {
ExitShort("sp1",AtLimit,EntryPrice-2.5,"",1,1);
ExitShort("sp2",AtLimit,EntryPrice-4.0,"",1,1);
ExitShort("sp3",AtLimit,EntryPrice-5.5,"",1,1);
ExitShort("sp4",AtLimit,EntryPrice-7.0,"",1,1);
ExitShort("sx1",AtStop,Lowest(L,BarsSinceEntry)+2.2);
}
2. No.52073에 재문의 드렸습니다.
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
부탁드립니다. 꾸벅~