커뮤니티

어디가 문제인지 봐주시면 감사하겠습니다.

프로필 이미지
시고르시고르
2019-05-27 01:19:04
215
글번호 128986
답변완료
Inputs: FastLength(1), SlowLength(30), ADXLength(12),npoint(1); Variables: MP(0), Fast(0), Slow(0), GoLong(False), GoShort(False), BuyStop(0), SellStop(0), ADXValue(0), Trending(False), TLen_F(0), TLen_S(0), TriAverage_F(0), TriAverage_S(0); MP = MarketPosition; TLen_F = Ceiling((FastLength + 1) * 0.5); TRIAverage_F = ma(ma(C, TLen_F), TLen_F); TLen_S = Ceiling((SlowLength + 1) * 0.5); TRIAverage_S = ma(ma(C, TLen_S), TLen_S); Fast = TRIAverage_F; Slow = TRIAverage_S; ADXValue = ADX(ADXLength); Trending = ADXValue > ADXValue[FastLength]; GoLong = Fast > Slow; GoShort = Fast < Slow; If CrossUp( Fast , Slow) Then BuyStop = High + npoint ; If CrossDown( Fast , Slow) Then SellStop = Low - npoint ; If GoLong AND MP == 0 Then Buy ("Long", atstop,BuyStop) ; If GoShort AND MP == 0 Then Sell ("Short", atstop,SellStop) ; If MP == 1 Then Begin ExitLong("EL", atstop,Slow - npoint); *****If High < Fast AND Trending Then *****Buy ("Longer", atstop,Fast + npoint) ; End; If MP == -1 Then Begin ExitShort("ES", atstop,Slow + npoint); ****** If Low > Fast AND Trending Then ****** Sell ("Shorter", atstop,Fast - npoint) ; End; ------------------------------------------------------------------------- 하단부에 제가 *******로 표시해놓은 네줄이 무었을 의미하는지 잘 이해가 안되네요 제가 이해하기로는 추가진입을 의미하는걸로 이해가 되는데 시뮬레이션상에서 Loger Shorter진입이 딱히 뜨지는 않고 저 네줄을 지워보니 전체적인 청산시점이 다 바뀌네요
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-05-28 14:51:57

안녕하세요 예스스탁입니다. *****로 표시한 부분은 추가진입에 대한 내용입니다. 추가진입을 하는 내용이 있는 수식은 차트에 적용할 때 시스템 트레이딩 설정창의 피라미딩탭에서 피라미딩을 다른진입신호만허용이나 모든진입신호허용으로 설정하고 적용해 주시면 됩니다. 피라미딩(중복진입)은 기존이 허용안함이기에 별도로 설정하지 않으면 추가진입 내용이 있어도 추가진입 신호가 발생하되지 않습니다. 즐거운 하루되세요 > 시고르시고르 님이 쓴 글입니다. > 제목 : 어디가 문제인지 봐주시면 감사하겠습니다. > Inputs: FastLength(1), SlowLength(30), ADXLength(12),npoint(1); Variables: MP(0), Fast(0), Slow(0), GoLong(False), GoShort(False), BuyStop(0), SellStop(0), ADXValue(0), Trending(False), TLen_F(0), TLen_S(0), TriAverage_F(0), TriAverage_S(0); MP = MarketPosition; TLen_F = Ceiling((FastLength + 1) * 0.5); TRIAverage_F = ma(ma(C, TLen_F), TLen_F); TLen_S = Ceiling((SlowLength + 1) * 0.5); TRIAverage_S = ma(ma(C, TLen_S), TLen_S); Fast = TRIAverage_F; Slow = TRIAverage_S; ADXValue = ADX(ADXLength); Trending = ADXValue > ADXValue[FastLength]; GoLong = Fast > Slow; GoShort = Fast < Slow; If CrossUp( Fast , Slow) Then BuyStop = High + npoint ; If CrossDown( Fast , Slow) Then SellStop = Low - npoint ; If GoLong AND MP == 0 Then Buy ("Long", atstop,BuyStop) ; If GoShort AND MP == 0 Then Sell ("Short", atstop,SellStop) ; If MP == 1 Then Begin ExitLong("EL", atstop,Slow - npoint); *****If High < Fast AND Trending Then *****Buy ("Longer", atstop,Fast + npoint) ; End; If MP == -1 Then Begin ExitShort("ES", atstop,Slow + npoint); ****** If Low > Fast AND Trending Then ****** Sell ("Shorter", atstop,Fast - npoint) ; End; ------------------------------------------------------------------------- 하단부에 제가 *******로 표시해놓은 네줄이 무었을 의미하는지 잘 이해가 안되네요 제가 이해하기로는 추가진입을 의미하는걸로 이해가 되는데 시뮬레이션상에서 Loger Shorter진입이 딱히 뜨지는 않고 저 네줄을 지워보니 전체적인 청산시점이 다 바뀌네요