DonchianChannel2: Donchian Channel

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Donchian Channels were created by Richard Donchian and were used to generate buy and sell signals for the Turtle Trading system.

Usage

1
  DonchianChannel2(HL, n=10)

Arguments

HL

Object that is coercible to xts or matrix and contains High and Low prices or Close prices.

n

Number of periods to include in price band calculation

Details

Donchian Channels consist of two (sometimes three) lines:

The top line is the highest high of the past n periods. The bottom line is the lowest low of the past n periods. The middle line is the average of the top and bottom lines.

Value

A object of the same class as HL or a matrix (if try.xts fails) containing the columns:

high

The highest high series.

mid

The average of high and low.

low

The lowest low series.

Note

The DonchianChannel function in the package TTR includes the current price bar for the channel calculation. In contrary, this DonchianChannel2 function calculates the price bands on the previous n price bars.

Author(s)

G See

References

The following site(s) were used to code/document this indicator:
http://www.linnsoft.com/tour/techind/donch.htm

See Also

See DonchianChannel.

Examples

1
2
3
4
5
## Not run: 
  getSymbols(YHOO, adjust=TRUE)
  dc <- DonchianChannel2(YHOO)

## End(Not run)


Search within the candlesticks package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.