커뮤니티
분할청산식
2009-03-05 12:26:11
812
글번호 20662
선물5분봉에서 골든크로스 매수, 데드크로스 매도할 때,
진입은 1계약씩 5분 간격으로 1개씩 총 3개 진입하고,
청산은 1P 수익이면 1개청산, 2P 수익이면 1개청산, 3P 수익이면 1개청산 하는 식입니다.
즉, 진입은 얼마의 시간간격으로 분할진입하고, 청산은 몇 포인트 수익기준으로 분할청산하는 식입니다.
별도의 손절은 없고 매수포지션에서 데드크로스 나오면 전량청산 후 매도합니다.
답변 1
예스스탁 예스스탁 답변
2009-03-05 15:56:59
안녕하세요
예스스탁입니다.
if crossup(ma(c,5),ma(c,20)) Then
buy("b1",OnClose,def,1);
if MarketPosition == 1 then{
if highest(CurrentEntries,BarsSinceEntry) < 3 Then{
if CurrentEntries == 1 and stime >= TimeToMinutes(EntryTime(0))+5 Then{
buy("b2",OnClose,def,1);
}
if CurrentEntries == 2 and stime >= TimeToMinutes(EntryTime(0))+10 Then{
buy("b3",OnClose,def,1);
}
}
if highest(CurrentEntries,BarsSinceEntry) >= 3 Then{
if CurrentContracts == 3 Then
exitlong("XL1",AtLimit,AvgEntryPrice+1,"",1,1);
if CurrentContracts == 2 Then
exitlong("XL2",AtLimit,AvgEntryPrice+2,"",1,1);
if CurrentContracts == 1 Then
exitlong("XL3",AtLimit,AvgEntryPrice+3,"",1,1);
}
}
if CrossDown(ma(c,5),ma(c,20)) Then
Sell("S1",OnClose,def,1);
if MarketPosition == -1 then{
if highest(CurrentEntries,BarsSinceEntry) < 3 then{
if CurrentEntries == 1 and stime >= TimeToMinutes(EntryTime(0))+5 Then{
Sell("S2",OnClose,def,1);
}
if CurrentEntries == 2 and stime >= TimeToMinutes(EntryTime(0))+10 Then{
Sell("S3",OnClose,def,1);
}
}
if highest(CurrentEntries,BarsSinceEntry) >= 3 Then{
if CurrentContracts == 3 Then
ExitShort("XS1",AtLimit,AvgEntryPrice-1,"",1,1);
if CurrentContracts == 2 Then
ExitShort("XS2",AtLimit,AvgEntryPrice-2,"",1,1);
if CurrentContracts == 1 Then
ExitShort("XS3",AtLimit,AvgEntryPrice-3,"",1,1);
}
}
즐거운 하루되세요
> joyful 님이 쓴 글입니다.
> 제목 : 분할청산식
> 선물5분봉에서 골든크로스 매수, 데드크로스 매도할 때,
진입은 1계약씩 5분 간격으로 1개씩 총 3개 진입하고,
청산은 1P 수익이면 1개청산, 2P 수익이면 1개청산, 3P 수익이면 1개청산 하는 식입니다.
즉, 진입은 얼마의 시간간격으로 분할진입하고, 청산은 몇 포인트 수익기준으로 분할청산하는 식입니다.
별도의 손절은 없고 매수포지션에서 데드크로스 나오면 전량청산 후 매도합니다.
다음글
이전글