EVOLUTION-MANAGER
Edit File: ZigZag.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Zig Zag</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for ZigZag {TTR}"><tr><td>ZigZag {TTR}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Zig Zag</h2> <h3>Description</h3> <p>Zig Zag higlights trends by removing price changes smaller than <code>change</code> and interpolating lines between the extreme points. </p> <h3>Usage</h3> <pre> ZigZag(HL, change = 10, percent = TRUE, retrace = FALSE, lastExtreme = TRUE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>HL</code></td> <td> <p>Object that is coercible to xts or matrix and contains either a High-Low price series, or a Close price series.</p> </td></tr> <tr valign="top"><td><code>change</code></td> <td> <p>Minimum price movement, either in dollars or percent (see <code>percent</code>).</p> </td></tr> <tr valign="top"><td><code>percent</code></td> <td> <p>Use percentage or dollar change?</p> </td></tr> <tr valign="top"><td><code>retrace</code></td> <td> <p>Is <code>change</code> a retracement of the previous move, or an absolute change from peak to trough?</p> </td></tr> <tr valign="top"><td><code>lastExtreme</code></td> <td> <p>If the extreme price is the same over multiple periods, should the extreme price be the first or last observation?</p> </td></tr> </table> <h3>Details</h3> <p>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. </p> <h3>Value</h3> <p>A object of the same class as <code>HL</code> or a vector (if <code>try.xts</code> fails) containing the Zig Zag indicator. </p> <h3>Warning</h3> <p>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. </p> <h3>Note</h3> <p>If High-Low prices are given, the function calculates the max/min using the high/low prices. Otherwise the function calculates the max/min of the single series. </p> <h3>Author(s)</h3> <p>Joshua Ulrich </p> <h3>References</h3> <p>The following site(s) were used to code/document this indicator:<br /> <a href="https://www.fmlabs.com/reference/default.htm?url=ZigZag.htm">https://www.fmlabs.com/reference/default.htm?url=ZigZag.htm</a><br /> <a href="https://www.linnsoft.com/techind/zig-zag-indicator-zig-zzo">https://www.linnsoft.com/techind/zig-zag-indicator-zig-zzo</a><br /> <a href="https://www.linnsoft.com/techind/zig-zag-oscillator-indicator-zzo">https://www.linnsoft.com/techind/zig-zag-oscillator-indicator-zzo</a><br /> <a href="https://www.metastock.com/Customer/Resources/TAAZ/#127">https://www.metastock.com/Customer/Resources/TAAZ/#127</a><br /> <a href="https://school.stockcharts.com/doku.php?id=technical_indicators:zigzag">https://school.stockcharts.com/doku.php?id=technical_indicators:zigzag</a><br /> </p> <h3>Examples</h3> <pre> ## Get Data and Indicator ## data(ttrc) zz <- ZigZag( ttrc[,c("High", "Low")], change=20 ) </pre> <hr /><div style="text-align: center;">[Package <em>TTR</em> version 0.24.3 <a href="00Index.html">Index</a>]</div> </body></html>