MetaTrada wrote >>
I'm having a problem with error 4107 for an Ordersend function. I've printed the Ask and Bid values out immediately before the function and for some reason the values have 8 decimal places instead of 4. If I use Print (Ask," "+ Bid);, the Ask has the correct format, but the Bid doesn't. Any thoughts, thanks.
It's quite common for values to be non-exact, particularly from historical data and enve more so for stoploss and takeprofit. For robust calling of OrderSend, the entry price, stoploss and takeprofit should all be pruned with something like this
doubleValue=NormalizeDouble(doubleValue,Digits);
Paul
Thanks, is there any reason why I wouldn't want to do this for Ordersend()?
MetaTrada:
Thanks, is there any reason why I wouldn't want to do this for Ordersend()?
Thanks, is there any reason why I wouldn't want to do this for Ordersend()?
Prices should be normalized before using with OrderSend() (unless u know they are already normalized).
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 having a problem with error 4107 for an Ordersend function. I've printed the Ask and Bid values out immediately before the function and for some reason the values have 8 decimal places instead of 4. If I use Print (Ask," "+ Bid);, the Ask has the correct format, but the Bid doesn't. Any thoughts, thanks.