On Fri, Apr 13, 2012 at 1:04 PM, BBands bba...@gmail.com wrote:
Donchian channels are a sort of special case in which the channel
values should not include the current period. if I were to code this,
today's value would reflect the n-1 prior highs and lows. The reason
So if n=10, you would
Donchian channels are a sort of special case in which the channel
values should not include the current period. if I were to code this,
today's value would reflect the n-1 prior highs and lows. The reason
is that is that when the current high and low are used there can never
be a breakout. These
Ok, so the other implementation of Donchian Channel, where the current
price is not included in calculation would be:
getSymbols(YHOO, adjust=TRUE)
head(cbind((YHOO),
lag(DonchianChannel(cbind(Hi(YHOO),Lo(YHOO)),n=5)),k=1),n=10)
Andreas
___
As I think I am partly responsible for this code in TTR (at least the
initial rev), I'll explain my logic.
In general, more options/arguments that simply do what single functions
can do more explicitly isn't the best design strategy in many cases.
Secondly, most (all?) of the other functions in