McClellan Oscillator – Ratio Adjusted

I got tired of heading over to other sites to see the McClellan Oscillator so I coded this one up. The only rub appears to be a TOS data issue in that this study needs to be plotted on a daily chart of a market internal such as $TICK, $UVOL, etc. If you try to plot it on an equity or future, the line is no longer correct.

McClellan Oscillator - Ratio Adjusted

McClellan Oscillator - Ratio Adjusted

# TS_McClellanOscillator
# (c) 2009 http://www.thinkscripter.com
# thinkscripter@gmail.com
# Last Update 14 May 2009
#
# **** NOTE: This indicator must be run on a chart
# **** of a market internal such as $TICK to work properly

declare lower;

def EMA19 = expAverage(1000*(close("$ADVN") -close("$DECN")/(close("$ADVN")+close("$DECN"))),19);
def EMA39 = expAverage(1000*(close("$ADVN") -close("$DECN")/(close("$ADVN")+close("$DECN"))),39);

plot MCO = EMA19-EMA39;
MCO.setDefaultColor(color.red);
plot zero= 0;
zero.setDefaultColor(color.white);
This entry was posted in Indicator and tagged , , . Bookmark the permalink.

One Response to McClellan Oscillator – Ratio Adjusted

  1. RappidFyre says:

    Nice job Eric,

    You and I appear to be in the same book and on the same page when is comes to sifting through and porting specific data points.

    Knowing the affiliation between TOS and the CME, I’m surprised and slightly miffed that the data feed to pull the Equity Big Futures contract Data down is non existent. The same sentiment applies to being unable to pull data directly down from the CFTC in regards to the COT, as well as being able to incorporate T/S data into the scripting module.

    I know what you mean about scouting elsewhere for data sources in specific internal / economic indicators / data points that TOS just can’t deliver correctly or even at all. (IMO. it’s still left to be seen if TOS will trek the extra distance to see that it delivers on such data specifics in the near future) – (I’m packing a snorkel and a yo-yo)

    Keep up the great work!
    Peace-

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>