As I understand it, if you enable Intrabar Order Generation, then buy or sell at next bar instructions execute at the next tick, rather than the next bar — this is what I want to happen.
However, I have done this, both by stating it in the code and turning it on in the strategy settings and backtesting settings, and it is only executing on the next bar.
On the 5 min chart, all entries and exits (stop loss and TP orders) are happening in 5 minute increments, when they should be happening at all times. Also the order is executing at the next bar open price, rather than the signal price.
Any ideas?
Code fragment:
Can you help answer these questions from other members on futures io?
Yes I have used intrabar persist. What it appears on further investigation is that the trades are actually executing intrabar, but they were only being reported on bar close, which is why they were all at multiples of 5 minutes, even though they were actually being executed at all times. Presumably, if that is the case, this must be a well known phenomenon that everybody using intrabar has experienced.
this is expected behavior. The report will only show the ending timestamp of the bar, but the prices of the fills which could be intrabar.
The same goes for your code by the way. TS will not expose the intrabar times of a bar for timebased bars, but only the ending timestamp.
Regards,
ABCTG
The following user says Thank You to ABCTG for this post: