How to refresh / reload the chart if not all bars are printed correctly

 

Hi,

it often happens that I see data gaps in my chart. Then I have to click 'refresh' in the right-mousebutton-menu and the chart is updated and the gaps are filled. Unfortunately it is sometimes a lot of work because each timeframe has to be refreshed individually. Therefore I wanted to make a script which switches to one timeframe after another and refreshes the chart. I think it can only be done by using Win32 commands to simulate a right mousebutton click but I have no idea how to do that. I would be very thankful if someone just gave me the few code-lines for that. 

 
Unfortunately, that doesn't work. I just tested it again. I took a chart with a lot of missing data on the M30 timeframe and executed a script with WindowRedraw(). Nothing happened. Only when I clicked on refresh in the context menu, the chart was refreshed and all data is available now.