Quote from Anekdoten:
Attached please find TS/MC/etc Three Bar Reversal Paintbar ELD using high or low not close.
Anek
For those using Amibroker I coded the n bar reversal, posted by Anek.
You can select in the parameters dialog window, the number of bars to calculate for the reversal from 2 to 50.
You can also select the value(close, high, low etc,) to calculate the reversal up and reversal down
for "advanced" users
You can also choose to show bars painted or arrows for the signal, you need to uncomment the code that's commented now and comment the code for the arrows.
here is the code in txt
P = ParamField( "Price field Reversal UP",field = 1 );
P2 = ParamField( "Price field Reversal DOWN", field = 2 );
n= Param("No. of Bars",3,2,50,1);
TrendUp = P > Ref(HHV(H,n),-1);
TrendDn = P2 < Ref(LLV(L,n),-1);
/*TrendUp = ExRem(TrendUp,TrendDn);
TrendDn = ExRem(TrendDn,TrendUp);
PlotShapes(TrendUp*shapeUpArrow,colorGreen);
PlotShapes(TrendDn*shapeDownArrow,colorRed);*/
Plot(C,"Close",IIf(TrendUp, colorGreen, IIf(TrendDn,colorRed,colorBlack)),styleCandle);
attached you'll find the AFL code, enjoy