커뮤니티
문의드립니다.
2011-03-02 12:09:41
626
글번호 36193
안녕하세요.
아래식은 선물리버셜 매매전략식입니다.
일괄진입에 따른 분할청산 하고자 문의드립니다.
1)진입수량 = 15 계약(일괄진입)
2)분할청산 = ATR(N)*LEN1 여기서 ATR 배수값(LEN1)을 3 부터 10 까지 0.5 씩
증가시켜 1계약씩 15번에 걸처 분할청산 하고자 합니다.
감사합니다.
=========================================================================
//진입
if stime < 150000 then {
if CurrentEntryNum < var10 + tcount and Condition1 == false and MarketPosition <> 1 Then
buy("매수", atstop, dayOpen(0)+var1*len);
if CurrentEntryNum < var10 + tcount and Condition2 == false and MarketPosition <> -1 Then
sell("매도", atstop, dayOpen(0)-var1*len);
}
//청산
If marketposition == 1 Then {
exitlong("매수청산",Atstop,highest(high,barssinceentry+1)-atr(n)*len1);
}
if MarketPosition == -1 then{
exitshort("매도청산",Atstop,lowest(low,barssinceentry+1)+atr(n)*len1);
}
끝.
답변 1
예스스탁 예스스탁 답변
2011-03-02 14:12:09
안녕하세요
예스스타깅ㅂ니다.
if stime < 150000 then {
if CurrentEntryNum < var10 + tcount and Condition1 == false and MarketPosition <> 1 Then
buy("매수", atstop, dayOpen(0)+var1*len,15);
if CurrentEntryNum < var10 + tcount and Condition2 == false and MarketPosition <> -1 Then
sell("매도", atstop, dayOpen(0)-var1*len,15);
}
//청산
If marketposition == 1 Then {
exitlong("매수청산1",Atstop,highest(high,barssinceentry+1)-atr(n)*3.0,"",1,1);
exitlong("매수청산2",Atstop,highest(high,barssinceentry+1)-atr(n)*3.5,"",1,1);
exitlong("매수청산3",Atstop,highest(high,barssinceentry+1)-atr(n)*4.0,"",1,1);
exitlong("매수청산4",Atstop,highest(high,barssinceentry+1)-atr(n)*4.5,"",1,1);
exitlong("매수청산5",Atstop,highest(high,barssinceentry+1)-atr(n)*5.0,"",1,1);
exitlong("매수청산6",Atstop,highest(high,barssinceentry+1)-atr(n)*5.5,"",1,1);
exitlong("매수청산7",Atstop,highest(high,barssinceentry+1)-atr(n)*6.0,"",1,1);
exitlong("매수청산8",Atstop,highest(high,barssinceentry+1)-atr(n)*6.5,"",1,1);
exitlong("매수청산9",Atstop,highest(high,barssinceentry+1)-atr(n)*7.0,"",1,1);
exitlong("매수청산10",Atstop,highest(high,barssinceentry+1)-atr(n)*7.5,"",1,1);
exitlong("매수청산11",Atstop,highest(high,barssinceentry+1)-atr(n)*8.0,"",1,1);
exitlong("매수청산12",Atstop,highest(high,barssinceentry+1)-atr(n)*8.5,"",1,1);
exitlong("매수청산13",Atstop,highest(high,barssinceentry+1)-atr(n)*9.0,"",1,1);
exitlong("매수청산14",Atstop,highest(high,barssinceentry+1)-atr(n)*9.5,"",1,1);
exitlong("매수청산15",Atstop,highest(high,barssinceentry+1)-atr(n)*10.0,"",1,1);
}
if MarketPosition == -1 then{
exitshort("매도청산1",Atstop,lowest(low,barssinceentry+1)+atr(n)*3.0,"",1,1);
exitshort("매도청산2",Atstop,lowest(low,barssinceentry+1)+atr(n)*3.5,"",1,1);
exitshort("매도청산3",Atstop,lowest(low,barssinceentry+1)+atr(n)*4.0,"",1,1);
exitshort("매도청산4",Atstop,lowest(low,barssinceentry+1)+atr(n)*4.5,"",1,1);
exitshort("매도청산5",Atstop,lowest(low,barssinceentry+1)+atr(n)*5.0,"",1,1);
exitshort("매도청산6",Atstop,lowest(low,barssinceentry+1)+atr(n)*5.5,"",1,1);
exitshort("매도청산7",Atstop,lowest(low,barssinceentry+1)+atr(n)*6.0,"",1,1);
exitshort("매도청산8",Atstop,lowest(low,barssinceentry+1)+atr(n)*6.5,"",1,1);
exitshort("매도청산9",Atstop,lowest(low,barssinceentry+1)+atr(n)*7.0,"",1,1);
exitshort("매도청산10",Atstop,lowest(low,barssinceentry+1)+atr(n)*7.5,"",1,1);
exitshort("매도청산11",Atstop,lowest(low,barssinceentry+1)+atr(n)*8.0,"",1,1);
exitshort("매도청산12",Atstop,lowest(low,barssinceentry+1)+atr(n)*8.5,"",1,1);
exitshort("매도청산13",Atstop,lowest(low,barssinceentry+1)+atr(n)*9.0,"",1,1);
exitshort("매도청산14",Atstop,lowest(low,barssinceentry+1)+atr(n)*9.5,"",1,1);
exitshort("매도청산15",Atstop,lowest(low,barssinceentry+1)+atr(n)*10.0,"",1,1);
}
즐거운 하루되세요
> 베드로 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 안녕하세요.
아래식은 선물리버셜 매매전략식입니다.
일괄진입에 따른 분할청산 하고자 문의드립니다.
1)진입수량 = 15 계약(일괄진입)
2)분할청산 = ATR(N)*LEN1 여기서 ATR 배수값(LEN1)을 3 부터 10 까지 0.5 씩
증가시켜 1계약씩 15번에 걸처 분할청산 하고자 합니다.
감사합니다.
=========================================================================
//진입
if stime < 150000 then {
if CurrentEntryNum < var10 + tcount and Condition1 == false and MarketPosition <> 1 Then
buy("매수", atstop, dayOpen(0)+var1*len);
if CurrentEntryNum < var10 + tcount and Condition2 == false and MarketPosition <> -1 Then
sell("매도", atstop, dayOpen(0)-var1*len);
}
//청산
If marketposition == 1 Then {
exitlong("매수청산",Atstop,highest(high,barssinceentry+1)-atr(n)*len1);
}
if MarketPosition == -1 then{
exitshort("매도청산",Atstop,lowest(low,barssinceentry+1)+atr(n)*len1);
}
끝.
다음글
이전글