问题
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:
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
.
来源:https://stackoverflow.com/questions/27335453/quantstrat-how-to-execute-on-the-same-bar