커뮤니티

부탁드립니다.

프로필 이미지
물고기
2020-04-03 10:17:07
386
글번호 137496
답변완료
// --- settings //FastLen = 38 //SlowLen = 120 //Length = 20 //StDv = 1.1 // --- end of settings bbMacd = average[FastLen,1]-average[SlowLen,1] avg = average[Length,1](bbMacd) sDev = std[Length](bbMacd) UpperBand = avg+(StDv*sDev) LowerBand = avg-(StDv*sDev) if bbMacd>bbMacd[1] then r=0 b=205 else r=255 b=0 endif drawtext("●",barindex,bbMacd,Dialog,Bold,3) coloured(r,0,b) return UpperBand coloured(0,0,205) style(line), LowerBand coloured(255,0,0) style (line) 변환 부탁드립니다. 감사합니다.
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-04-03 19:53:30

안녕하세요 예스스탁입니다. input : FastLen(38),SlowLen(120),Length(20),stdv(1.1); var : bbmacd(0),avgv(0),sdev(0),UpperBand(0),LowerBand(0),r(0),b(0); bbMacd = ma(c,FastLen)-ma(C,SlowLen); avgv = ma(bbmacd,Length); sDev = std(bbmacd,Length); UpperBand = avgv+(StDv*sDev); LowerBand = avgv-(StDv*sDev); if bbMacd>bbMacd[1] then { r=0; b=205; } else { r=255; b=0; } plot1(bbmacd,"bbmacd",rgb(r,0,b)); plot2(UpperBand,"UpperBand",rgb(0,0,205)); plot3(LowerBand,"LowerBand",rgb(255,0,0)); 즐거운 하루되세요 > 물고기 님이 쓴 글입니다. > 제목 : 부탁드립니다. > // --- settings //FastLen = 38 //SlowLen = 120 //Length = 20 //StDv = 1.1 // --- end of settings bbMacd = average[FastLen,1]-average[SlowLen,1] avg = average[Length,1](bbMacd) sDev = std[Length](bbMacd) UpperBand = avg+(StDv*sDev) LowerBand = avg-(StDv*sDev) if bbMacd>bbMacd[1] then r=0 b=205 else r=255 b=0 endif drawtext("●",barindex,bbMacd,Dialog,Bold,3) coloured(r,0,b) return UpperBand coloured(0,0,205) style(line), LowerBand coloured(255,0,0) style (line) 변환 부탁드립니다. 감사합니다.