커뮤니티
시스템식 문의
2012-09-17 01:03:41
413
글번호 54746
늘 감사드립니다.
- 1. 시스템식 2.zip (0.01 MB)
답변 2
예스스탁 예스스탁 답변
2012-09-17 14:42:51
안녕하세요
예스스탁입니다.
1. 수정한 식입니다.
if stime >= 92000 Then{
if K > 0 and K > CurrentContracts and K[1] >= 0 Then
buy("B",OnClose,def,abs(K)-CurrentContracts);
if Crossup(K,0) Then
buy("BB",OnClose,def,abs(K));
if MarketPosition == 1 and K < CurrentContracts and K >= 0 Then
ExitLong("bx",OnClose,def,"",abs(CurrentContracts-k),1);
if K < 0 and abs(K) > CurrentContracts and K[1] <= 0 Then
Sell("S",OnClose,def,abs(K)-CurrentContracts);
if CrossDown(K,0) Then
sell("SS",OnClose,def,abs(K));
if MarketPosition == -1 and abs(K) < CurrentContracts and K <= 0 Then
ExitShort("sx",OnClose,def,"",abs(CurrentContracts-abs(k)),1);
}
SetStopEndofday(150000);
2, K값이 2이상 변동시에만 청산
if stime >= 92000 Then{
if K > 0 and K > CurrentContracts and K[1] >= 0 Then
buy("B",OnClose,def,abs(K)-CurrentContracts);
if Crossup(K,0) Then
buy("BB",OnClose,def,abs(K));
if MarketPosition == 1 and K <= CurrentContracts-2 and K >= 0 Then
ExitLong("bx",OnClose,def,"",abs(CurrentContracts-k),1);
if K < 0 and abs(K) > CurrentContracts and K[1] <= 0 Then
Sell("S",OnClose,def,abs(K)-CurrentContracts);
if CrossDown(K,0) Then
sell("SS",OnClose,def,abs(K));
if MarketPosition == -1 and abs(K) <= CurrentContracts-2 and K <= 0 Then
ExitShort("sx",OnClose,def,"",abs(CurrentContracts-abs(k)),1);
}
SetStopEndofday(150000);
의도와 다른 부분 있으시면 다시 글 올려주시기 바랍니다.
즐거운 하루되세요
> 에구머니 님이 쓴 글입니다.
> 제목 : 시스템식 문의
> 늘 감사드립니다.
에구머니
2012-09-17 17:02:16
1번식은 괜찮아 보이는데, 2번식은 좀 더 수정이 필요해 보입니다.
문제되는 부분을 첨부파일로 올렸습니다.
감사합니다.
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 시스템식 문의
> 안녕하세요
예스스탁입니다.
1. 수정한 식입니다.
if stime >= 92000 Then{
if K > 0 and K > CurrentContracts and K[1] >= 0 Then
buy("B",OnClose,def,abs(K)-CurrentContracts);
if Crossup(K,0) Then
buy("BB",OnClose,def,abs(K));
if MarketPosition == 1 and K < CurrentContracts and K >= 0 Then
ExitLong("bx",OnClose,def,"",abs(CurrentContracts-k),1);
if K < 0 and abs(K) > CurrentContracts and K[1] <= 0 Then
Sell("S",OnClose,def,abs(K)-CurrentContracts);
if CrossDown(K,0) Then
sell("SS",OnClose,def,abs(K));
if MarketPosition == -1 and abs(K) < CurrentContracts and K <= 0 Then
ExitShort("sx",OnClose,def,"",abs(CurrentContracts-abs(k)),1);
}
SetStopEndofday(150000);
2, K값이 2이상 변동시에만 청산
if stime >= 92000 Then{
if K > 0 and K > CurrentContracts and K[1] >= 0 Then
buy("B",OnClose,def,abs(K)-CurrentContracts);
if Crossup(K,0) Then
buy("BB",OnClose,def,abs(K));
if MarketPosition == 1 and K <= CurrentContracts-2 and K >= 0 Then
ExitLong("bx",OnClose,def,"",abs(CurrentContracts-k),1);
if K < 0 and abs(K) > CurrentContracts and K[1] <= 0 Then
Sell("S",OnClose,def,abs(K)-CurrentContracts);
if CrossDown(K,0) Then
sell("SS",OnClose,def,abs(K));
if MarketPosition == -1 and abs(K) <= CurrentContracts-2 and K <= 0 Then
ExitShort("sx",OnClose,def,"",abs(CurrentContracts-abs(k)),1);
}
SetStopEndofday(150000);
의도와 다른 부분 있으시면 다시 글 올려주시기 바랍니다.
즐거운 하루되세요
> 에구머니 님이 쓴 글입니다.
> 제목 : 시스템식 문의
> 늘 감사드립니다.
다음글
이전글