커뮤니티

손절매식 확인 부탁합니다.

프로필 이미지
감자골2
2011-05-24 12:29:38
613
글번호 38999
답변완료
안녕하세요.이번수식도 잘 받았습니다. 그런데 수식을 적용하니까 문제가 발생했습니다. 수식을 적용한후 매수를 하면 계속 수익이 나고 있는데 손절이 발생합니다.다시 확인 부탁드립니다. 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(145800); SetStopLoss(1,PointStop); } Else{ SetStopEndofday(0); SetStopLoss(0); } 수식확인 바랍니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2011-05-24 15:16:42

안녕하세요 예스스탁입니다. 해당식의 진입이 실제진입과 같이 않으므로 발생되는 문제입니다. 적용하실때 수동으로 진입한 물량의 진입가격을 조건과 TT와 마찬가지로 진입가에 설정해 주시기 바랍니다. input : 조건(1),TT(93000),진입가(285); //조건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(145800); exitlong("손절",AtStop,진입가-1); } Else{ SetStopEndofday(0); } 즐거운 하루되세요 > 감자골2 님이 쓴 글입니다. > 제목 : 손절매식 확인 부탁합니다. > 안녕하세요.이번수식도 잘 받았습니다. 그런데 수식을 적용하니까 문제가 발생했습니다. 수식을 적용한후 매수를 하면 계속 수익이 나고 있는데 손절이 발생합니다.다시 확인 부탁드립니다. 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(145800); SetStopLoss(1,PointStop); } Else{ SetStopEndofday(0); SetStopLoss(0); } 수식확인 바랍니다.