Question about programming Chart Overlay Indicator

 
Hello, I am posting this in the MQL4 section since there is no MQL5 section to post it in.  I am creating a simple chart overlay in MT5 to visually compare two symbols.  However the chart overlay indicator does not update in real time it only updates on the close of the bar.   Does anyone know what might be happening and if so how to fix it?   Any help is appreciated.
 
tradeking2008 Does anyone know what might be happening and if so how to fix it?  

Your code is broken; fix your broken code. We can't read your mind nor see your machine; only what you give us on this forum.

How can we know whether you used the old event handlers and IndicatorCounted() or the new event handlers.
          Event Handling Functions - MQL4 Reference

 
tradeking2008:
Hello, I am posting this in the MQL4 section since there is no MQL5 section to post it in.  I am creating a simple chart overlay in MT5 to visually compare two symbols.  However the chart overlay indicator does not update in real time it only updates on the close of the bar.   Does anyone know what might be happening and if so how to fix it?   Any help is appreciated.

Why reinvent the wheel?

GBPUSDH1

FYI... The charts of both/all of the symbols used must be open in MT5 because the indicator calls the visible bars of each chart.

Files: