커뮤니티

2번째 익절에서 스탑되게 해 주세요

프로필 이미지
오소장
2021-04-18 21:34:58
634
글번호 148144
답변완료
아래 시스템을 15틱 수익에서 익절 되게 해 주시고, 손실에서는 스위칭 되고 두번째 익절이 발생하면 시스템이 멈추도록 수정 부탁 드립니다. Inputs: Length(13), Consec(5); If CountIf(Close < Lowest (Low, Length)[1], Consec) == Consec Then Sell ("s"); If CountIf(Close > Highest(High,Length)[1], Consec) == Consec Then Buy ("B");
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-04-19 14:45:51

안녕하세요 예스스탁입니다. Inputs: Length(13), Consec(5),익절틱수(15); var : Pcnt(0); if Bdate != Bdate[1] Then Pcnt = 0; if TotalTrades > TotalTrades[1] and IsExitName("StopProfitTarget",1) == true Then { Pcnt = Pcnt+1; } If Pcnt < 2 and CountIf(Close < Lowest (Low, Length)[1], Consec) == Consec Then Sell ("s"); If Pcnt < 2 and CountIf(Close > Highest(High,Length)[1], Consec) == Consec Then Buy ("B"); SetStopProfittarget(PriceScale*익절틱수,PointStop); 즐거운 하루되세요 > 오소장 님이 쓴 글입니다. > 제목 : 2번째 익절에서 스탑되게 해 주세요 > 아래 시스템을 15틱 수익에서 익절 되게 해 주시고, 손실에서는 스위칭 되고 두번째 익절이 발생하면 시스템이 멈추도록 수정 부탁 드립니다. Inputs: Length(13), Consec(5); If CountIf(Close < Lowest (Low, Length)[1], Consec) == Consec Then Sell ("s"); If CountIf(Close > Highest(High,Length)[1], Consec) == Consec Then Buy ("B");