커뮤니티

수식추가 부탁드립니다.

프로필 이미지
대구어린울프
2022-03-18 11:55:36
1254
글번호 157279
답변완료
안녕하세요? 하루매매시작 시간을 아래 수식에 추가 하려고합니다. start time 매매 시작시간을 넣으려고하니 잘안되네요.. 도움부탁드립니다. 감사합니다. input : 익절틱수(50),손절틱수(50),진입횟수(3),N(5); input : 작은이평(5),큰이평(20); var : entry(0),cnt(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 abs(O[1]-C[2]) > 0 and C < O and abs(O-C[1]) > 0 Then { Sell(); cnt = 0; } if VAR1 < Var2 and MarketPosition == 0 and entry < 진입횟수 and C[1] > O[1] and abs(O[1]-C[2]) > 0 and C > O and abs(O-C[1]) > 0 Then { Buy(); cnt = 0; } if MarketPosition == 1 and BarsSinceEntry == 1 and C < O and cnt < N Then { cnt = cnt+1; Sell("bs"); } if MarketPosition == -1 and BarsSinceEntry == -1 and C > O and cnt < N Then { cnt = cnt+1; Buy("sb"); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-03-18 14:23:42

안녕하세요 예스스탁입니다. input : 익절틱수(50),손절틱수(50),진입횟수(3),N(5),starttime(100000); input : 작은이평(5),큰이평(20); var : entry(0),cnt(0),Tcond(False); var1 = ma(c,작은이평); var2 = ma(C,큰이평); if Bdate != Bdate[1] Then { entry = 0; Tcond = False; } if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or (MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then entry = entry+1; if (sdate != sdate[1] and stime >= StartTime) or (sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then { Tcond = true; } if Tcond == true and VAR1 > Var2 and MarketPosition == 0 and entry < 진입횟수 and C[1] < O[1] and abs(O[1]-C[2]) > 0 and C < O and abs(O-C[1]) > 0 Then { Sell(); cnt = 0; } if Tcond == true and VAR1 < Var2 and MarketPosition == 0 and entry < 진입횟수 and C[1] > O[1] and abs(O[1]-C[2]) > 0 and C > O and abs(O-C[1]) > 0 Then { Buy(); cnt = 0; } if MarketPosition == 1 and BarsSinceEntry == 1 and C < O and cnt < N and Tcond == true Then { cnt = cnt+1; Sell("bs"); } if MarketPosition == -1 and BarsSinceEntry == -1 and C > O and cnt < N and Tcond == true Then { cnt = cnt+1; Buy("sb"); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); 즐거운 하루되세요 > 대구어린울프 님이 쓴 글입니다. > 제목 : 수식추가 부탁드립니다. > 안녕하세요? 하루매매시작 시간을 아래 수식에 추가 하려고합니다. start time 매매 시작시간을 넣으려고하니 잘안되네요.. 도움부탁드립니다. 감사합니다. input : 익절틱수(50),손절틱수(50),진입횟수(3),N(5); input : 작은이평(5),큰이평(20); var : entry(0),cnt(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 abs(O[1]-C[2]) > 0 and C < O and abs(O-C[1]) > 0 Then { Sell(); cnt = 0; } if VAR1 < Var2 and MarketPosition == 0 and entry < 진입횟수 and C[1] > O[1] and abs(O[1]-C[2]) > 0 and C > O and abs(O-C[1]) > 0 Then { Buy(); cnt = 0; } if MarketPosition == 1 and BarsSinceEntry == 1 and C < O and cnt < N Then { cnt = cnt+1; Sell("bs"); } if MarketPosition == -1 and BarsSinceEntry == -1 and C > O and cnt < N Then { cnt = cnt+1; Buy("sb"); } SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop);