You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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