Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
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 NexusFi?
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.