커뮤니티

수식 부탁 드리겠습니다

프로필 이미지
짱구아빠1234
2016-12-23 16:17:41
136
글번호 105257
답변완료
수고 많으십니다. 수식 부탁드립니다. 예전에 macd기반 스토캐스틱 지표 만들어주셨는데 이 지표도 활용한 시스템식 부탁드립니다. 아래에 만들어주셨던 수식 첨부하겠습니다. 매수 1)단순이평선 20선 > 60선 (외부변수) and 2)스토캐스틱 (20돌파 or 20 이하에서 골든크로스) and 3)macd기반스토캐스틱 15 이하 매수청산 스토캐스틱 (80선이탈 or 80선 이상에서 데드크로스) or 3)macd기반스토캐스틱 95 이탈 매도 1)단순이평선 20선 < 60선 (외부변수) and 2)스토캐스틱 (80이탈 or 80 이상에서 골든크로스) and 3)macd기반스토캐스틱 85 이상 매도청산 스토캐스틱 (20선돌파 or 20선 이하에서 골든크로스) or 3)macd기반스토캐스틱 5 이탈 --------------------- input : short(9),Long(17),sto1(7),sto2(4),sto3(4); var : MACDV(0),HH(0),LL(0),FK(0),sk(0),sd(0); MACDV = MACD(short,long); LL = Lowest(MACDV, sto1); HH = Highest(MACDV, sto1); FK = (MACDV - LL) / (HH - LL) * 100; SK = ema(FK,sto2); SD = ema(SK,sto3); plot1(SK,"slowk"); plot2(SD,"slowd"); PlotBaseLine1(15); PlotBaseLine2(85);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-12-23 16:43:58

안녕하세요 예스스탁입니다. input : short(9),Long(17);//MACD기간변수 input : MACDsto1(7),MACDsto2(4),MACDsto3(4);//MACD스토케스틱 기간변수 input : sto1(10),sto2(5),sto3(5);//일반스토케스틱 기간변수 input : P1(20),P2(60);//단순이평 기간변수 var : MACDV(0),HH(0),LL(0),MACDFastK(0),MACDstok(0),MACDstod(0); var : mav1(0),mav2(0),stok(0),stod(0); #MACD 스토케스틱 MACDV = MACD(short,long); LL = Lowest(MACDV, MACDsto1); HH = Highest(MACDV, MACDsto1); MACDFastK = (MACDV - LL) / (HH - LL) * 100; MACDStoK = ema(MACDFastK,MACDsto2); MACDstoD = ema(MACDStoK,MACDsto3); #단순이평 mav1 = ma(C,P1); mav2 = ma(C,P2); #일반 스토케스틱 stok = StochasticsK(sto1,sto2); stod = StochasticsD(sto1,sto2,sto3); if mav1 > mav2 and (crossup(stok,20) or (crossup(stok,stod) and stok <= 20)) and MACDstok <= 15 Then buy("b"); if MarketPosition == 1 Then{ if(CrossDown(stok,80) or (CrossDown(stok,stod) and stok >= 80)) Then exitlong("bx1"); if CrossDown(MACDstok,95) Then exitlong("bx2"); } if mav1 < mav2 and (CrossDown(stok,80) or (CrossDown(stok,stod) and stok >= 80)) and MACDstok >= 85 Then sell("s"); if MarketPosition == -1 Then{ if(CrossUp(stok,20) or (CrossUp(stok,stod) and stok <= 20)) Then ExitShort("sx1"); if CrossUp(MACDstok,5) Then ExitShort("sx2"); } 즐거운 하루되세요 > 짱구아빠1234 님이 쓴 글입니다. > 제목 : 수식 부탁 드리겠습니다 > 수고 많으십니다. 수식 부탁드립니다. 예전에 macd기반 스토캐스틱 지표 만들어주셨는데 이 지표도 활용한 시스템식 부탁드립니다. 아래에 만들어주셨던 수식 첨부하겠습니다. 매수 1)단순이평선 20선 > 60선 (외부변수) and 2)스토캐스틱 (20돌파 or 20 이하에서 골든크로스) and 3)macd기반스토캐스틱 15 이하 매수청산 스토캐스틱 (80선이탈 or 80선 이상에서 데드크로스) or 3)macd기반스토캐스틱 95 이탈 매도 1)단순이평선 20선 < 60선 (외부변수) and 2)스토캐스틱 (80이탈 or 80 이상에서 골든크로스) and 3)macd기반스토캐스틱 85 이상 매도청산 스토캐스틱 (20선돌파 or 20선 이하에서 골든크로스) or 3)macd기반스토캐스틱 5 이탈 --------------------- input : short(9),Long(17),sto1(7),sto2(4),sto3(4); var : MACDV(0),HH(0),LL(0),FK(0),sk(0),sd(0); MACDV = MACD(short,long); LL = Lowest(MACDV, sto1); HH = Highest(MACDV, sto1); FK = (MACDV - LL) / (HH - LL) * 100; SK = ema(FK,sto2); SD = ema(SK,sto3); plot1(SK,"slowk"); plot2(SD,"slowd"); PlotBaseLine1(15); PlotBaseLine2(85);