how to "right click refresh" on mt4 codes.

 

i took a screenshot just before the EA took the trade and all the candles were present.

after a few hours, the same candles disappeared! it caused a gap on my chart for about 14 hours.

after reporting this issue to the broker, they said that i should  "right click refresh" my charts and the candles will appear. (some technical talk about there were "no quote"). all the candles are now present on the chart.

 

now, i want to get this on a code. how to "right click refresh" on mt4 codes? i tried WindowRefersh() , RefreshRAte() and ChartRedraw() all didn't work. 

Appreciate your help on this one. 

 
Change your broker it's absolutely not normal situation if a broker changes history prices.
 

yeah. i agree that it is not normal but i like someting on my code to prevent this from happening again in teh future. maybe a "right-click - refresh" codes to clear things up.  

 
Jonatslim:

yeah. i agree that it is not normal but i like someting on my code to prevent this from happening again in teh future. maybe a "right-click - refresh" codes to clear things up.  

Exactly, change your broker

The question has been asked a looot of times. You need to use WINAPI call.

Refresh the chart window - MQL4 forum
Refresh the chart window - MQL4 forum
  • www.mql5.com
Refresh the chart window - MQL4 forum