커뮤니티

Advance Decline Divergence 수정 전략

프로필 이미지
cinamon
2014-07-24 08:45:02
201
글번호 77044
답변완료
안녕하세요 Advance Decline Divergence 수정 전략 에 진입필터로 단순20이평 기울기를 적용하려고 하는데요 잘안돼서 문의드립니다 단순20이평이 3봉연속 상승시 매수조건이면 매수 단순20이평이 3봉연속 하락시 매도조건이면 매도 부탁드립니다 Inputs: Len(5), P(60), DiV(25), mult(5); vars: MP(0), stopprice(0), Move(0); If High - Low <> 0 then Move = ema( (C - O) / (H - L) * V, len); If Low < lowest( low, P )[1] and Move > highest( Move, P)[1] then Buy("B2",onclose, def,1); If High > Highest( High, P )[1] and Move < Lowest( Move, P)[1] then Sell("S2",onclose, def,1); If Low < Lowest( Low , P )[1] and MRO(Move < lowest( Move , P )[1],20,1) == -1 then { var1= h; var2 = index; } If High > Highest( High, P )[1] AND MRO(Move > Highest( Move, P)[1],20,1) == -1 then { var3 = L; var2 = index; } if index - var2 < 2 then { if CrossUp(C, var1) and C > dayOpen then buy(); if CrossDown(C, var3) and C < dayOpen then sell(); } mp = marketposition; if MP == 1 and MP[1] <> 1 then Begin StopPrice = low - ma(range,4)*mult; end; if MP == -1 and MP[1] <> -1 then begin StopPrice = High + ma(range,4)*mult; end; If MP == 1 then begin exitlong ("ExitLong", atstop,stopprice ); stopprice = stopprice +( low-stopprice )/Div; end; If MP == -1 then begin exitshort ("Exitshort", atstop,stopprice); stopprice = stopprice - (stopprice-high)/Div; end; setstopendofday(150400);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-07-24 16:04:20

안녕하세요 예스스탁입니다. Inputs: Len(5), P(60), DiV(25), mult(5),Period(20); vars: MP(0), stopprice(0), Move(0),mav(0); mav = ma(c,Period); If High - Low <> 0 then Move = ema( (C - O) / (H - L) * V, len); If Low < lowest( low, P )[1] and Move > highest( Move, P)[1] and CountIF(mav>mav[1],3) == 3 then Buy("B2",onclose, def,1); If High > Highest( High, P )[1] and Move < Lowest( Move, P)[1] and CountIF(mav<mav[1],3) == 3 then Sell("S2",onclose, def,1); If Low < Lowest( Low , P )[1] and MRO(Move < lowest( Move , P )[1],20,1) == -1 then { var1= h; var2 = index; } If High > Highest( High, P )[1] AND MRO(Move > Highest( Move, P)[1],20,1) == -1 then { var3 = L; var2 = index; } if index - var2 < 2 then { if CrossUp(C, var1) and C > dayOpen and CountIF(mav>mav[1],3) == 3 then buy(); if CrossDown(C, var3) and C < dayOpen and CountIF(mav<mav[1],3) == 3 then sell(); } mp = marketposition; if MP == 1 and MP[1] <> 1 then Begin StopPrice = low - ma(range,4)*mult; end; if MP == -1 and MP[1] <> -1 then begin StopPrice = High + ma(range,4)*mult; end; If MP == 1 then begin exitlong ("ExitLong", atstop,stopprice ); stopprice = stopprice +( low-stopprice )/Div; end; If MP == -1 then begin exitshort ("Exitshort", atstop,stopprice); stopprice = stopprice - (stopprice-high)/Div; end; setstopendofday(150400); 즐거운 하루되세요 > cinamon 님이 쓴 글입니다. > 제목 : Advance Decline Divergence 수정 전략 > 안녕하세요 Advance Decline Divergence 수정 전략 에 진입필터로 단순20이평 기울기를 적용하려고 하는데요 잘안돼서 문의드립니다 단순20이평이 3봉연속 상승시 매수조건이면 매수 단순20이평이 3봉연속 하락시 매도조건이면 매도 부탁드립니다 Inputs: Len(5), P(60), DiV(25), mult(5); vars: MP(0), stopprice(0), Move(0); If High - Low <> 0 then Move = ema( (C - O) / (H - L) * V, len); If Low < lowest( low, P )[1] and Move > highest( Move, P)[1] then Buy("B2",onclose, def,1); If High > Highest( High, P )[1] and Move < Lowest( Move, P)[1] then Sell("S2",onclose, def,1); If Low < Lowest( Low , P )[1] and MRO(Move < lowest( Move , P )[1],20,1) == -1 then { var1= h; var2 = index; } If High > Highest( High, P )[1] AND MRO(Move > Highest( Move, P)[1],20,1) == -1 then { var3 = L; var2 = index; } if index - var2 < 2 then { if CrossUp(C, var1) and C > dayOpen then buy(); if CrossDown(C, var3) and C < dayOpen then sell(); } mp = marketposition; if MP == 1 and MP[1] <> 1 then Begin StopPrice = low - ma(range,4)*mult; end; if MP == -1 and MP[1] <> -1 then begin StopPrice = High + ma(range,4)*mult; end; If MP == 1 then begin exitlong ("ExitLong", atstop,stopprice ); stopprice = stopprice +( low-stopprice )/Div; end; If MP == -1 then begin exitshort ("Exitshort", atstop,stopprice); stopprice = stopprice - (stopprice-high)/Div; end; setstopendofday(150400);