Skip to main content

Wave Indicator for Amibroker (AFL)

nicotan78 over 16 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 6)
  • Tags:
    trading system, amibroker, zigzag

This indicator can tell you where the best level to buy or sell.

Screenshots

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("wave");
SetChartOptions(1, chartShowDates);   

pr = Param("ZZ", 5, 1, 100);
 
EWpk = PeakBars(H, pr, 1) == 0;
EWtr = TroughBars(L, pr, 1) == 0;

zz = Zig(C, pr);
zzHi = Zig(H, pr);
zzLo = Zig(L, pr);
Avg = (zzHi+zzLo)/2;

RetroSuccessSecret = IIf(EWpk, zzHi, IIf(EWtr, zzLo, IIf(Avg > Ref(Avg,-1), H, L)));
EW = Zig(RetroSuccessSecret, pr);
Plot(C, "Close", colorBlack, styleCandle);
Plot(EW, "wave", colorBlue, styleThick);

Buy = TroughBars(EW, pr, 1) == 0;
Sell = PeakBars(EW, pr, 1) ==0;
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);
PlotShapes( shapeUpArrow * Buy, colorGreen, 0, Low );
PlotShapes( shapeDownArrow * Sell, colorRed, 0, High );


_SECTION_END();

3 comments

over 16 years ago

A warning to everyone this indicator uses ZigZag so the result going forward are not reproducible.

over 15 years ago

Hello Nicotan, your indicator is good, It would be more better if u try to add a trailing stop-loss & set target points to it..cheers!!!

Leave Comment

Please login here to leave a comment.