Following is the AFL code for McClellan Breadth Oscillator -
_SECTION_BEGIN("McClellan Oscillator");
Aux1 = AdvIssues();
Aux2 = DecIssues();
X = IIf(Aux1!=Aux2, Aux1-Aux2, Null);
Y = IIf(Aux1!=Aux2, Aux1+Aux2, Null);
ratio = X/Y;
Value = EMA(ratio,19)-EMA(ratio,39);
McClellanOsc = Value*1000;
Plot( McClellanOsc,"McClellan Oscillator", color= IIf(McClellanOsc>0,colorGreen,colorRed), styleHistogram|styleThick);
_SECTION_END();
How can I use it for Nifty 50? How should I add all 50 constituents of Nifty 50 along with their respective weightage in this code? Please hep.