커뮤니티

수정 부탁드립니다.

프로필 이미지
대구어린울프
2021-06-11 15:44:30
1177
글번호 149881
답변완료
안녕하세요? 아래의 수식의 진입은 다음과 같습니다. 이동평균선2개 (외부변수) 정배열에서 갭상승 도지or양봉 이후 n봉이내(외부변수) 음봉 출현시 매도 역배열에서 갭하락 도지or음봉 이후 n봉이내(외부변수) 양봉 출현시 매수 하지만 현재 갭상승/갭하락 이 생략이되고 매매가 이루어지고있습니다. 정배열에서 갭상승/역배열에서 갭하락 이부분이 되도록 하고싶습니다. 살펴봐주시고 문제점 수정 부탁드립니다. 감사합니다. input : P1(5),P2(20),n(0); input : 익절틱수(50),손절틱수(50); var1 = ma(C,5); Var2 = ma(C,20); if var1 > Var2 and ((O > C[1] and C == O) or (C>O)) Then { value1 = Index; Condition1 = False; } if MarketPosition == 0 and Condition1 == False and Index > value1 and Index < value1+n and C < O Then { Condition1 = true; Sell(); } if var1 < Var2 and ((O < C[1] and C == O) or (C<O)) Then { value2 = Index; Condition2 = False; } if MarketPosition == 0 and Condition2 == False and Index > value2 and Index < value2+n and C > O Then { Condition2 = true; Buy(); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-06-14 11:48:51

안녕하세요 예스스탁입니다. input : P1(5),P2(20),n(0); input : 익절틱수(50),손절틱수(50); var : Scond(False),Bcond(False),SI(0),BI(0); var1 = ma(C,5); Var2 = ma(C,20); if var1 > Var2 and ((O > C[1] and C == O) or (C > O)) Then { SI = Index; Scond = true; } if MarketPosition == 0 and Scond == true and Index > SI and Index < SI+n and C < O Then { Scond = False; Sell(); } if var1 < Var2 and ((O < C[1] and C == O) or (C < O)) Then { BI = Index; Bcond = true; } if MarketPosition == 0 and Bcond == true and Index > BI and Index < BI+n and C > O Then { Bcond = False; Buy(); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 대구어린울프 님이 쓴 글입니다. > 제목 : 수정 부탁드립니다. > 안녕하세요? 아래의 수식의 진입은 다음과 같습니다. 이동평균선2개 (외부변수) 정배열에서 갭상승 도지or양봉 이후 n봉이내(외부변수) 음봉 출현시 매도 역배열에서 갭하락 도지or음봉 이후 n봉이내(외부변수) 양봉 출현시 매수 하지만 현재 갭상승/갭하락 이 생략이되고 매매가 이루어지고있습니다. 정배열에서 갭상승/역배열에서 갭하락 이부분이 되도록 하고싶습니다. 살펴봐주시고 문제점 수정 부탁드립니다. 감사합니다. input : P1(5),P2(20),n(0); input : 익절틱수(50),손절틱수(50); var1 = ma(C,5); Var2 = ma(C,20); if var1 > Var2 and ((O > C[1] and C == O) or (C>O)) Then { value1 = Index; Condition1 = False; } if MarketPosition == 0 and Condition1 == False and Index > value1 and Index < value1+n and C < O Then { Condition1 = true; Sell(); } if var1 < Var2 and ((O < C[1] and C == O) or (C<O)) Then { value2 = Index; Condition2 = False; } if MarketPosition == 0 and Condition2 == False and Index > value2 and Index < value2+n and C > O Then { Condition2 = true; Buy(); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);