You can resolve the issue by either:OrderSend error 4107
Error opening BUYSTOP order []: (4107) invalid price parameter for trade function
invalid price 1.28236000 for OrderSend function
- Modifying your MQ4 mode (if you have access to it). You will need to amend all the "OrderSend" and "OrderModify" commands so they adjust your prices to 4-digits. You can do this by wrapping all prices in the function "NormalizeDouble(price, Digits)". For example, if the code reads like the following:
Code: Select all
ticket=OrderSend(Symbol(),OP_BUY, lots, Ask, slip, stoploss, takeprofit, EA, MagicNo, 0, Blue);
you will need to change it to:
Code: Select all
ticket=OrderSend(Symbol(),OP_BUY, lots, NormalizeDouble(Ask, Digits), slip, stoploss, takeprofit, EA, MagicNo, 0, Blue);
- If you do not have the code, you can instead utilise a 5-Digit MT4 terminal to back-test your strategy.
If either option is not viable, an enhancement is planned for the next version of Tickstory to ensure prices are rounded for 4-digit brokers.
Regards.