Another Trend Following Indicator under my observation other than NMA Swing Trading is Rainbow Oscillator
The Rainbow Charts and Rainbow Oscillator indicators were created by Mel Widner, Ph.D. and originally introduced in the July 1997 issue of Stocks and Commodities magazine.
The Rainbow Oscillator is a trend-following indicator .The Rainbow Oscillator is derived from a consensus of the Rainbow Charts trends. It defines the highest high and lowest low of those moving averages to create an oscillator and bandwidth lines based on those calculations.Rainbow Charts uses 2-period simple moving average. Recursive smoothing is then applied to the original moving average thereby creating 9additional moving averages; each new moving average is based on the previous moving average. Rainbow Oscillator is applied to Nifty Charts. And to Simply Understand the chart Blue lines between the Rainbow Band indicates upper trend and the Red lines between the Rainbow Band Indicates negative trend.
AFL Code for Rainbow Oscillator
_SECTION_BEGIN(“Rainbow Oscillator”);
/* Rainbow Oscillator */
/* July 1997 TASC Traders Tips*/
/* Coded by Anthony Faragasso */MaxGraph =16;
avg1= Max (MA(C,2),
Max (MA(MA(C,2),2),
Max (MA(MA(MA(C,2),2),2),
Max (MA(MA(MA(MA(C,2),2),2),2),
Max(MA(MA(MA(MA(MA(C,2),2),2),2),2),
Max(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),
Max(MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),2),
Max(MA(MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),2),2),
Max(MA(MA(MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),2),2),2),MA(MA(MA(MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),2),2),2),2))))))))));;;;;;;;;
avg2 = Min(MA(C,2),
Min(MA(MA(C,2),2),
Min(MA(MA(MA(C,2),2),2),
Min(MA(MA(MA(MA(C,2),2),2),2),
Min(MA(MA(MA(MA(MA(C,2),2),2),2),2),
Min(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),
Min(MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),2),
Min(MA(MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),2),2),
Min(MA(MA(MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),2),2),2),MA(MA(MA(MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),2),2),2),2))))))))));;;;;;;;;;
/* Rainbow Oscillator */
Graph0 = 100 * (Close – ((MA(C,2)+
MA(MA(C,2),2)+
MA(MA(MA(C,2),2),2) + MA(MA(MA(MA(C,2),2),2),2) +
MA(MA(MA(MA(MA(C,2),2),2),2),2) +
MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2) +
MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),2)+
MA(MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),2),2)+
MA(MA(MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),2),2),2)+MA(MA(MA(MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),2),2),2),2))
/10))/(HHV(C,10)-LLV(C,10));/* Lower Rainbow Band */
Graph1 = -100 *( avg1 – avg2) /
(HHV(C,10) – LLV(C,10));/* Upper Rainbow Band */
Graph2 = 100 * (avg1 – avg2) /
(HHV(C,10) – LLV(C,10));Graph0Style = 3;
Graph2Style = Graph1Style = 1;
Graph2Color = Graph1Color =3;
Graph3 = 0;
Graph3Color =8;downbar =Graph0 <Ref( Graph3,-1);
upbar = Graph0 > Ref(Graph3,-1);
barcolor = IIf( downbar,4, IIf( upbar, 6, 0 ) );
Graph0BarColor = ValueWhen( barcolor != 0, barcolor );Title = Name() +” Rainbow Oscillator : “+WriteVal(Graph0,format=1.2) +” % “;
_SECTION_END();
dear raji appears it is the combination of Elder bull ray and bear ray indicator
@mahisRainbow Oscillator uses Recusive moving average technique to for optimization which is missing in Elder Bull ray and Bear ray. Its compleletly different in producing signals
When put this AFL–there is some error:ERROR-29:Variable UPBAR used without being initialized–How can I correct it ?(AMI-4.80.2 PROF)
Error 31
syntex error, expecting’)’or
@tauhid… Which version are you using… It works find with my 5.25 version
ya
may be syntax error
Sir Waiting for Three White Shoulders and Three Black Crows Patterns and understanding……….. coz u r the perfect roll model for technical