quantstrat: how to execute on the same bar?

347 views Asked by At

I know that you're not supposed to be doing this but since I almost exclusively trade based on daily and weekly data, I think I'd be getting a more realistic idea of trading ideas if I were able to execute on the same bar instead of buying on next day's open. Thanks!

1

There are 1 answers

1
Joshua Ulrich On BEST ANSWER

You can add allowMagicalThinking=TRUE to your call to applyRules. If you add allowMagicalThinking=TRUE to your call to applyStrategy, it will be passed to applyRules.