Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

ZIG-ZAG for Amibroker (AFL)

Rating:
5 / 5 (Votes 1)
Tags:

ZIG-ZAG Formula for swing trade

Screenshots

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("ZIG ZAG");
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, "ZIG ZAG", 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();

0 comments

Leave Comment

Please login here to leave a comment.

Back