Pseudorandom

McClellan Osci

363 0 68
Based on the description in Murphy, Tech. Analysis of Financial Markets. Wikipeadia also has a good description:
https://en.wikipedia.org/wiki/McClellan_oscillator
Without warranty - please trade based on your own analysis and let me know if you find any errors in the script.
Remove from Favorite Scripts Add to Favorite Scripts
study(title = "McClellan Osci", shorttitle="MCO")
sym(s) => security(s, period, close)
difference2 = sym("ADVN") - sym("DECN")
advnema19 = ema(difference2, 19)
advnema39 = ema(difference2, 39)
osci = advnema19-advnema39
maout = cum(osci)
plot(osci)
band1 = hline(100)
band0 = hline(-100)
fill(band1, band0) 
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out