samjesse:
The posted code says nothing. You should post the code where you are filling your request, something is wrong with it.
Hi
A mql5 EA placed an limit sell order but the log shows failed due to Invalid Price. Any idea how to start to find the problem?
Notice that the prices are all good in the order but the results.ask and result.bid are both 0.0. Why is that?
Thank you
Here is the log file content:
KH 0 20:56:08.811 Trades '212121': sell limit 0.05 EURNZD at 1.71421 sl: 1.73645 tp: 1.71195
PE 2 20:56:09.076 Trades '212121': failed sell limit 0.05 EURNZD at 1.71421 sl: 1.73645 tp: 1.71195 [Invalid price]
Here is the code print out:
2019.05.31 20:56:09.076 myEA (EURNZD,H1) TradeLog: Trade request failed. Error = 4756
2019.05.31 20:56:09.076 myEA (EURNZD,H1) TRADE_RETCODE_INVALID_PRICE
2019.05.31 20:56:09.076 myEA (EURNZD,H1) request.price = 1.71421 result.ask = 0.0 result.bid = 0.0
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Hi
A mql5 EA placed an limit sell order but the log shows failed due to Invalid Price. Any idea how to start to find the problem?
Notice that the prices are all good in the order but the results.ask and result.bid are both 0.0. Why is that?
Thank you
Here is the log file content:
KH 0 20:56:08.811 Trades '212121': sell limit 0.05 EURNZD at 1.71421 sl: 1.73645 tp: 1.71195
PE 2 20:56:09.076 Trades '212121': failed sell limit 0.05 EURNZD at 1.71421 sl: 1.73645 tp: 1.71195 [Invalid price]
Here is the code print out:
2019.05.31 20:56:09.076 myEA (EURNZD,H1) TradeLog: Trade request failed. Error = 4756
2019.05.31 20:56:09.076 myEA (EURNZD,H1) request.price = 1.71421 result.ask = 0.0 result.bid = 0.0