![CMO on Array](http://amibrokerchart.com/wp-content/uploads/2023/11/CMO-on-Array.png)
CMO on Array
Traders can use Amibroker AFL and Amibroker Data Feeder to apply the Chande Momentum Oscillator (CMO) on an array of data points. This technique allows for in-depth analysis of price momentum across various timeframes, helping traders make more accurate and well-informed trading decisions.
_SECTION_BEGIN("CMO on Array"); P = ParamField("Price field",-1); PL = Param("Periods",14,4,45,1); UpDay = Sum((P-Ref(P,-1))*(P>Ref(P,-1)),PL); DownDay = Sum((Ref(P,-1)-P)*(P<Ref(P,-1)),PL); ChMomOcs = 100 * ((UpDay-DownDay)/(UpDay+DownDay)); Plot(ChMomOcs,"CMO("+PL+")", ParamColor( "Color", colorCycle ), ParamStyle("Style") ); Plot(EMA( ChMomOcs,9),"", colorLightBlue); PlotGrid(50, colorLightGrey); PlotGrid(0, colorLightGrey); PlotGrid(-50, colorLightGrey); _SECTION_END();