Mclennan Oscillator

Hello… Can you check out if it is possible to add the McLellan Oscillator to the Optima toolbox? The formula is as follows:

cheers
KM

The Formula for the McClellan Oscillator is
There are two formulas for the McClellan oscillator. The original formula, and one that adjusts for changes in the number of stocks listed on the stock exchange. The adjusted formula allows for a better comparison of values over longer periods of time.2

McClellan Oscillator=(19-day EMA of Advances−Declines)−(39-day EMAof Advances−Declines)19-day EMA=(Current Day Advances−Declines)∗0.10+Prior Day EMA39-day EMA=(Current Day Advances−Declines)∗0.05+Prior Day EMAAdj. McClellan Oscillator=(19-Day EMA of ANA)−(39-Day EMA of ANA)Adj. Net Advances (ANA)=Advances−DeclinesAdvances+Declines19-day EMA=(Current Day ANA−Prior Day EMA∗0.10+Prior Day EMA39-day EMA=(Current Day ANA−Prior Day EMA)∗0.05+Prior Day EMA\begin{aligned} \text{McClellan Oscillator} =& ( \text{19-day EMA of Advances} - \ &\text{Declines} ) - ( \text{39-day EMA} \ &\text{of Advances} - \text{Declines} ) \ \text{19-day EMA} =& ( \text{Current Day Advances} - \ &\text{Declines} ) * 0.10 + \ &\text{Prior Day EMA} \ \text{39-day EMA} =& ( \text{Current Day Advances} - \ &\text{Declines} ) *0.05 + \ &\text{Prior Day EMA} \ \ \text{Adj. McClellan Oscillator} =& ( \text{19-Day EMA of ANA} ) - \ &( \text{39-Day EMA of ANA} ) \ \text{Adj. Net Advances (ANA)} =& \frac{\text{Advances} - \text{Declines}}{\text{Advances} + \text{Declines}}\ \text{19-day EMA} =& ( \text{Current Day ANA} - \ &\text{Prior Day EMA} * 0.10 \ &+ \text{Prior Day EMA} \ \text{39-day EMA} =& ( \text{Current Day ANA} - \ &\text{Prior Day EMA} ) * 0.05 \ &+ \text{Prior Day EMA} \ \end{aligned}McClellan Oscillator=19-day EMA=39-day EMA=Adj. McClellan Oscillator=Adj. Net Advances (ANA)=19-day EMA=39-day EMA=​(19-day EMA of Advances−Declines)−(39-day EMAof Advances−Declines)(Current Day Advances−Declines)∗0.10+Prior Day EMA(Current Day Advances−Declines)∗0.05+Prior Day EMA(19-Day EMA of ANA)−(39-Day EMA of ANA)Advances+Declines

Advances−Declines​(Current Day ANA−Prior Day EMA∗0.10+Prior Day EMA(Current Day ANA−Prior Day EMA)∗0.05+Prior Day EMA​

Hi Keith,

We’re looking to add it to our breadth data in the near future, but in the meantime you can create it using the script formula in this post:

https://forum.optuma.com/topic/scripting-example-mcclellan-oscillator/