커뮤니티

수식좀 수정바랍니다.

프로필 이미지
바닥차기
2017-02-03 18:13:38
111
글번호 106520
답변완료
안녕하세요. 수식 두가지를 한가지로 통합좀 부탁합니다. 해선이고 17--02시 까지 매매합니다. 1.2번수식 각각 신호가 나오면 됩니다(and 가 아닌 or) 수고하십시요. 1. input : p1(20),p2(100); var : Tcond(false); if stime == 170000 or (stime > 170000 and stime[1] < 170000) Then Tcond = true; if stime == 020000 or (stime > 020000 and stime[1] < 020000) Then{ Tcond = false; if MarketPosition == 1 Then ExitLong(); if MarketPosition == -1 Then ExitShort(); } var1 = ma(c,p1); var2 = ma(c,P2); if Tcond == true then{ if var1 > var1[1] and var2 > var2[1] and var1 >= var2 and ( c[1] < ma(c[1],5) and c > O) Then buy(); if var1 < var1[1] and var2 < var2[1] and var1 <= var2 and (c[1] >ma(c[1],5) and c < O) Then Sell();} 2 input : 분간격(60),P(5); var : S1(0),D1(0),TM(0),TF(0),cnt(0); var : sum(0),mav(0); Array : CC[100](0); if Bdate != Bdate[1] Then{ S1 = TimeToMinutes(stime); D1 = Bdate; } if sdate == D1 Then TM = TimeToMinutes(stime)-S1; Else TM = TimeToMinutes(stime)+1440-S1; if D1 > 0 then{ TF = TM%분간격; if Bdate != Bdate or (Bdate == Bdate and TF < TF[1]) Then{ for cnt = 1 to 99{ CC[cnt] = CC[cnt-1][1]; } if C[1] > mav[1] and mav[1] > 0 and (stime >= 170000 or stime < 020000) Then buy(); if C[1] < mav[1] and mav[1] > 0 and (stime >= 170000 or stime < 020000) Then sell(); } CC[0] = C; if CC[P] > 0 then{ sum = 0; for cnt = 0 to P-1{ sum = sum + CC[cnt]; } mav = sum/P; } } SetStopProfittarget(PriceScale*30,PointStop); SetStopLoss(PriceScale*15,PointStop); SetStopTrailing(PriceScale*24,PriceScale*28,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-02-06 08:58:52

안녕하세요 예스스탁입니다. input : p1(20),p2(100); var : Tcond(false); input : 분간격(60),P(5); var : S1(0),D1(0),TM(0),TF(0),cnt(0); var : sum(0),mav(0); Array : CC[100](0); if stime == 170000 or (stime > 170000 and stime[1] < 170000) Then Tcond = true; if stime == 020000 or (stime > 020000 and stime[1] < 020000) Then{ Tcond = false; if MarketPosition == 1 Then ExitLong(); if MarketPosition == -1 Then ExitShort(); } var1 = ma(c,p1); var2 = ma(c,P2); if Tcond == true then{ if var1 > var1[1] and var2 > var2[1] and var1 >= var2 and ( c[1] < ma(c[1],5) and c > O) Then buy(); if var1 < var1[1] and var2 < var2[1] and var1 <= var2 and (c[1] >ma(c[1],5) and c < O) Then Sell(); } if Bdate != Bdate[1] Then{ S1 = TimeToMinutes(stime); D1 = Bdate; } if sdate == D1 Then TM = TimeToMinutes(stime)-S1; Else TM = TimeToMinutes(stime)+1440-S1; if D1 > 0 then{ TF = TM%분간격; if Bdate != Bdate or (Bdate == Bdate and TF < TF[1]) Then{ for cnt = 1 to 99{ CC[cnt] = CC[cnt-1][1]; } if C[1] > mav[1] and mav[1] > 0 and Tcond == true Then buy(); if C[1] < mav[1] and mav[1] > 0 and Tcond == true Then sell(); } CC[0] = C; if CC[P] > 0 then{ sum = 0; for cnt = 0 to P-1{ sum = sum + CC[cnt]; } mav = sum/P; } } SetStopProfittarget(PriceScale*30,PointStop); SetStopLoss(PriceScale*15,PointStop); SetStopTrailing(PriceScale*24,PriceScale*28,PointStop); 즐거운 하루되세요 > 바닥차기 님이 쓴 글입니다. > 제목 : 수식좀 수정바랍니다. > 안녕하세요. 수식 두가지를 한가지로 통합좀 부탁합니다. 해선이고 17--02시 까지 매매합니다. 1.2번수식 각각 신호가 나오면 됩니다(and 가 아닌 or) 수고하십시요. 1. input : p1(20),p2(100); var : Tcond(false); if stime == 170000 or (stime > 170000 and stime[1] < 170000) Then Tcond = true; if stime == 020000 or (stime > 020000 and stime[1] < 020000) Then{ Tcond = false; if MarketPosition == 1 Then ExitLong(); if MarketPosition == -1 Then ExitShort(); } var1 = ma(c,p1); var2 = ma(c,P2); if Tcond == true then{ if var1 > var1[1] and var2 > var2[1] and var1 >= var2 and ( c[1] < ma(c[1],5) and c > O) Then buy(); if var1 < var1[1] and var2 < var2[1] and var1 <= var2 and (c[1] >ma(c[1],5) and c < O) Then Sell();} 2 input : 분간격(60),P(5); var : S1(0),D1(0),TM(0),TF(0),cnt(0); var : sum(0),mav(0); Array : CC[100](0); if Bdate != Bdate[1] Then{ S1 = TimeToMinutes(stime); D1 = Bdate; } if sdate == D1 Then TM = TimeToMinutes(stime)-S1; Else TM = TimeToMinutes(stime)+1440-S1; if D1 > 0 then{ TF = TM%분간격; if Bdate != Bdate or (Bdate == Bdate and TF < TF[1]) Then{ for cnt = 1 to 99{ CC[cnt] = CC[cnt-1][1]; } if C[1] > mav[1] and mav[1] > 0 and (stime >= 170000 or stime < 020000) Then buy(); if C[1] < mav[1] and mav[1] > 0 and (stime >= 170000 or stime < 020000) Then sell(); } CC[0] = C; if CC[P] > 0 then{ sum = 0; for cnt = 0 to P-1{ sum = sum + CC[cnt]; } mav = sum/P; } } SetStopProfittarget(PriceScale*30,PointStop); SetStopLoss(PriceScale*15,PointStop); SetStopTrailing(PriceScale*24,PriceScale*28,PointStop);