Please help! I am super confused. How come low is higher than high - page 2

 
Tsz Yau Lo #:

When I tested it, some works but some don't.

Example: 2019.07.01 16:00:00   SLS:-0.005050000000000221


Running this code every tick or on bar lower than D1 and not only on day closure can cause the current day (bar 0) to differ from what is stored in mrateM. So first check if that is what causing it and if you need the uncompleted bar 0, or that you need to copy rates from bar 1 and same for iHighest/iLowest
Reason: