Price Swing Formula for Amiibroker

#1
Dear memebers
Can anybody give me the formula of price swing. The swing should be from High to Low and not the close price. Iris software has this function which is
very useful.
For reference I am attaching a Iris chart.
In the following Zig Indicator formula High?low point is there but when I plot it on the price chart, it defaces everything. Can anyone rectify this formula. If Plot a line function is inserted in the following formula, the purpose is solved.

adjz = Param("Zig",10,0,15.0,.1);
adjc = Param("Back",0,0,BarCount,1);
CAdj = Ref(Close,-adjc);
Graph1 = CAdj;
Graph0 = Zig( CAdj, adjz );
 

Attachments

Similar threads