Replies: 1 comment
-
Unfortunately, that is not possible because it requires two transactions in one bar which is not supported (yet). I had hard time to implement strategies that require to buy at close and sell to next open or to buy at open and sell at the same bar close. I had to rewrite the whole logic of the broker to have order processing once before the Strategy.next, and then second order processing after the same Strategy.next call. I had to add also parameters when each trade to be executed (at current bar open, close or next open and/or N bars later, default 0), not like now: a default set for all trades. So, it is a bit complex and I don't think it will be supported any time soon. |
Beta Was this translation helpful? Give feedback.
-
Can I buy on open and followed by selling on close to simulate the rollover of futures?
Beta Was this translation helpful? Give feedback.
All reactions