It probably have to do with
mrequest.sl = NormalizeDouble(latest_price.ask + atr_range,_Digits); // Stop Loss
mrequest.sl = NormalizeDouble(latest_price.bid - atr_range,_Digits); // Stop Loss
Those two lines.
So you can comment them out and see if it does place orders without setting a stoploss.
It probably have to do with
Those two lines.
So you can comment them out and see if it does place orders without setting a stoploss.
Because it says sl:-inf
ERR_TRADE_SEND_FAILED | 4756 | Trade request sending failed |
Please run the request through OrderCheck() first.
Because it says sl:-inf
ERR_TRADE_SEND_FAILED | 4756 | Trade request sending failed |
Please run the request through OrderCheck() first.
Ok thanks, I will try and integrate that when I get home from work this evening.
I have also noticed _lots (which should be the lot size) is returning 0.0. I imagine this could be causing the error with the filling type? When changing the fill type from FOK to IOC or RETURN the error received is 10014 (insufficient volume), which may be being caused by the same issue. Again I will check later today. Any other thoughts appreciated.
Best regards

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi All,
Running the EA on H1 EURUSD returns this message:
2019.01.22 21:50:39.658 2018.05.16 03:53:28 failed market buy 0.00 EURUSD sl: -inf [Unsupported filling mode]
And this Alert:
2019.01.22 21:50:39.693 2018.05.16 09:00:18 Alert: The Buy order request could not be completed -error:4756
For every second of the test(Screenshot attached).
After looking through other posts and checking over my code I still have no idea what is wrong.
This is the first EA I've written, which has been used as a way to get me familiar with MQL5 and coding in general. I have tried to piece together knowledge gained from all over this forum, which has led to this EA. The amount of info and help out there is amazing and I couldn't have got this far without such an active community. To go from 0 to this I am quite pleased though I need help finishing due to my lack of experience! Thanks in advance for the help with this specific problem, and any advice on debugging/coding is welcome as well as any futher corrections you may have.
Best regards to All