Skip to content
Prev 13240 / 15274 Next

Specify time segment to calculate indicator and trade ?

On Wed, Apr 8, 2015 at 10:17 PM, domodo <1111938 at qq.com> wrote:
Using quantstrat, you can limit rule execution to a specific time of
day via add.rule's timespan argument.  In this case you would set it
to timepan="T10:00/T14:00".
You can also do this with time-of-day subsetting.  For example:
apply.daily(xtsData["T09:30/T10:30", "Close"], range)