커뮤니티

수식문의

프로필 이미지
정각도원
2017-04-04 07:58:42
188
글번호 108455
답변완료
아래 수식을 문의드립니다 1. 전일포지션 청산 0900~1200는 20/60 이평선크로스 매수/매도 1200~1530은 60/120 이평선크로스 매수/매도 (매수중이면 매도/매수청산부터 적용, 매도중이면 매수/매도청산부터 적용) 2. 이평선 골든크로스 매수, 이 후 . 직전 데드크로스 이후 저점 -1틱 청산 또는 . 데드크로스면 매수청산/신규매도 3. 이평선 크로스가 3회 나오면 4회째는 포지션 청산만 하고 이후 신호중지 4. 이평선 크로스 구간의 진폭이 15틱 이상 2회면 이 후 신호 중지 5. 이평선 크로스 매수신호(봉완성기준) 매5틱 마다 5틱, 10틱, 15틱... 텍스트 표시 감사합니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-04-05 15:59:54

안녕하세요 예스스탁입니다. var : T1(0),UpH1(0),UpL1(0),UpH2(0),UpL2(0); var : T2(0),dnH1(0),dnL1(0),dnH2(0),dnL2(0); var : T(0),entry(0),count(0),rr(0),tx(0); var1 = ma(C,20); var2 = ma(C,60); var3 = ma(C,120); if stime == 090000 or (stime > 090000 and stime[1] < 090000) Then{ T = TotalTrades; count = 0; } if MarketPosition == 0 then entry = TotalTrades-T; Else entry = TotalTrades-T+1; if crossUP(var1,var2) Then{ T1 = 1; UpH1 = H; UpL1 = L; if stime >= 090000 and stime < 120000 Then{ value1 = (dnH1-dnL1)/PriceScale; if value1 >= 15 Then count = count+1; if entry < 3 and count < 2 Then buy("b1"); Else ExitShort("sx1"); } } if CrossDown(var1,var2) Then{ T1 = -1; DnH1 = H; DnL1 = L; if stime >= 090000 and stime < 120000 and count < 2 Then{ value1 = (upH1-upL1)/PriceScale; if value1 >= 15 Then count = count+1; if entry < 3 and count < 2 then sell("s1"); Else ExitLong("bx1"); } } if crossUP(var2,var3) Then{ T2 = 1; UpH2 = H; UpL2 = L; if stime >= 120000 and stime < 153000 and count < 2 Then{ value1 = (dnH2-dnL2)/PriceScale; if value1 >= 15 Then count = count+1; if entry < 3 and count < 2 Then buy("b2"); Else ExitShort("sx2"); } } if CrossDown(var2,var3) Then{ T2 = -1; DnH2 = H; DnL2 = L; if stime >= 120000 and stime < 153000 and count < 2 Then{ value1 = (upH2-upL2)/PriceScale; if value1 >= 15 Then count = count+1; if entry < 3 and count < 2 then sell("s2"); Else ExitLong("bx2"); } } if T1 == 1 Then{ if H > UpH1 Then UpH1 = H; if L < UpL1 Then UpL1 = L; } if T1 == -1 Then{ if H > dnH1 Then dnH1 = H; if L < dnL1 Then dnL1 = L; } if T2 == 1 Then{ if H > UpH2 Then UpH2 = H; if L < UpL2 Then UpL2 = L; } if T2 == -1 Then{ if H > dnH2 Then dnH2 = H; if L < dnL2 Then dnL2 = L; } if MarketPosition == 1 Then{ rr = Floor((highest(H,BarsSinceEntry)-EntryPrice)/(PriceScale*5)); if rr > rr[1] Then{ tx = Text_New(sdate,stime,H,NumToStr(RR*5,0)+"틱"); Text_SetStyle(tx,1,1); } if IsEntryName("b1") == true Then exitlong("bx3",AtStop,dnL1[BarsSinceEntry]-PriceScale*1); if IsEntryName("b2") == true Then exitlong("bx4",AtStop,dnL2[BarsSinceEntry]-PriceScale*1); } if MarketPosition == -1 Then{ rr = Floor((EntryPrice-lowest(L,BarsSinceEntry))/(PriceScale*5)); if rr > rr[1] Then{ tx = Text_New(sdate,stime,H,NumToStr(RR*5,0)+"틱"); Text_SetStyle(tx,1,1); } if IsEntryName("s1") == true Then ExitShort("sx3",AtStop,upH1[BarsSinceEntry]+PriceScale*1); if IsEntryName("s2") == true Then ExitShort("sx4",AtStop,upH2[BarsSinceEntry]+PriceScale*1); } 즐거운 하루되세요 > 정각도원 님이 쓴 글입니다. > 제목 : 수식문의 > 아래 수식을 문의드립니다 1. 전일포지션 청산 0900~1200는 20/60 이평선크로스 매수/매도 1200~1530은 60/120 이평선크로스 매수/매도 (매수중이면 매도/매수청산부터 적용, 매도중이면 매수/매도청산부터 적용) 2. 이평선 골든크로스 매수, 이 후 . 직전 데드크로스 이후 저점 -1틱 청산 또는 . 데드크로스면 매수청산/신규매도 3. 이평선 크로스가 3회 나오면 4회째는 포지션 청산만 하고 이후 신호중지 4. 이평선 크로스 구간의 진폭이 15틱 이상 2회면 이 후 신호 중지 5. 이평선 크로스 매수신호(봉완성기준) 매5틱 마다 5틱, 10틱, 15틱... 텍스트 표시 감사합니다