커뮤니티
문의드립니다.
2011-10-26 13:51:47
402
글번호 44112
피라미딩 적용된 상태에서 분할 진입한 상태에서요.
SetStopTrailing(50,1,PercentStop);
SetStopTrailing(25,2,PercentStop);
이렇게 2개를 적용시키려는데요.
즉, 수익이 좀 더커지면 Trailing 범위를 줄이는 겁니다.
setsop이 2개 동시에 적용이 안되는데...
어떤 방법으로 구현할 수 있을 까요?
답변 1
예스스탁 예스스탁 답변
2011-10-26 15:31:03
안녕하세요
예스스탁입니다.
강제청산을 여러번 설정하는 내용이시면
풀어서 작성하셔야 합니다.
if MarketPosition == 1 Then{
if highest(H,BarsSinceEntry) >= EntryPrice*1.01 and highest(H,BarsSinceEntry) < EntryPrice*1.02 Then
exitlong("bx1",AtStop,Highest(H,BarsSinceEntry)-(highest(H,BarsSinceEntry)-EntryPrice)*0.5);
if highest(H,BarsSinceEntry) >= EntryPrice*1.02 Then
exitlong("bx2",AtStop,Highest(H,BarsSinceEntry)-(highest(H,BarsSinceEntry)-EntryPrice)*0.25);
}
if MarketPosition == -1 Then{
if Lowest(L,BarsSinceEntry) <= EntryPrice*0.99 and Lowest(L,BarsSinceEntry) > EntryPrice*0.98 Then
ExitShort("sx1",AtStop,Lowest(L,BarsSinceEntry)+(EntryPrice-Lowest(L,BarsSinceEntry))*0.5);
if Lowest(L,BarsSinceEntry) <= EntryPrice*0.98 Then
ExitShort("sx2",AtStop,Lowest(L,BarsSinceEntry)+(EntryPrice-Lowest(L,BarsSinceEntry))*0.25);
}
즐거운 하루되세요
> 한걸음씩 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 피라미딩 적용된 상태에서 분할 진입한 상태에서요.
SetStopTrailing(50,1,PercentStop);
SetStopTrailing(25,2,PercentStop);
이렇게 2개를 적용시키려는데요.
즉, 수익이 좀 더커지면 Trailing 범위를 줄이는 겁니다.
setsop이 2개 동시에 적용이 안되는데...
어떤 방법으로 구현할 수 있을 까요?
다음글