GT::Indicators::ZigZag
The Zig Zag indicator filters out changes in an underlying plot (e.g., a security's price or another indicator) that are less than a specified amount. The Zig Zag indicator only shows significant changes.
The first argument is the percentage change required to yield a line that only reverses after a change from high to low of 10% or greater.
GT::Indicators::ZigZag->new() GT::Indicators::ZigZag->new([5])
If you need an 8 % ZigZag indicator of the opening prices you can write one of those lines :
GT::Indicators::SMA->new([8], "OPEN", $GET_OPEN) GT::Indicators::SMA->new([8, "OPEN"])
A ZigZag indicator with a 20 % threshold of the Volume could be created with :
GT::Indicators::ZigZag->new([20, "{I:Volume}"])