EVOLUTION-MANAGER
Edit File: DonchianChannel.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: Donchian Channel</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 DonchianChannel {TTR}"><tr><td>DonchianChannel {TTR}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Donchian Channel</h2> <h3>Description</h3> <p>Donchian Channels were created by Richard Donchian and were used to generate buy and sell signals for the Turtle Trading system. </p> <h3>Usage</h3> <pre> DonchianChannel(HL, n = 10, include.lag = FALSE) </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 High-Low prices.</p> </td></tr> <tr valign="top"><td><code>n</code></td> <td> <p>Number of periods for moving average.</p> </td></tr> <tr valign="top"><td><code>include.lag</code></td> <td> <p>Should values be lagged so that today's prices are not included in the calculation? See Note.</p> </td></tr> </table> <h3>Details</h3> <p>Donchian Channels consist of two (sometimes three) lines: </p> <p>The top line is the highest high of the past <code>n</code> periods. The bottom line is the lowest low of the past <code>n</code> periods. The middle line is the average of the top and bottom lines. </p> <h3>Value</h3> <p>A object of the same class as <code>HL</code> or a matrix (if <code>try.xts</code> fails) containing the columns: </p> <dl> <dt> high </dt><dd><p> The highest high series. </p> </dd> <dt> mid </dt><dd><p> The average of <code>high</code> and <code>low</code>. </p> </dd> <dt> low </dt><dd><p> The lowest low series. </p> </dd> </dl> <h3>Note</h3> <p>The default of <code>include.lag=FALSE</code> makes <code>DonchainChannel</code> consistent with other <span class="pkg">TTR</span> functions, in that it includes the current period in the calculation. </p> <p>The default is different than the original calculation, which would calculate the indicator using periods t-1 through t-n. Setting <code>include.lag=TRUE</code> will return the result of the original calculation. </p> <p>The default of this argument may change in the future. </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.linnsoft.com/techind/donchian-channels">https://www.linnsoft.com/techind/donchian-channels</a><br /> </p> <h3>See Also</h3> <p>See <code><a href="bollingerBands.html">BBands</a></code>. </p> <h3>Examples</h3> <pre> data(ttrc) dc <- DonchianChannel( ttrc[,c("High","Low")] ) </pre> <hr /><div style="text-align: center;">[Package <em>TTR</em> version 0.24.3 <a href="00Index.html">Index</a>]</div> </body></html>