A object of the same class as HL or a vector (if
try.xts fails) containing the Zig Zag indicator.
Arguments
HL
Object that is coercible to xts or matrix and contains either a
High-Low price series, or a Close price series.
change
Minimum price movement, either in dollars or percent (see
percent).
percent
Use percentage or dollar change?
retrace
Is change a retracement of the previous move, or an
absolute change from peak to trough?
lastExtreme
If the extreme price is the same over multiple periods,
should the extreme price be the first or last observation?
Warning
The last value of the ZigZag indicator is unstable (i.e.
unknown) until the turning point actually occurs. Therefore this indicator
isn't well-suited for use for systematic trading strategies.
Author
Joshua Ulrich
Details
The Zig Zag is non-predictive. The purpose of the Zig Zag is filter noise
and make chart patterns clearer. It's more a visual tool than an indicator.