Tradingview Intrabar Price Emulation Behaviour
I understand that TradingView price emulation for intrabar calculations uses the following two estimates to emulate the movement of price:
- If the bar’s high is closer to bar’s open than the bar’s low, the broker emulator assumes that intrabar price was moving this way: open → high → low → close.
- If the bar’s low is closer to bar’s open than the bar’s high, the broker emulator assumes that intrabar price was moving this way: open → low → high → close.
However I'm confused about what would happen in the following situation :
If we have two limit orders , order 1 (red line) order 2 (blue line), given the bar’s high is closer to bar’s open than the bar’s low, would order 1 always execute after order 2? i.e. open -> order 2 price -> order 1 price -> high -> low -> close
I ask this because the emulator estimates it will go from open -> high first, but does it ever consider that orders can execute after dropping from the high down to the low i.e. open -> order 1 price -> high -> order 2 price -> open -> low -> close
(y axis is price, x is time)
Thanks in advance.
Solution 1:
Yes, both orders will be executed during moving open -> high in this case, and Order 1 is after Order 2. Orders on high -> low will be executed only if they prices are less than open.