커뮤니티

거래 신호가 안잡혀요..

프로필 이미지
고릴라
2009-06-25 16:29:53
841
글번호 23052
답변완료
안녕하세요 관리자님... 볼린져 밴드와 보조지표 두개를 이용한 현물용 분봉진입 수식입니다. 그런데 3년치 시물레이션을 거쳐보았으나 전혀 거래신호가 나타나지 않는군요.. 무엇이 잘못됐는지 지적 부탁드립니다. #외부변수선언 input : Bperiod(20),multid(2),Rperiod(14),period(9),shortperiod(12),longperiod(26); #내부변수선언 var : mav(0),BBup(0),BBdn(0),RSI(0),MACD_OSC(0),MACD(0); #변수대입 mav = ma(c,Bperiod); BBup = BollBandUp(Bperiod,multid); BBdn = BollBandDown(Bperiod,multid); RSI = RSI(Rperiod); MACD_OSC = value3-value4; MACD = macd(shortperiod,longperiod); # 진입제한시간적용(매수) if stime>=090000 and stime<=143000 then { # 조건진입 if crossup(c,BBup) and crossup(RSI,70) and crossup(MACD_OSC,0) and MACD > MACD[1] and ema(MACD,9) > ema(MACD,9)[1] and MACD > ema(MACD,9) Then buy(); } #3분봉에서= *주가가 볼린져밴드 상단을 하향돌파시 청산 if CrossDown(C,BollBandDown(20,2)) Then exitlong(); #3분봉에서= *주가가 5이평선을 하향 이탈시 청산 if CrossDown(c,ma(c,5)) Then exitlong(); #강제청산적용= *14시 50분 이내 SetStopEndofday(145000);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2009-06-25 17:22:24

안녕하세요 예스스탁입니다. MACD_OSC = value3-value4; 와 같이 할당하셨는데 수식에 VALUE3과 VALUE4가 없습니다. 그러므로 MACD_OSC은 항상 0입니다. 수정한 식입니다. #외부변수선언 input : Bperiod(20),multid(2),Rperiod(14),period(9),shortperiod(12),longperiod(26); #내부변수선언 var : mav(0),BBup(0),BBdn(0),RSI(0),MACDOSC(0),MACD(0); #변수대입 mav = ma(c,Bperiod); BBup = BollBandUp(Bperiod,multid); BBdn = BollBandDown(Bperiod,multid); RSI = RSI(Rperiod); MACDOSC = macd_osc(shortperiod,longperiod,period); MACD = macd(shortperiod,longperiod); # 진입제한시간적용(매수) if stime>=090000 and stime<=143000 then { # 조건진입 if crossup(c,BBup) and crossup(RSI,70) and crossup(MACDOSC,0) and MACD > MACD[1] and ema(MACD,9) > ema(MACD,9)[1] and MACD > ema(MACD,9) Then buy(); } #3분봉에서= *주가가 볼린져밴드 상단을 하향돌파시 청산 if CrossDown(C,BollBandDown(20,2)) Then exitlong(); #3분봉에서= *주가가 5이평선을 하향 이탈시 청산 if CrossDown(c,ma(c,5)) Then exitlong(); #강제청산적용= *14시 50분 이내 SetStopEndofday(145000); 즐거운 하루되세요 > 고릴라 님이 쓴 글입니다. > 제목 : 거래 신호가 안잡혀요.. > 안녕하세요 관리자님... 볼린져 밴드와 보조지표 두개를 이용한 현물용 분봉진입 수식입니다. 그런데 3년치 시물레이션을 거쳐보았으나 전혀 거래신호가 나타나지 않는군요.. 무엇이 잘못됐는지 지적 부탁드립니다. #외부변수선언 input : Bperiod(20),multid(2),Rperiod(14),period(9),shortperiod(12),longperiod(26); #내부변수선언 var : mav(0),BBup(0),BBdn(0),RSI(0),MACD_OSC(0),MACD(0); #변수대입 mav = ma(c,Bperiod); BBup = BollBandUp(Bperiod,multid); BBdn = BollBandDown(Bperiod,multid); RSI = RSI(Rperiod); MACD_OSC = value3-value4; MACD = macd(shortperiod,longperiod); # 진입제한시간적용(매수) if stime>=090000 and stime<=143000 then { # 조건진입 if crossup(c,BBup) and crossup(RSI,70) and crossup(MACD_OSC,0) and MACD > MACD[1] and ema(MACD,9) > ema(MACD,9)[1] and MACD > ema(MACD,9) Then buy(); } #3분봉에서= *주가가 볼린져밴드 상단을 하향돌파시 청산 if CrossDown(C,BollBandDown(20,2)) Then exitlong(); #3분봉에서= *주가가 5이평선을 하향 이탈시 청산 if CrossDown(c,ma(c,5)) Then exitlong(); #강제청산적용= *14시 50분 이내 SetStopEndofday(145000);