커뮤니티

수정 부탁드립니다.

프로필 이미지
대구어린울프
2020-12-07 11:00:35
557
글번호 144472
답변완료
안녕하세요? 아래의 수식에서 두가지 수정을 하고싶습니다. 1. 이평선 삭제 2. 재진입 부분수정 (재진입은 1회만하고, 손/익절 이후 정상매매) --> 정상진입후, 손/익절 범위내에서 반대신호가나면 1회만 재진입. (매수 포지션보유시 매도신호에만 재진입, 또는 매도 포지션보유시 매수신호에만 재진입) 부탁드립니다. 감사합니다. input : P1(5),P2(20),n(1); input : 익절틱수(50),손절틱수(50); var1 = ma(C,P1); Var2 = ma(C,P2); var3 = abs(C-O); if MarketPosition == 0 and countif(var1 > Var2 and C < O,3) == 3 and Var3 == Var3[2] Then Sell("s"); if MarketPosition == 0 and countif(var1 > Var2 and C > O,3) == 3 and Var3 == Var3[2] Then Buy("b"); if MarketPosition == -1 and IsEntryName("s") == true and BarsSinceEntry <= n and C > O Then Buy("sb"); if MarketPosition == 1 and IsEntryName("b") == true and BarsSinceEntry <= n and C < O Then Sell("bs"); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-12-07 18:59:14

안녕하세요 예스스탁입니다. input : 익절틱수(50),손절틱수(50); var3 = abs(C-O); if MarketPosition == 0 and countif(C < O,3) == 3 and Var3 == Var3[2] Then Sell("s"); if MarketPosition == 0 and countif( C > O,3) == 3 and Var3 == Var3[2] Then Buy("b"); if MarketPosition == -1 and IsEntryName("s") == true and countif(C < O,3) == 3 and Var3 == Var3[2] Then Buy("sb"); if MarketPosition == 1 and IsEntryName("b") == true and countif(C < O,3) == 3 and Var3 == Var3[2] Then Sell("bs"); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 대구어린울프 님이 쓴 글입니다. > 제목 : 수정 부탁드립니다. > 안녕하세요? 아래의 수식에서 두가지 수정을 하고싶습니다. 1. 이평선 삭제 2. 재진입 부분수정 (재진입은 1회만하고, 손/익절 이후 정상매매) --> 정상진입후, 손/익절 범위내에서 반대신호가나면 1회만 재진입. (매수 포지션보유시 매도신호에만 재진입, 또는 매도 포지션보유시 매수신호에만 재진입) 부탁드립니다. 감사합니다. input : P1(5),P2(20),n(1); input : 익절틱수(50),손절틱수(50); var1 = ma(C,P1); Var2 = ma(C,P2); var3 = abs(C-O); if MarketPosition == 0 and countif(var1 > Var2 and C < O,3) == 3 and Var3 == Var3[2] Then Sell("s"); if MarketPosition == 0 and countif(var1 > Var2 and C > O,3) == 3 and Var3 == Var3[2] Then Buy("b"); if MarketPosition == -1 and IsEntryName("s") == true and BarsSinceEntry <= n and C > O Then Buy("sb"); if MarketPosition == 1 and IsEntryName("b") == true and BarsSinceEntry <= n and C < O Then Sell("bs"); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);