Re: [R-SIG-Finance] Donchian Channel in TTR

2012-04-15 Thread Joshua Ulrich
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

Re: [R-SIG-Finance] Donchian Channel in TTR

2012-04-13 Thread BBands
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

Re: [R-SIG-Finance] Donchian Channel in TTR

2012-04-08 Thread Andreas Voellenklee
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 ___

Re: [R-SIG-Finance] Donchian Channel in TTR

2012-04-05 Thread Jeffrey Ryan
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