[R-SIG-Finance] quanstrat rule to exit same day close (using daily data)

G See gsee000 at gmail.com
Sun May 13 22:02:07 CEST 2012


Extending on what Jan said, perhaps you could add a "PrevClose" column
to your data and use prefer='PrevClose'

Garrett

On Sun, May 13, 2012 at 2:55 PM, s p <algotr8der at gmail.com> wrote:
> okay so that means I can't use quantstrat for strategies where the entry
> and exit are on the same bar (in this case daily bar).
>
> I can do this in blotter - which I guess is fine.
>
> Thanks for the feedback.
>
> On Sun, May 13, 2012 at 3:46 PM, OpenTrades <jan at opentrades.nl> wrote:
>
>> In quantstrat, if your have a signal on bar t, the rule will be executed
>> at bar t+1. In your case, this means that the order will be added for the
>> next day.
>>
>> Use the 'prefer'-argument to specify which of next day's rates (open, low,
>> high, close) you want to use.
>>
>>
>>



More information about the R-SIG-Finance mailing list