커뮤니티

분봉차트에서 일봉 이평선을 필터로 사용식

프로필 이미지
theogo66
2018-05-04 14:54:42
117
글번호 118693
답변완료
분봉차트에 적용하고 있는 아래 수식을 일봉 X일이평선 위에 있을 경우에만 매수 하는 식으로 부탁드립니다. - 아 래 - input: period(20),nsd(2.0); vars: maV(0), bandup(0), banddn(0); maV = ma(close,period); bandup = BollBandUp(period,nsd); banddn = BollBandDown(period,nsd); if CrossuP(close , bandup) then Buy(); if CrossDown(close , banddn) then Sell(); if marketposition > 0 and CrossDown(close , maV) then exitlong(); if marketposition < 0 and CrossUp(close , maV) then exitshort(); 감사합니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-05-04 15:31:55

안녕하세요 예스스탁입니다. input: period(20),nsd(2.0); input : P(20); vars: maV(0), bandup(0), banddn(0); var : cnt(0),sumV(0),dmav(0); sumV = 0; for cnt = 0 to P-1 { sumV = sumV+DayClose(cnt); } dmaV = sumV/P; maV = ma(close,period); bandup = BollBandUp(period,nsd); banddn = BollBandDown(period,nsd); if CrossuP(close , bandup) then { if C > Dmav then Buy(); Else ExitShort(); } if CrossDown(close , banddn) then { if C < Dmav Then Sell(); Else ExitLong(); } if marketposition > 0 and CrossDown(close , maV) then exitlong(); if marketposition < 0 and CrossUp(close , maV) then exitshort(); 즐거운 하루되세요 > theogo66 님이 쓴 글입니다. > 제목 : 분봉차트에서 일봉 이평선을 필터로 사용식 > 분봉차트에 적용하고 있는 아래 수식을 일봉 X일이평선 위에 있을 경우에만 매수 하는 식으로 부탁드립니다. - 아 래 - input: period(20),nsd(2.0); vars: maV(0), bandup(0), banddn(0); maV = ma(close,period); bandup = BollBandUp(period,nsd); banddn = BollBandDown(period,nsd); if CrossuP(close , bandup) then Buy(); if CrossDown(close , banddn) then Sell(); if marketposition > 0 and CrossDown(close , maV) then exitlong(); if marketposition < 0 and CrossUp(close , maV) then exitshort(); 감사합니다.