Returns number of the ticket assigned to the order by the trade server or -1 if it fails. To get additional error information, one has to call the GetLastError() function. At opening of a market order (OP_SELL or OP_BUY), only the latest prices of Bid (for selling) or Ask (for buying) can be used as open price. If operation is performed with a...
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Use the MQL4-style in the MT5.
You have to be very careful when using CTrade as some of the properties like magic number are not set and are equal to 0
To set the Magic number use the CTrade :: SetExpertMagicNumber method
I tried Trade and OrderSend, based on my experience
- Ctrade : it can work for all brokers
- OrderSend : doesn't work for some brokers
It is not 100% guaranteed, you have to check your own EA for some reason
I tried Trade and OrderSend, based on my experience
- Ctrade : it can work for all brokers
- OrderSend : doesn't work for some brokers
It is not 100% guaranteed, you have to check your own EA for some reason
are you sure ????
its very strange