커뮤니티

추세추종 시스템문의

프로필 이미지
대박맞자
2018-09-07 16:01:33
217
글번호 121897
답변완료
params : Leng(14) ; Variables : StoreADX(0) , PlusDI(0), MinusDI(0) ; StoreADX = ADX(Leng); PlusDI = PDI(Leng); MinusDI = MDI(Leng); Cond1 = StoreADX >= StoreADX(1) and StoreADX[1] >= StoreADX[2] and StoreADX[2] >= StoreADX[3]; Cond2 = Crosses_Above(PlusDI, MinusDI) ; Cond3 = Crosses_Below(PlusDI, MinusDI) ; if Cond1 and Cond2 Then Buy("B1", OnClose,0,10); if Cond1 and Cond3 Then Sell("S1", OnClose,0,10); Con4 = StoreADX <= StoreADX[1] and StoreADX[1] <= StoreADX[2] and StoreADX[2] <= StoreADX[3]; if Cond4 and Con3 Then ExitLong("LX1", OnClose); if Cond4 and Cond2 Then ExitShort("SX1", OnClose); SetStopPosition; SetDollarTrailing(1); SetExitOnClose; 다른 곳에 올려진걸 제가 적어본건데 시스템 검증을 해보니 오류가 많이떠서 오류를 고쳐서 될수 있게 해주세요,,
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-09-10 11:00:46

안녕하세요 예스스탁입니다. input : Leng(14) ; Var : StoreADX(0) , PlusDI(0), MinusDI(0) ; var : cond1(false),cond2(false),cond3(false),cond4(false); StoreADX = ADX(Leng); PlusDI = Diplus(Leng); MinusDI = DiMinus(Leng); Cond1 = StoreADX >= StoreADX[1] and StoreADX[1] >= StoreADX[2] and StoreADX[2] >= StoreADX[3]; Cond2 = CrossUp(PlusDI, MinusDI) ; Cond3 = CrossDown(PlusDI, MinusDI) ; Cond4 = StoreADX <= StoreADX[1] and StoreADX[1] <= StoreADX[2] and StoreADX[2] <= StoreADX[3]; if Cond1 and Cond2 Then Buy("B1", OnClose,def,10); if Cond1 and Cond3 Then Sell("S1", OnClose,def,10); if Cond4 and Cond3 Then ExitLong("LX1", OnClose); if Cond4 and Cond2 Then ExitShort("SX1", OnClose); SetStopProfittarget(1,PointStop); SetStopEndofday(152500); 즐거운 하루되세요 > 대박맞자 님이 쓴 글입니다. > 제목 : 추세추종 시스템문의 > params : Leng(14) ; Variables : StoreADX(0) , PlusDI(0), MinusDI(0) ; StoreADX = ADX(Leng); PlusDI = PDI(Leng); MinusDI = MDI(Leng); Cond1 = StoreADX >= StoreADX(1) and StoreADX[1] >= StoreADX[2] and StoreADX[2] >= StoreADX[3]; Cond2 = Crosses_Above(PlusDI, MinusDI) ; Cond3 = Crosses_Below(PlusDI, MinusDI) ; if Cond1 and Cond2 Then Buy("B1", OnClose,0,10); if Cond1 and Cond3 Then Sell("S1", OnClose,0,10); Con4 = StoreADX <= StoreADX[1] and StoreADX[1] <= StoreADX[2] and StoreADX[2] <= StoreADX[3]; if Cond4 and Con3 Then ExitLong("LX1", OnClose); if Cond4 and Cond2 Then ExitShort("SX1", OnClose); SetStopPosition; SetDollarTrailing(1); SetExitOnClose; 다른 곳에 올려진걸 제가 적어본건데 시스템 검증을 해보니 오류가 많이떠서 오류를 고쳐서 될수 있게 해주세요,,