Zig Zag higlights trends by removing price changes smaller than change
and interpolating lines between the extreme points.
ZigZag(HL, change = 10, percent = TRUE, retrace = FALSE,
lastExtreme = TRUE)
Object that is coercible to xts or matrix and contains either a High-Low price series, or a Close price series.
Minimum price movement, either in dollars or percent (see
percent
).
Use percentage or dollar change?
Is change
a retracement of the previous move, or an
absolute change from peak to trough?
If the extreme price is the same over multiple periods, should the extreme price be the first or last observation?
A object of the same class as HL
or a vector (if
try.xts
fails) containing the Zig Zag indicator.
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.
The following site(s) were used to code/document this indicator: http://www.fmlabs.com/reference/default.htm?url=ZigZag.htm https://www.linnsoft.com/techind/zig-zag-indicator-zig-zzo https://www.linnsoft.com/techind/zig-zag-oscillator-indicator-zzo http://www.metastock.com/Customer/Resources/TAAZ/#127 http://www.stockcharts.com/school/doku.php?id=chart_school:technical_indicators:zigzag
# NOT RUN {
## Get Data and Indicator ##
data(ttrc)
zz <- ZigZag( ttrc[,c("High", "Low")], change=20 )
# }
Run the code above in your browser using DataLab