Hi all,

can anyone point me in the right direction?
I'm not particularly strong at R but use quantmod to do a lot of charting -
so apologize in advance if there's a simple answer to this I've missed.

I am trying to modify DonchianChannel() in TTR so that I can draw the
channel, but not for the last n days.
Instead, I'd like to draw it for a trailing n day period, meaning to draw
the highs/lows over the period from 20 days ago to 10 days ago.

After reviewing the  DonchianChannel() code, it makes use of runMax and
runMin in TTR that evaluate moving windows of n-days. Is there a similar
runMax runMin function I can use (or reuse) to build a version of these that
accept a richer set of parameters, for example nstart=20, nend=10

thanks

Andrew

        [[alternative HTML version deleted]]

_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Reply via email to