커뮤니티

수식문의

프로필 이미지
절정파워
2006-05-04 10:27:35
1114
글번호 9932
답변완료
안녕하세요..수고하십니다.. stoploss를 설정했을때..stoploss가 발생하여 청산이 된후 다시 같은 방향으로 재진입이 되는 경우가 있습니다..stoploss가 발생한 후 20봉 이전에는 같은 방향으로 진입이 안되게 하는 수식이 있을까요? 마찬가지로 setprofittarget의 경우에도 목표청산후 20봉 이전에는 같은 방향으로 진입이 안되게 하는 수익을 부탁드립니다.. 미리 감사합니다..
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2006-05-04 15:29:01

안녕하세요 예스스탁입니다. 문의하신 식은 다음과 같습니다. if PositionProfit(1) < 1 and PositionProfit(1) >= 0 then{ if 매수조건 and marketposition(1) == -1 then buy(); if 매도조건 and marketposition(1) == 1 then sell(); } if PositionProfit(1) > -1 and PositionProfit(1) < 0 then{ if 매수조건 and marketposition(1) == -1 then buy(); if 매도조건 and marketposition(1) == 1 then sell(); } if PositionProfit(1) >= 1 and barssinceexit(1) >= 20 then{ if 매수조건 then buy(); if 매도조건 then sell(); } if PositionProfit(1) <= -1 and barssinceexit(1) >= 20 then{ if 매수조건 then buy(); if 매도조건 then sell(); } 참고하시기 바랍니다. 즐거운 하루되세요 > 절정파워 님이 쓴 글입니다. > 제목 : 수식문의 > 안녕하세요..수고하십니다.. stoploss를 설정했을때..stoploss가 발생하여 청산이 된후 다시 같은 방향으로 재진입이 되는 경우가 있습니다..stoploss가 발생한 후 20봉 이전에는 같은 방향으로 진입이 안되게 하는 수식이 있을까요? 마찬가지로 setprofittarget의 경우에도 목표청산후 20봉 이전에는 같은 방향으로 진입이 안되게 하는 수익을 부탁드립니다.. 미리 감사합니다..