커뮤니티
죄송,, 잘 않되네요
2012-12-27 18:55:09
241
글번호 57649
이번엔 반대로 모멘텀으로 10계약 매도 한후 1포인트 하락할때 마다 팔려고하는데
예를 들어 3계약 매도청산후 다시 상승할때 매도 청산을 해야는데 잘 않되네요
손좀 봐주세요
If MarketPosition == -1 Then{
ExitShort("Sx1",AtLimit,EntryPrice-1,"",1,1);
ExitShort("Sx2",AtLimit,EntryPrice-2,"",1,1);
ExitShort("Sx3",AtLimit,EntryPrice-3,"",1,1);
ExitShort("Sx4",AtLimit,EntryPrice-4,"",1,1);
ExitShort("Sx5",AtLimit,EntryPrice-5,"",1,1);
ExitShort("Sx6",AtLimit,EntryPrice-6,"",1,1);
ExitShort("Sx7",AtLimit,EntryPrice-7,"",1,1);
ExitShort("Sx8",AtLimit,EntryPrice-8,"",1,1);
ExitShort("Sx9",AtLimit,EntryPrice-9,"",1,1);
ExitShort("Sx10",AtLimit,EntryPrice-10,"",1,1);
if CurrentContracts == 9 Then
ExitLong("x1",AtStop,(EntryPrice-0.5)+1);
if CurrentContracts == 8 Then
ExitLong("x2",AtStop,(EntryPrice-1)+1);
if CurrentContracts == 7 Then
ExitLong("x3",AtStop,(EntryPrice-1.5)+1);
if CurrentContracts == 6 Then
ExitLong("x4",AtStop,(EntryPrice-2)+1);
if CurrentContracts == 5 Then
ExitLong("x5",AtStop,(EntryPrice-2.5)+1);
if CurrentContracts == 4 Then
ExitLong("x6",AtStop,(EntryPrice-3)+1);
if CurrentContracts == 3 Then
ExitLong("x7",AtStop,(EntryPrice-4)+1);
if CurrentContracts == 2 Then
ExitLong("x8",AtStop,(EntryPrice-6)+1);
if CurrentContracts ==1 Then
ExitLong("x9",AtStop,(EntryPrice-8)+1);
}
답변 1
예스스탁 예스스탁 답변
2012-12-28 10:10:09
안녕하세요
예스스탁입니다.
수정한 식입니다.
If MarketPosition == -1 Then{
ExitShort("Sx1",AtLimit,EntryPrice-1,"",1,1);
ExitShort("Sx2",AtLimit,EntryPrice-2,"",1,1);
ExitShort("Sx3",AtLimit,EntryPrice-3,"",1,1);
ExitShort("Sx4",AtLimit,EntryPrice-4,"",1,1);
ExitShort("Sx5",AtLimit,EntryPrice-5,"",1,1);
ExitShort("Sx6",AtLimit,EntryPrice-6,"",1,1);
ExitShort("Sx7",AtLimit,EntryPrice-7,"",1,1);
ExitShort("Sx8",AtLimit,EntryPrice-8,"",1,1);
ExitShort("Sx9",AtLimit,EntryPrice-9,"",1,1);
ExitShort("Sx10",AtLimit,EntryPrice-10,"",1,1);
if CurrentContracts == 9 Then
ExitShort("xs1",AtStop,(EntryPrice-1)+1);
if CurrentContracts == 8 Then
ExitShort("xs2",AtStop,(EntryPrice-2)+1);
if CurrentContracts == 7 Then
ExitShort("xs3",AtStop,(EntryPrice-3)+1);
if CurrentContracts == 6 Then
ExitShort("xs4",AtStop,(EntryPrice-4)+1);
if CurrentContracts == 5 Then
ExitShort("xs5",AtStop,(EntryPrice-5)+1);
if CurrentContracts == 4 Then
ExitShort("xs6",AtStop,(EntryPrice-6)+1);
if CurrentContracts == 3 Then
ExitShort("xs7",AtStop,(EntryPrice-7)+1);
if CurrentContracts == 2 Then
ExitShort("xs8",AtStop,(EntryPrice-8)+1);
if CurrentContracts ==1 Then
ExitShort("xs9",AtStop,(EntryPrice-9)+1);
}
즐거운 하루되세요
> 구다이전설 님이 쓴 글입니다.
> 제목 : 죄송,, 잘 않되네요
>
이번엔 반대로 모멘텀으로 10계약 매도 한후 1포인트 하락할때 마다 팔려고하는데
예를 들어 3계약 매도청산후 다시 상승할때 매도 청산을 해야는데 잘 않되네요
손좀 봐주세요
If MarketPosition == -1 Then{
ExitShort("Sx1",AtLimit,EntryPrice-1,"",1,1);
ExitShort("Sx2",AtLimit,EntryPrice-2,"",1,1);
ExitShort("Sx3",AtLimit,EntryPrice-3,"",1,1);
ExitShort("Sx4",AtLimit,EntryPrice-4,"",1,1);
ExitShort("Sx5",AtLimit,EntryPrice-5,"",1,1);
ExitShort("Sx6",AtLimit,EntryPrice-6,"",1,1);
ExitShort("Sx7",AtLimit,EntryPrice-7,"",1,1);
ExitShort("Sx8",AtLimit,EntryPrice-8,"",1,1);
ExitShort("Sx9",AtLimit,EntryPrice-9,"",1,1);
ExitShort("Sx10",AtLimit,EntryPrice-10,"",1,1);
if CurrentContracts == 9 Then
ExitLong("x1",AtStop,(EntryPrice-0.5)+1);
if CurrentContracts == 8 Then
ExitLong("x2",AtStop,(EntryPrice-1)+1);
if CurrentContracts == 7 Then
ExitLong("x3",AtStop,(EntryPrice-1.5)+1);
if CurrentContracts == 6 Then
ExitLong("x4",AtStop,(EntryPrice-2)+1);
if CurrentContracts == 5 Then
ExitLong("x5",AtStop,(EntryPrice-2.5)+1);
if CurrentContracts == 4 Then
ExitLong("x6",AtStop,(EntryPrice-3)+1);
if CurrentContracts == 3 Then
ExitLong("x7",AtStop,(EntryPrice-4)+1);
if CurrentContracts == 2 Then
ExitLong("x8",AtStop,(EntryPrice-6)+1);
if CurrentContracts ==1 Then
ExitLong("x9",AtStop,(EntryPrice-8)+1);
}
다음글
이전글