I haven't gone through your code but the first thing you should do is to normalize the order price to the correct number of digits - 2, 3, 4 or 5 depending on the symbol and broker
Hi Stuart :-)
Please note that a normalized price working for all symbols should be done from ticksize and not only digits.
Thank you for your response Alain Verleyen and Stuart Browne.
I have been trying to modify it using NormalizeDouble(digits) with no success. Could you please indicate with a working code.
Regards
With pending orders always the situation is harder than market orders operations !!!.
You always need to check at the time of sending the pending order (Limit one) is that the current price
is higher than the BUYLIMIT and lower than the SELLLIMIT levels.
The NormalizeDouble(Price, Digits) is also essential as you have been advised by Alain Verleyen and Stuart Browne.
Hi Stuart :-)
Please note that a normalized price working for all symbols should be done from ticksize and not only digits.
Hi Alian
Im aware you once had a similar challenge how did you resolve it.My broker is a 5 digit broker
Regards
Hi Alian
Im aware you once had a similar challenge how did you resolve it.My broker is a 5 digit broker
Regards
The minimum is to normalize your prices :
double tickSize=SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_SIZE); double openprice=MathRound(L4/tickSize)*tickSize;
The minimum is to normalize your prices :
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use