커뮤니티

수식수정부탁합니다.

프로필 이미지
바닥차기
2019-05-06 08:24:05
245
글번호 128435
답변완료
안녕하세요.수고하십니다. 아래 수식수정좀 부탁합니다. 1.매수신호 발생시 청산된 이후는 정상적으로 재진입 2. 손절시는 손절된후 5이평을 종가상 돌파후 다시 5이평 아래로 하락돌파후 기존 진입 조건에 맞는경우만 진입 input : starttime(172700),endtime(010000),p(5); var : Tcond(false); if sdate != sdate[1] Then SetStopEndofday(endtime); if (sdate != sdate[1] and stime >= starttime) or (sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then { SetStopEndofday(0); Tcond = true; } if (sdate != sdate[1] and stime >= endtime) or (sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then { Tcond = false; } #완성봉20이평 var1 = ma(C,20); #시가 수신시 20이평 var2 = (AccumN(c,19)+NextBarOpen)/20; #시가 수신시 5이평 var3 = (AccumN(c,4)+NextBarOpen)/5; var4 = ma(C,p); if Tcond == true then{ if MarketPosition == 0 and var2 > var1 and var3 > var2 and NextBarOpen < var4 Then buy("s",AtStop,NextBarOpen+PriceScale*1); } if MarketPosition == 1 Then { ExitLong("bp",Atlimit,(O[BarsSinceEntry]+PriceScale*1)+(PriceScale*30)); ExitLong("bl",AtStop,(O[BarsSinceEntry]+PriceScale*1)-(PriceScale*15)); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-05-07 11:03:33

안녕하세요 예스스탁입니다. input : starttime(172700),endtime(010000),p(5); var : Tcond(false),entry(false); if sdate != sdate[1] Then SetStopEndofday(endtime); if (sdate != sdate[1] and stime >= starttime) or (sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then { SetStopEndofday(0); Tcond = true; entry = true; } if (sdate != sdate[1] and stime >= endtime) or (sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then { Tcond = false; } #완성봉20이평 var1 = ma(C,20); #시가 수신시 20이평 var2 = (AccumN(c,19)+NextBarOpen)/20; #시가 수신시 5이평 var3 = (AccumN(c,4)+NextBarOpen)/5; var4 = ma(C,p); if CurrentContracts > CurrentContracts[1] and IsExitName("bl",1) == true Then entry = false; if entry == false and CrossDown(C,var4) Then entry = true; if Tcond == true and entry == true then { if MarketPosition == 0 and var2 > var1 and var3 > var2 and NextBarOpen < var4 Then buy("s",AtStop,NextBarOpen+PriceScale*1); } if MarketPosition == 1 Then { ExitLong("bp",Atlimit,(O[BarsSinceEntry]+PriceScale*1)+(PriceScale*30)); ExitLong("bl",AtStop,(O[BarsSinceEntry]+PriceScale*1)-(PriceScale*15)); } 즐거운 하루되세요 > 바닥차기 님이 쓴 글입니다. > 제목 : 수식수정부탁합니다. > 안녕하세요.수고하십니다. 아래 수식수정좀 부탁합니다. 1.매수신호 발생시 청산된 이후는 정상적으로 재진입 2. 손절시는 손절된후 5이평을 종가상 돌파후 다시 5이평 아래로 하락돌파후 기존 진입 조건에 맞는경우만 진입 input : starttime(172700),endtime(010000),p(5); var : Tcond(false); if sdate != sdate[1] Then SetStopEndofday(endtime); if (sdate != sdate[1] and stime >= starttime) or (sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then { SetStopEndofday(0); Tcond = true; } if (sdate != sdate[1] and stime >= endtime) or (sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then { Tcond = false; } #완성봉20이평 var1 = ma(C,20); #시가 수신시 20이평 var2 = (AccumN(c,19)+NextBarOpen)/20; #시가 수신시 5이평 var3 = (AccumN(c,4)+NextBarOpen)/5; var4 = ma(C,p); if Tcond == true then{ if MarketPosition == 0 and var2 > var1 and var3 > var2 and NextBarOpen < var4 Then buy("s",AtStop,NextBarOpen+PriceScale*1); } if MarketPosition == 1 Then { ExitLong("bp",Atlimit,(O[BarsSinceEntry]+PriceScale*1)+(PriceScale*30)); ExitLong("bl",AtStop,(O[BarsSinceEntry]+PriceScale*1)-(PriceScale*15)); }