커뮤니티

추가부탁드립니다.

프로필 이미지
대구어린울프
2020-11-16 11:54:47
320
글번호 143872
답변완료
안녕하세요? 답변 감사히 받았습니다. 좋은 공부가 되었습니다. 다름이 아니오라, 두가지 문의가있사온데 한가지는 아래 수식에서 진입봉에서 외부변수(지정한틱) 이상일시에는 다 진입하는걸로 수정하고싶습니다. 부탁드립니다. 감사합니다. input : 양봉(5),진입음봉(5),음봉(5),진입양봉(5),p1(5),p2(20); input : entrycnt(3),profit(50),loss(50); var : entry(0); var1 = ma(c,p1); var2 = ma(c,p2); if bdate != bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) then entry = entry+1; if entry < entrycnt and var1 > Var2 and MarketPosition == 0 and C == O+진입양봉*PriceScale and C[1] == O[1]-음봉*PriceScale then buy(); if entry < entrycnt and var1 < Var2 and MarketPosition == 0 and C == O-진입양봉*PriceScale and C[1] == O[1]+양봉*PriceScale then sell(); SetStopProfittarget(PriceScale*profit,PointStop); SetStopLoss(PriceScale*loss,PointStop) ------------------------------------------------------------------------------------ [문제점 검토요청] 아래의 수식으로 성능보고서 상에는 아무문제가 없었는데, 실전거래를 해보니 손절이 똑바로 되지가 않는 문제가 발생했습니다. 매매횟수는 2회로 설정해놓았고 2회모두 손실입니다. 그 중에서 1회는 손절이 잘되었고 두번째 들어간것이 손절폭을 넘어가도 계속 가지고있더군요. 어떤문제가 있는지 검토해주시면 감사하겠습니다. 부탁드리겠습니다. input : b기준선(0.05),s기준선(0.95),n(3); var : entry(0); if Bdate != Bdate[1] Then entry = 0; var1 = C%1; var2 = C%1; 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 > O and b기준선 == var1 then Buy(); if MarketPosition == 0 and C < O and s기준선 == Var2 then Sell(); } input : 익절틱수(50),손절틱수(50); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-11-16 12:51:37

안녕하세요 예스스탁입니다. input : 양봉(5),진입음봉(5),음봉(5),진입양봉(5),p1(5),p2(20); input : entrycnt(3),profit(50),loss(50); var : entry(0); var1 = ma(c,p1); var2 = ma(c,p2); if bdate != bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) then entry = entry+1; if entry < entrycnt and var1 > Var2 and MarketPosition == 0 and C >= O+진입양봉*PriceScale and C[1] == O[1]-음봉*PriceScale then buy(); if entry < entrycnt and var1 < Var2 and MarketPosition == 0 and C <= O-진입양봉*PriceScale and C[1] == O[1]+양봉*PriceScale then sell(); SetStopProfittarget(PriceScale*profit,PointStop); SetStopLoss(PriceScale*loss,PointStop); 즐거운 하루되세요 > 대구어린울프 님이 쓴 글입니다. > 제목 : 추가부탁드립니다. > 안녕하세요? 답변 감사히 받았습니다. 좋은 공부가 되었습니다. 다름이 아니오라, 두가지 문의가있사온데 한가지는 아래 수식에서 진입봉에서 외부변수(지정한틱) 이상일시에는 다 진입하는걸로 수정하고싶습니다. 부탁드립니다. 감사합니다. input : 양봉(5),진입음봉(5),음봉(5),진입양봉(5),p1(5),p2(20); input : entrycnt(3),profit(50),loss(50); var : entry(0); var1 = ma(c,p1); var2 = ma(c,p2); if bdate != bdate[1] Then entry = 0; if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) then entry = entry+1; if entry < entrycnt and var1 > Var2 and MarketPosition == 0 and C == O+진입양봉*PriceScale and C[1] == O[1]-음봉*PriceScale then buy(); if entry < entrycnt and var1 < Var2 and MarketPosition == 0 and C == O-진입양봉*PriceScale and C[1] == O[1]+양봉*PriceScale then sell(); SetStopProfittarget(PriceScale*profit,PointStop); SetStopLoss(PriceScale*loss,PointStop) ------------------------------------------------------------------------------------ [문제점 검토요청] 아래의 수식으로 성능보고서 상에는 아무문제가 없었는데, 실전거래를 해보니 손절이 똑바로 되지가 않는 문제가 발생했습니다. 매매횟수는 2회로 설정해놓았고 2회모두 손실입니다. 그 중에서 1회는 손절이 잘되었고 두번째 들어간것이 손절폭을 넘어가도 계속 가지고있더군요. 어떤문제가 있는지 검토해주시면 감사하겠습니다. 부탁드리겠습니다. input : b기준선(0.05),s기준선(0.95),n(3); var : entry(0); if Bdate != Bdate[1] Then entry = 0; var1 = C%1; var2 = C%1; 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 > O and b기준선 == var1 then Buy(); if MarketPosition == 0 and C < O and s기준선 == Var2 then Sell(); } input : 익절틱수(50),손절틱수(50); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);