커뮤니티

48536 관련 다시 문의드립니다.

프로필 이미지
탄탄시스템
2016-07-06 17:44:35
141
글번호 99818
답변완료
답변주신 수식 Input : Period(12), Period1(5), Period2(5),P1(3),P2(20); var : StoK(0),StoD(0),TT(0),mav1(0),mav2(0); StoK = StochasticsK(Period,Period1); StoD = StochasticsD(Period,Period1,Period2); mav1 = ma(H,P1); mav2 = ma(C,P2); if stok >= 20 and stok <= 80 and crossup(stok,stod) then{ #첫진입 if MarketPosition == 0 Then buy("b",OnClose,def,floor(1000000/C)); #추가진입 - 이전진입후 180분 후 if MarketPosition == 1 Then{ if CurrentContracts > CurrentContracts[1] Then TT = TimeToMinutes(stime); if TimeToMinutes(stime) >= TT+180 and CurrentEntries < 5 and (C >= AvgEntryPrice*1.02 or C <= AvgEntryPrice*0.98) then buy("bb",OnClose,def,floor(1000000/C)); } } if MarketPosition == 1 then{ if mav1 >= mav2*1.05 and stok >= 50 and stok <= 80 and CrossDown(stok,stod) Then exitlong("bx1",OnClose,def,"",floor(CurrentContracts*0.5),1); if mav1 >= mav2*1.08 and stok >= 80 and CrossDown(stok,stod) Then exitlong("bx2"); } 답변주신 수식으로 대입을 했더니 추가매수가 정상적으로 이뤄지고 않고 있습니다. 180분이 지난 시점에서 추가매수 신호가 발생했음에도 매수신호가 발생되지 않고 있습니다. 그리고, 위의 수식을 추가매수할때 평단가대비 +2% ~ -2% 구간은 매수신호를 발생시키지 말라고 되어 있는거 같은데, 제가 원하는 수식은 매도일때입니다. 매도일때 +2% ~ -2%구간에서는 반매도나 전량매도를 발생시키지 말라고 수정부탁드립니다. 기본매수조건에서는 180분 간격으로도 추가매수가 빈번히 발생하고 있는데, 위의 수식을 적용한 신호에서는 추가매수가 좀처럼 발생되지 않고 있습니다. 수고 많으시지만, 부탁드리겠습니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-07-07 10:33:16

안녕하세요 예스스탁입니다. 식을 수정했습니다 Input : Period(12), Period1(5), Period2(5),P1(3),P2(20); var : StoK(0),StoD(0),TT(0),mav1(0),mav2(0); StoK = StochasticsK(Period,Period1); StoD = StochasticsD(Period,Period1,Period2); mav1 = ma(H,P1); mav2 = ma(C,P2); #첫진입 if MarketPosition == 0 and stok >= 20 and stok <= 80 and crossup(stok,stod) Then buy("b",OnClose,def,floor(1000000/C)); #매수진입후 if MarketPosition == 1 Then{ if CurrentContracts > CurrentContracts[1] Then TT = TimeToMinutes(stime); #추가진입 - 이전진입후 180분 후 if stok >= 20 and stok <= 80 and crossup(stok,stod) and TimeToMinutes(stime) >= TT+180 and CurrentEntries < 5 and (C >= AvgEntryPrice*1.02 or C <= AvgEntryPrice*0.98) then buy("bb",OnClose,def,floor(1000000/C)); } if MarketPosition == 1 then{ if mav1 >= mav2*1.05 and stok >= 50 and stok <= 80 and CrossDown(stok,stod) Then exitlong("bx1",OnClose,def,"",floor(CurrentContracts*0.5),1); if mav1 >= mav2*1.08 and stok >= 80 and CrossDown(stok,stod) Then exitlong("bx2"); } 즐거운 하루되세요 > 탄탄시스템 님이 쓴 글입니다. > 제목 : 48536 관련 다시 문의드립니다. > 답변주신 수식 Input : Period(12), Period1(5), Period2(5),P1(3),P2(20); var : StoK(0),StoD(0),TT(0),mav1(0),mav2(0); StoK = StochasticsK(Period,Period1); StoD = StochasticsD(Period,Period1,Period2); mav1 = ma(H,P1); mav2 = ma(C,P2); if stok >= 20 and stok <= 80 and crossup(stok,stod) then{ #첫진입 if MarketPosition == 0 Then buy("b",OnClose,def,floor(1000000/C)); #추가진입 - 이전진입후 180분 후 if MarketPosition == 1 Then{ if CurrentContracts > CurrentContracts[1] Then TT = TimeToMinutes(stime); if TimeToMinutes(stime) >= TT+180 and CurrentEntries < 5 and (C >= AvgEntryPrice*1.02 or C <= AvgEntryPrice*0.98) then buy("bb",OnClose,def,floor(1000000/C)); } } if MarketPosition == 1 then{ if mav1 >= mav2*1.05 and stok >= 50 and stok <= 80 and CrossDown(stok,stod) Then exitlong("bx1",OnClose,def,"",floor(CurrentContracts*0.5),1); if mav1 >= mav2*1.08 and stok >= 80 and CrossDown(stok,stod) Then exitlong("bx2"); } 답변주신 수식으로 대입을 했더니 추가매수가 정상적으로 이뤄지고 않고 있습니다. 180분이 지난 시점에서 추가매수 신호가 발생했음에도 매수신호가 발생되지 않고 있습니다. 그리고, 위의 수식을 추가매수할때 평단가대비 +2% ~ -2% 구간은 매수신호를 발생시키지 말라고 되어 있는거 같은데, 제가 원하는 수식은 매도일때입니다. 매도일때 +2% ~ -2%구간에서는 반매도나 전량매도를 발생시키지 말라고 수정부탁드립니다. 기본매수조건에서는 180분 간격으로도 추가매수가 빈번히 발생하고 있는데, 위의 수식을 적용한 신호에서는 추가매수가 좀처럼 발생되지 않고 있습니다. 수고 많으시지만, 부탁드리겠습니다.