커뮤니티

수식확인바랍니다.

프로필 이미지
감자골2
2011-05-23 12:57:46
569
글번호 38949
답변완료
지난번 보내주신setstoploss를 추가시킨수식을 적용해보았는데요.청산이 안됩니다.다시한번확인좀해주십시요.setstoploss를 뺀 수식은 청산이 잘 됩니다. 답변 부탁드립니다. input : 조건(1),TT(93000); //조건1이면 첫봉에서 매수, 조건0이면 첫봉에서 매도 if sdate < CurrentDate Then{ if 조건 == 1 Then if dayindex == 0 then buy(); if 조건 == 0 Then if dayindex == 0 then sell(); } if sdate == CurrentDate and stime >= TT Then{ if CrossUp( C, ma(C,10)) and C > O then exitshort("매도청산",AtMarket); if CrossDown(C, ma(C,10)) and C < O then exitlong("매수청산",AtMarket); SetStopEndofday(150000); } Else SetStopEndofday(0); SetStopLoss(1,PointStop); 이수식인데요 ,확인좀 해주세요.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2011-05-23 17:07:41

안녕하세요 예스스탁입니다. 손절매가 당일 이전에 발생해서 나타나는 현상이었습니다. 식을 수정했습니다. input : 조건(1),TT(93000); //조건1이면 첫봉에서 매수, 조건0이면 첫봉에서 매도 if sdate < CurrentDate Then{ if 조건 == 1 Then if dayindex == 0 then buy(); if 조건 == 0 Then if dayindex == 0 then sell(); } if sdate == CurrentDate and stime >= TT Then{ if CrossUp( C, ma(C,10)) and C > O then exitshort("매도청산",AtMarket); if CrossDown(C, ma(C,10)) and C < O then exitlong("매수청산",AtMarket); SetStopEndofday(150000); SetStopLoss(1,PointStop); } Else{ SetStopEndofday(0); SetStopLoss(0); } 즐거운 하루되세요 > 감자골2 님이 쓴 글입니다. > 제목 : 수식확인바랍니다. > 지난번 보내주신setstoploss를 추가시킨수식을 적용해보았는데요.청산이 안됩니다.다시한번확인좀해주십시요.setstoploss를 뺀 수식은 청산이 잘 됩니다. 답변 부탁드립니다. input : 조건(1),TT(93000); //조건1이면 첫봉에서 매수, 조건0이면 첫봉에서 매도 if sdate < CurrentDate Then{ if 조건 == 1 Then if dayindex == 0 then buy(); if 조건 == 0 Then if dayindex == 0 then sell(); } if sdate == CurrentDate and stime >= TT Then{ if CrossUp( C, ma(C,10)) and C > O then exitshort("매도청산",AtMarket); if CrossDown(C, ma(C,10)) and C < O then exitlong("매수청산",AtMarket); SetStopEndofday(150000); } Else SetStopEndofday(0); SetStopLoss(1,PointStop); 이수식인데요 ,확인좀 해주세요.