커뮤니티

수정 부탁드립니다.

프로필 이미지
대구어린울프
2020-10-20 18:10:06
994
글번호 143243
답변완료
안녕하세요? 아래의 수식 진입부분에서, 다른것은 그대로 두고 양봉틱수와 음봉틱수의 외부변수 지정을 없애고 싶습니다. 정배열에서 (도지를 제외한 2틱이상의 봉) 양봉 음봉 음봉이 연달아 나올시에 매도진입 역베열에서 (도지를 제외한 2틱이상의 봉) 음봉 양봉 양봉이 연달아 나올시에 매수진입 이렇게 바꾸고싶습니다. -음봉틱수*PriceScale 를 삭제하니 도지에서만 들어가고 (2틱이상봉만 하고싶습니다) PriceScale을 놔두고 -음봉틱수만 삭제하니 1틱짜리봉 세개가 나오고 들어가게 되더라구요 수정부탁드립니다. 감사합니다. input : P1(5),P2(20),n(3),양봉틱수(3),음봉틱수(3); var : entry(0); if Bdate != Bdate[1] Then entry = 0; var1 = ma(C,P1); var2 = ma(C,P2); if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if entry < n Then { if MarketPosition == 0 and C[2] == O[2]-음봉틱수*PriceScale and C[1] == O[1]+양봉틱수*PriceScale and C[0] == O[0]+양봉틱수*PriceScale and var1 < Var2 then Buy(); if MarketPosition == 0 and C[2] == O[2]+양봉틱수*PriceScale and C[1] == O[1]-음봉틱수*PriceScale and C[0] == O[0]-음봉틱수*PriceScale and var1 > Var2 then Sell(); } input : 익절틱수(50),손절틱수(50); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-10-21 15:21:21

안녕하세요 예스스탁입니다. input : P1(5),P2(20),n(3); var : entry(0); if Bdate != Bdate[1] Then entry = 0; var1 = ma(C,P1); var2 = ma(C,P2); if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if entry < n Then { if MarketPosition == 0 and C[2] < O[2] and C[1] > O[1] and C[0] > O[0] and var1 < Var2 then Buy(); if MarketPosition == 0 and C[2] > O[2] and C[1] < O[1] and C[0] < O[0] and var1 > Var2 then Sell(); } input : 익절틱수(50),손절틱수(50); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 대구어린울프 님이 쓴 글입니다. > 제목 : 수정 부탁드립니다. > 안녕하세요? 아래의 수식 진입부분에서, 다른것은 그대로 두고 양봉틱수와 음봉틱수의 외부변수 지정을 없애고 싶습니다. 정배열에서 (도지를 제외한 2틱이상의 봉) 양봉 음봉 음봉이 연달아 나올시에 매도진입 역베열에서 (도지를 제외한 2틱이상의 봉) 음봉 양봉 양봉이 연달아 나올시에 매수진입 이렇게 바꾸고싶습니다. -음봉틱수*PriceScale 를 삭제하니 도지에서만 들어가고 (2틱이상봉만 하고싶습니다) PriceScale을 놔두고 -음봉틱수만 삭제하니 1틱짜리봉 세개가 나오고 들어가게 되더라구요 수정부탁드립니다. 감사합니다. input : P1(5),P2(20),n(3),양봉틱수(3),음봉틱수(3); var : entry(0); if Bdate != Bdate[1] Then entry = 0; var1 = ma(C,P1); var2 = ma(C,P2); if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if entry < n Then { if MarketPosition == 0 and C[2] == O[2]-음봉틱수*PriceScale and C[1] == O[1]+양봉틱수*PriceScale and C[0] == O[0]+양봉틱수*PriceScale and var1 < Var2 then Buy(); if MarketPosition == 0 and C[2] == O[2]+양봉틱수*PriceScale and C[1] == O[1]-음봉틱수*PriceScale and C[0] == O[0]-음봉틱수*PriceScale and var1 > Var2 then Sell(); } input : 익절틱수(50),손절틱수(50); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);