I check if the current bar is higher & lower than the previous and I also check which time the bar ticked higher and ticked lower using a DateTime Variable:
Time_TickLower = (Time[0]);
Time_TickHigher = (Time[0]);
In realtime it works perfectly, I get this result:
ENGULFER: Bar 7399
TickHigher = 09/08/2024 16:25:30 <---
TickLower = 09/08/2024 16:25:46 <---
Time 16:25:46.6320000
But when loaded historically, the exact same bar shows as this:
ENGULFER: Bar 7399
TickHigher = 09/08/2024 16:25:46 <---
TickLower = 09/08/2024 16:25:46. <---
Time 16:25:46.6320000
Note how the TickHigher & TickLower time in realtime is 16 seconds apart, but hostircally it's the same time. How can I fix this?
I need to know which occurred first, the tick higher or tick lower in order to be a draw the correct object.

Comment