커뮤니티

수식 추가 부탁 드립니다

프로필 이미지
뎅이요
2019-06-04 05:08:28
262
글번호 129163
답변완료
아래수식에서 2가지를 추가 해주시기바랍니다. 1. 매수진입시간 시작 오전 9시에서 starttime(90100) 매수진입 종료시간을 오후 3시(150000)까지만 진입이 되도록 추가 부탁 드립니다 2. 매수진입식에&nbsp;추가 if&nbsp;3.0&nbsp;>=&nbsp;C&nbsp;and&nbsp;C&nbsp;<=&nbsp;1.0&nbsp;and&nbsp;매수진입조건&nbsp;Then &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;buy(); 아래수식에 추가부탁드립니다 3. stoploss 질문입니다 시스템 설정 창에서 강제청산 10틱 청산시점 조건 만족시 즉시 설정한것과 수식에서 설정한 10틱 스탑 설정한것은 어떤 차이가 있습니까? input : starttime(90100),endtime(151500); var : Tcond(false); if (sdate != sdate[1] and stime >= starttime) or (sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then { Tcond = true; } if (sdate != sdate[1] and stime >= endtime) or (sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then { Tcond = false; if MarketPosition == 1 Then ExitLong("bx"); if MarketPosition == -1 Then ExitShort("sx"); } if Tcond == true then { var : TickSize(0), SP(0); Ticksize = pricescale; SP = MarketPosition; input : bolP(20), bolSTD(2); Vars : bolM(0), bolUP(0), bolDN(0); bolM = ma(C, bolP); bolUP = bolM + bolSTD * StD(C, bolP); bolDN = bolM - bolSTD * Std(C, bolP); input : short1(20),short2(60); var : v1(0),v2(0),cond1(false); v1 = ma(C,short1); v2 = ma(C,short2); IF v2 > v1 Then cond1 = False; Else cond1 = True; IF SP == 0 And bolUP > 0 And bolDN > 0 Then Begin If bolUP > 0 and cond1 Then Buy("B", atlimit, bolUP); End; }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-06-04 16:50:22

안녕하세요 예스스탁입니다. stoploss는 설정창에서 강제청산으로 지정하시거나 수식안에서 Setstoploss 함수로 지정하는 것과 다른부분이 없습니다. input : starttime(90000),endtime(150000); input : short1(20),short2(60); input : bolP(20), bolSTD(2); var : Tcond(false); var : TickSize(0), SP(0); var : v1(0),v2(0),cond1(false); Vars : bolM(0), bolUP(0), bolDN(0); if (sdate != sdate[1] and stime >= starttime) or (sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then { Tcond = true; } if (sdate != sdate[1] and stime >= endtime) or (sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then { Tcond = false; if MarketPosition == 1 Then ExitLong("bx"); if MarketPosition == -1 Then ExitShort("sx"); } Ticksize = pricescale; SP = MarketPosition; bolM = ma(C, bolP); bolUP = bolM + bolSTD * StD(C, bolP); bolDN = bolM - bolSTD * Std(C, bolP); v1 = ma(C,short1); v2 = ma(C,short2); IF v2 > v1 Then cond1 = False; Else cond1 = True; if Tcond == true then { IF SP == 0 And bolUP > 0 And bolDN > 0 and 3.0 >= C and C >= 1.0 and bolUP > 0 and cond1 Then Buy("B", atlimit, bolUP); } 즐거운 하루되세요 > 뎅이요 님이 쓴 글입니다. > 제목 : 수식 추가 부탁 드립니다 > 아래수식에서 2가지를 추가 해주시기바랍니다. 1. 매수진입시간 시작 오전 9시에서 starttime(90100) 매수진입 종료시간을 오후 3시(150000)까지만 진입이 되도록 추가 부탁 드립니다 2. 매수진입식에&#160;추가 if&#160;3.0&#160;>=&#160;C&#160;and&#160;C&#160;<=&#160;1.0&#160;and&#160;매수진입조건&#160;Then &#160;&#160;&#160;&#160;&#160;&#160;buy(); 아래수식에 추가부탁드립니다 3. stoploss 질문입니다 시스템 설정 창에서 강제청산 10틱 청산시점 조건 만족시 즉시 설정한것과 수식에서 설정한 10틱 스탑 설정한것은 어떤 차이가 있습니까? input : starttime(90100),endtime(151500); var : Tcond(false); if (sdate != sdate[1] and stime >= starttime) or (sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then { Tcond = true; } if (sdate != sdate[1] and stime >= endtime) or (sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then { Tcond = false; if MarketPosition == 1 Then ExitLong("bx"); if MarketPosition == -1 Then ExitShort("sx"); } if Tcond == true then { var : TickSize(0), SP(0); Ticksize = pricescale; SP = MarketPosition; input : bolP(20), bolSTD(2); Vars : bolM(0), bolUP(0), bolDN(0); bolM = ma(C, bolP); bolUP = bolM + bolSTD * StD(C, bolP); bolDN = bolM - bolSTD * Std(C, bolP); input : short1(20),short2(60); var : v1(0),v2(0),cond1(false); v1 = ma(C,short1); v2 = ma(C,short2); IF v2 > v1 Then cond1 = False; Else cond1 = True; IF SP == 0 And bolUP > 0 And bolDN > 0 Then Begin If bolUP > 0 and cond1 Then Buy("B", atlimit, bolUP); End; }