Hey, just looking at the assisted tool. There’s only an option for buy @ ‘next bar open’ or ‘next day open’. Is there not at option for buying when the conditions are met? ie, if price of current candle is greater than close of previous candle, I want to buy as soon as it’s trigger, not wait for the open of the next candle.
If this option isn’t available in the assisted creation tool, is it available in code?
Code is read at the end of each candle on whatever timeframe you are running the code at. So 5 min TF, the code is read every 5 mins at the end of the candle / bar.
The Open or Close trade is then executed at the open of the next candle / bar (a few milliseconds after the close of the previous candle / bar).
Only way you can execute a trade (open or close) during a bar, is to set a Pending Order to execute when, for example, a price level is met that satisfies the Pending Order.
STOP (pending)
The nearest you can get to what you want – without using Pending Orders – is to run your code on multi-timeframe.
Multi-TF means, for example, using a 5 min TF and when conditions are met within a 5 min bar then the trade could be executed on, for example, a 1 second or 5 second candle / bar.
Multi timeframe – MTF indicators for ProRealTime
Pending orders should the the way to go I think, the conditions are likely to be known at the end of each bar