RicardoSantos

rs_Chande's Momentum Oscilator - MMA

Chande's Momentum Oscilator, with added MA's for momentum strenght.
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?
study(title="[RS]Chande's Momentum Oscilator - MMA", shorttitle="[RS]CMO-MMA")
// Notes : {
// @author : RicardoSantos
// Chande's Momentum Oscilator:
//
// ((Su - Sd) / (Su + Sd)) * 100
//
//      - Su is the sum of the momentum of up days in the period under analysis
//      - Sd is the sum of the momentum of down days in the period under analysis.
//      - The default period is the last 9 days.
// }

// Input : {
p = input(24, title="Period:")
hl = input(40, title="Overbought:")
ll = input(-40, title="Oversold:")
// }

// Function : {
s = close
Su = sma(close > open ? s - s[1] : 0, p)
Sd = sma(close < open ? abs(s - s[1]) : 0, p)

cmo = ((Su - Sd)/(Su + Sd))*100
ma1 = ema(cmo, 12)
ma2 = ema(ma1, 24)
ma3 = ema(ma2, 48)
// }

// Output : {
// Color Switches :
c0 = cmo > ma1 ? #337e33 : #B44949
c1 = ma1 > cmo ? #bc5a5a : #42a242
c2 = ma2 > cmo ? #a24242 : #5abc5a
c3 = ma3 > cmo ? #7e3333 : #7fcb7f

// Lines :
plot(0, color=black, style=circles)
p1 = plot(hl, color=#9a85b4, style=circles)
p2 = plot(ll, color=#9a85b4, style=circles)
fill(p1,p2, color=#9a85b4, transp=80)

// Chande's MO MA's
plot(cmo, color=c0, style=line, linewidth=2)
plot(ma1, color=c1, style=circles, linewidth=2, join=true)
plot(ma2, color=c2, style=circles, linewidth=2, join=true)
plot(ma3, color=c3, style=circles, linewidth=2, join=true)
// }