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.