Hi guys, please help. i am getting OrderSend Error 138 on strategy tester, what can be the reason, and how can i fix this. I do call the Refreshrates() function before any Ordersend() and i have a wide enough slippage of about 100 pips, but still get error 138 when testing, what can possibly be wrong and how can i fix it. I'm using the M1 chart.
- Ordersend error 138
- Error 138
- Error Code 138 in Backtesting
Mthokozisi Gumede:
Hi guys, please help. i am getting OrderSend Error 138 on strategy tester, what can be the reason, and how can i fix this. I do call the Refreshrates() function before any Ordersend() and i have a wide enough slippage of about 100 pips, but still get error 138 when testing, what can possibly be wrong and how can i fix it. I'm using the M1 chart.
Hi guys, please help. i am getting OrderSend Error 138 on strategy tester, what can be the reason, and how can i fix this. I do call the Refreshrates() function before any Ordersend() and i have a wide enough slippage of about 100 pips, but still get error 138 when testing, what can possibly be wrong and how can i fix it. I'm using the M1 chart.
You need to fix your code.
https://book.mql4.com/appendix/errors

Error Codes - Appendixes - MQL4 Tutorial
- book.mql4.com
GetLastError() - the function that returns codes of error. Code constants of errors are determined in stderror.mqh file. To draw the text messages use the ErrorDescription() function described in the stdlib.mqh file. Error codes returned from a trade server or client...
- MT5 doesn't have 129 or 138.
Standard Constants, Enumerations and Structures / Codes of Errors and Warnings / Runtime Errors - Reference on algorithmic/automated trading language for MetaTrader 5
Why did you post your MT4 question in the Root / MT5 General section instead of the MQL4 section, (bottom of the Root page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Next time post in the correct place. The moderators will likely move this thread there soon. - Zero means no error. Do not look at _LastError unless there is an error.
Check your return codes for errors and report them.
What are Function return values ? How do I use them ? - MQL4 and MetaTrader 4 - MQL4 programming forum
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
Only those functions that return a value (e.g. iClose, MarketInfo, etc.) must you call ResetLastError before in order to check after. - Mthokozisi Gumede: still get error 138 when testing, what can possibly be wrong and how can i fix it.Do you really expect an answer? We can't see your broken code. There are no mind readers here and our crystal balls are cracked.

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