Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=4
- study(title="CMO", shorttitle="ChandeMO", format=format.price, precision=2, resolution="")
- length = input(10, minval=1)
- src = input(close, "Source", type = input.source)
- momm = change(src)
- f1(m) => m >= 0.0 ? m : 0.0
- f2(m) => m >= 0.0 ? 0.0 : -m
- m1 = f1(momm)
- m2 = f2(momm)
- sm1 = sum(m1, length)
- sm2 = sum(m2, length)
- percent(nom, div) => 100 * nom / div
- chandeMO = percent(sm1-sm2, sm1+sm2)
- plot(chandeMO, "Chande MO", color=#2962FF)
- hline(25, color=#787B86, linestyle=hline.style_dashed, title="Over Bought")
- hline(-25,color=#787B86, linestyle=hline.style_dashed, title="Over sold")
- hline(0, color=#787B86, linestyle=hline.style_dashed, title="zero line")
Advertisement
Add Comment
Please, Sign In to add comment