How to wait for all bars to be loaded before taking a screenshot? - page 2

 

Ok, now I had exactly this endless-loop-problem. I changed to a profile with all charts using the screenshot-indicator and the MT4 crashed.

But I still haven't found a solution. So I am still happy if someone has an idea.. 

 

I haven't tried it but Windows' kernel32.dll seems to have Sleep().

MAY BE (!) if you want to use this Windows function try:

#import "kernel32.dll"
   void Sleep(int mSec);
#import
...

kernel32::Sleep(500);

I haven't tested it and most probably the whole terminal falls asleep for that period!

But I think only the particular chart will absent.

MAY BE if you now want to use mt4's Sleep() you have to you write ::Sleep() - but I am not sure!!

Would you mind to check it out and post your results?

 

I have tried both ideas but none of them works. There are always 2 seconds between the first and second screenshot and even if I wait for 3 seconds, I get always the same result. So obviously there is no possibility to wait for all data to be loaded before the indicator continues. I also tried Refeshrates() but that also didn't work.

Nevertheless thank you for your ideas! 

Reason: