Hello guys, I am new to
coding mql5 or mql4. What should be the first ticket number? I have seen
in the documentation that an error is -1. But I wonder what should be
the first ticket number? 1 or 0? As I have seen in examples that if
ticket number > 0, then an order is sent successfully.
- Trading Principles - Trade - MetaTrader 5 for iPhone
- Trading Principles - Trade - MetaTrader 5 for Android
- Depth of Market - MetaTrader 5 for iPhone
Quick answer :)
if ticket = 0, means false, or faild
if ticket = 1, means true, or successful operation.
Osama Shaban:
Quick answer :)
if ticket = 0, means false, or faild
if ticket = 1, means true, or successful operation.
The mql4 documentation says an error is -1.
mql5 is different.

OrderSend - Trade Functions - MQL4 Reference
- docs.mql4.com
OrderSend - Trade Functions - MQL4 Reference
Alain Verleyen:
Thank you sir for your reply. However, how is it different in mql5?
The mql4 documentation says an error is -1.
mql5 is different.
Tsz Yau Lo:
Thank you sir for your reply. However, how is it different in mql5?
Thank you sir for your reply. However, how is it different in mql5?
See this article...

Orders, Positions and Deals in MetaTrader 5
- 2011.02.01
- MetaQuotes Software Corp.
- www.mql5.com
Creating a robust trading robot cannot be done without an understanding of the mechanisms of the MetaTrader 5 trading system. The client terminal receives the information about the positions, orders, and deals from the trading server. To handle this data properly using the MQL5, it's necessary to have a good understanding of the interaction between the MQL5-program and the client terminal.

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