Issue with GlobalVariableCheck()

To add comments, please log in or register
Andrea Bronzini
110
Andrea Bronzini  

Hi, I have an indicator working with GV and I happened to notice a funny thing that occurs at terminal's startup.

I check for existence of GVs at every call of the indicator start function and I've noticed that if the indicator is loaded on a chart when the MT terminal starts, the first check returns FALSE... it's like if the GVs are not loaded yet by the Terminal and the indicator cant find them.

As result the program calculates new values for those GVs and I shall avoid this somehow. In fact, If I disable the function which updates the GVs, I can see that at the second call of the start function the original GVs are there, correctly loaded by MT terminal.


I thought using a Sleep in the init function waiting a few secs for the terminal to start in case the indicator is loaded at startup... but Sleep seems not to work with indicators and I really do not want to convert this into an EA.


Did anyone experience the same thing?

Any suggestion on how to overcome the problem?



Tnx,

Zyp




Taskin Osman
795
Taskin Osman  

you may check alternative http://www.fx1.net/permvar.php



regards

To add comments, please log in or register