커뮤니티

bx, sx 청산시 후처리방법 2가지 문의

프로필 이미지
우후훗
2014-01-02 18:44:28
145
글번호 70991
답변완료

첨부 이미지

선물 1분봉 시스템운영 중입니다. 조금 전 문의한 트레일링스톱 청산시 후처리와 같은데 이번에는 bx, sx 청산시 2가지 방법 문의입니다. 익절과 bx, sx 청산이 다음과 같이 각각 설정되어 있습니다. SetStopProfittarget(5.00,PointStop); ################################### if MarketPosition == 1 Then{ if highest(H,BarsSinceEntry) >= EntryPrice+2.40 Then ExitLong("bx3",AtStop,EntryPrice+PriceScale*19); } if MarketPosition == -1 Then{ if Lowest(L,BarsSinceEntry) <= EntryPrice-2.40 Then ExitShort("sx3",AtStop,EntryPrice-PriceScale*19); } ################################### 시스템 특성상 첨부 예제와같이 bx3, sx3 청산시 동시에 동일방향 진입이 또 됩니다. 이를 해결하기 위한 2가지 방법에 대해 알려주시면 감사하겠습니다. 첫째 bx3 또는 sx3 청산시에는 당일 거래는 모두 중지시킵니다. 둘째 bx3 또는 sx3 청산시 동시에 반대방향으로 강제 진입합니다. 2가지 방법에 대해 각각 방법 알려주셨으면 합니다. 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-01-02 20:49:37

안녕하세요 예스스탁입니다. 직전 답변과 수식이 비슷합니다. 참고하시기 바랍니다. 1. Condition1 = ExitDate(1) == sdate and (IsExitName("Bx3",1) == true or IsExitName("sx3",1) == true); if Condition1 == false Then{ if 매수조건 Then buy(); if 매도조건 Then sell(); } SetStopProfittarget(5.00,PointStop); ################################### if MarketPosition == 1 Then{ if highest(H,BarsSinceEntry) >= EntryPrice+2.40 Then ExitLong("bx3",AtStop,EntryPrice+PriceScale*19); } if MarketPosition == -1 Then{ if Lowest(L,BarsSinceEntry) <= EntryPrice-2.40 Then ExitShort("sx3",AtStop,EntryPrice-PriceScale*19); } ################################### 2. if 매수조건 Then buy(); if 매도조건 Then sell(); SetStopProfittarget(5.00,PointStop); ################################### if MarketPosition == 1 Then{ if highest(H,BarsSinceEntry) >= EntryPrice+2.40 Then sell("bx3S",AtStop,EntryPrice+PriceScale*19); } if MarketPosition == -1 Then{ if Lowest(L,BarsSinceEntry) <= EntryPrice-2.40 Then Buy("sx3B",AtStop,EntryPrice-PriceScale*19); } ################################### 즐거운 하루되세요 > 우후훗 님이 쓴 글입니다. > 제목 : bx, sx 청산시 후처리방법 2가지 문의 > 선물 1분봉 시스템운영 중입니다. 조금 전 문의한 트레일링스톱 청산시 후처리와 같은데 이번에는 bx, sx 청산시 2가지 방법 문의입니다. 익절과 bx, sx 청산이 다음과 같이 각각 설정되어 있습니다. SetStopProfittarget(5.00,PointStop); ################################### if MarketPosition == 1 Then{ if highest(H,BarsSinceEntry) >= EntryPrice+2.40 Then ExitLong("bx3",AtStop,EntryPrice+PriceScale*19); } if MarketPosition == -1 Then{ if Lowest(L,BarsSinceEntry) <= EntryPrice-2.40 Then ExitShort("sx3",AtStop,EntryPrice-PriceScale*19); } ################################### 시스템 특성상 첨부 예제와같이 bx3, sx3 청산시 동시에 동일방향 진입이 또 됩니다. 이를 해결하기 위한 2가지 방법에 대해 알려주시면 감사하겠습니다. 첫째 bx3 또는 sx3 청산시에는 당일 거래는 모두 중지시킵니다. 둘째 bx3 또는 sx3 청산시 동시에 반대방향으로 강제 진입합니다. 2가지 방법에 대해 각각 방법 알려주셨으면 합니다. 감사합니다.