"Refresh" Equivalent in MQL?

 

Hi,

what is the equivalent for the "Refresh" button in MQL code?




Thx, Sven

 
svengralla:

Hi,

what is the equivalent for the "Refresh" button in MQL code?




Thx, Sven

Why are you using the "Refresh" button ?
 
ChartRedraw() ?
 
angevoyageur:
Why are you using the "Refresh" button ?
Working offline or during closed markets, I need to run OnCalculate() to recalculate my data upon an CHARTEVENT_CLICK trigger.
 
Candles:
ChartRedraw() ?
No, ChartRedraw() will not trigger OnCalculate().
 
svengralla:
Working offline, I need to run OnCalculate() to recalculate my data upon an OnEvent() trigger.
Use OnTimer and a timer to check conditions periodically and run required calculations regardless to online/offline state.
 
marketeer:
Use OnTimer and a timer to check conditions periodically and run required calculations regardless to online/offline state.
Thanks, I will check this out.
Reason: