커뮤니티

도움 요청드립니다.

프로필 이미지
대구어린울프
2022-02-20 23:38:14
1065
글번호 156481
답변완료
안녕하세요? 아래의 수식에 SetStopTrailing 을 넣어보려구 하는데 잘안되네요... 도움부탁드립니다. ***수익(외부변수)틱 이상부터 발동, 최고점 대비 (외부변수)틱 하락시 청산. 감사합니다. input : 익절틱수(50),손절틱수(50),진입횟수(3); input : 매도종가차이(3),매수종가차이(3); input : 작은이평(5),큰이평(20); var : entry(0); var1 = ma(c,작은이평); var2 = ma(C,큰이평); 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 VAR1 > Var2 and MarketPosition == 0 and entry < 진입횟수 and C[1] > O[1] and C < O and C == O[1]-PriceScale*매도종가차이 Then Sell(); if VAR1 < Var2 and MarketPosition == 0 and entry < 진입횟수 and C[1] < O[1] and C > O and C == O[1]+PriceScale*매수종가차이 Then Buy(); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-02-21 15:51:27

안녕하세요 예스스탁입니다. input : 익절틱수(50),손절틱수(50),진입횟수(3),tr수익틱수(30),tr감소틱수(10); input : 매도종가차이(3),매수종가차이(3); input : 작은이평(5),큰이평(20); var : entry(0); var1 = ma(c,작은이평); var2 = ma(C,큰이평); 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 VAR1 > Var2 and MarketPosition == 0 and entry < 진입횟수 and C[1] > O[1] and C < O and C == O[1]-PriceScale*매도종가차이 Then Sell(); if VAR1 < Var2 and MarketPosition == 0 and entry < 진입횟수 and C[1] < O[1] and C > O and C == O[1]+PriceScale*매수종가차이 Then Buy(); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); SetStopTrailing(tr감소틱수,tr수익틱수, PointStop); 즐거운 하루되세요 > 대구어린울프 님이 쓴 글입니다. > 제목 : 도움 요청드립니다. > 안녕하세요? 아래의 수식에 SetStopTrailing 을 넣어보려구 하는데 잘안되네요... 도움부탁드립니다. ***수익(외부변수)틱 이상부터 발동, 최고점 대비 (외부변수)틱 하락시 청산. 감사합니다. input : 익절틱수(50),손절틱수(50),진입횟수(3); input : 매도종가차이(3),매수종가차이(3); input : 작은이평(5),큰이평(20); var : entry(0); var1 = ma(c,작은이평); var2 = ma(C,큰이평); 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 VAR1 > Var2 and MarketPosition == 0 and entry < 진입횟수 and C[1] > O[1] and C < O and C == O[1]-PriceScale*매도종가차이 Then Sell(); if VAR1 < Var2 and MarketPosition == 0 and entry < 진입횟수 and C[1] < O[1] and C > O and C == O[1]+PriceScale*매수종가차이 Then Buy(); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);