커뮤니티

문의

프로필 이미지
구다이전설
2013-05-10 11:24:13
176
글번호 63043
답변완료
재진입시 익절을 하게 되면 재 진입이 되지 않는데 익절 해도 재진입이 되려면 식을 어떻게 손질 해야 하나요? 익절을 0.7 포인트 상승이후 0.7 하락 하면 하도록 설정해 놨는데 익절후엔 재진입이 않되네요 osc = macd( ) var1 = round(osc,2) Condition1 = ema(C,5) > ema(C,20) and ema(C,20) > ema(C,60); Condition2 = ema(C,5) < ema(C,20) and ema(C,20) < ema(C,60); if crossup(osc,0) then buy("싸",OnClose,def,1); if MarketPosition == 1 then { if crossdown( osc,0) Then exitlong("b",OnClose,def,"",1,1); } if MarketPosition == 0 and MarketPosition(1) == 1 and IsexitName("b",1) == true and c > exitprice(1) and var1 > 0 Then buy("bb"); if MarketPosition == 1 and IsEntryName("bb") and var1[2]> var1[1] and var1 < var1[1] then Exitlong("bbx"); if MarketPosition == 1 Then { //매수포지션에서 if Condition1 == false Then //정배열 아니면 당일청산 SetStopEndofday(1504); if Condition1 == true Then //정배열이면 당일청산 안함 SetStopEndofday(0); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-05-10 14:48:54

안녕하세요 예스스탁입니다. 식상에 재진입이 직전청산명이 b일때만 되게 되어 있습니다. 해당 부분 삭제하시면 됩니다. var : osc(0); osc = MACD_OSC(12,26,9); var1 = round(osc,2); Condition1 = ema(C,5) > ema(C,20) and ema(C,20) > ema(C,60); Condition2 = ema(C,5) < ema(C,20) and ema(C,20) < ema(C,60); if crossup(osc,0) then buy("싸",OnClose,def,1); if MarketPosition == 1 then { if crossdown( osc,0) Then exitlong("b",OnClose,def,"",1,1); } if MarketPosition == 0 and MarketPosition(1) == 1 and c > exitprice(1) and var1 > 0 Then buy("bb"); if MarketPosition == 1 and IsEntryName("bb") and var1[2]> var1[1] and var1 < var1[1] then Exitlong("bbx"); if MarketPosition == 1 Then { //매수포지션에서 if Condition1 == false Then //정배열 아니면 당일청산 SetStopEndofday(1504); if Condition1 == true Then //정배열이면 당일청산 안함 SetStopEndofday(0); } 즐거운 하루되세요 > 구다이전설 님이 쓴 글입니다. > 제목 : 문의 > 재진입시 익절을 하게 되면 재 진입이 되지 않는데 익절 해도 재진입이 되려면 식을 어떻게 손질 해야 하나요? 익절을 0.7 포인트 상승이후 0.7 하락 하면 하도록 설정해 놨는데 익절후엔 재진입이 않되네요 osc = macd( ) var1 = round(osc,2) Condition1 = ema(C,5) > ema(C,20) and ema(C,20) > ema(C,60); Condition2 = ema(C,5) < ema(C,20) and ema(C,20) < ema(C,60); if crossup(osc,0) then buy("싸",OnClose,def,1); if MarketPosition == 1 then { if crossdown( osc,0) Then exitlong("b",OnClose,def,"",1,1); } if MarketPosition == 0 and MarketPosition(1) == 1 and IsexitName("b",1) == true and c > exitprice(1) and var1 > 0 Then buy("bb"); if MarketPosition == 1 and IsEntryName("bb") and var1[2]> var1[1] and var1 < var1[1] then Exitlong("bbx"); if MarketPosition == 1 Then { //매수포지션에서 if Condition1 == false Then //정배열 아니면 당일청산 SetStopEndofday(1504); if Condition1 == true Then //정배열이면 당일청산 안함 SetStopEndofday(0); }