This is absolutely normal. The advisor must handle SymbolInfoDouble errors and not trade if SymbolInfoDouble fails. In the case of a script, just run it again.

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
I'm using a script I found here to calculate volume for my trades and it works great on the second run, but always fails on the first run.
On the first run of this script after I open MT5, the Print statement shows this:
FN_BUY_STOP (XAUUSD.a,H4) tick_size : 0.01 tick_value: 0.0 volume_step: 0.01 SL Dist: 8.769999999999527 money step: 0.0
Which returns an invalid number of Lots
But the second time I run it it shows the actual values.
FN_BUY_STOP (XAUUSD.a,H4) tick_size : 0.01 tick_value: 1.5056839569374387 volume_step: 0.01 SL Dist: 8.769999999999527 money step: 13.204848302340627
I can't work out what's wrong with this code.