Folks, Can any one show me how to send a market order in MQL5.
I just downloaded the platform but after several couple hours trials have not been successful in sending an order from a simple Expert Advisor.
This is my Ordersend structure in MQL4 for a market buy: How will I structure this in MQL5.
OrderSend(Symbol(), OP_BUY, Lots, Ask, 3, Ask - 250* Point, Ask + 250* Point, "MQL4 Sample", MagicNumber1, 0, Blue);
Seems like a very basic question...yet no answer !! If you go to the Russian forum they've been discussing MT5 for a very long time and are very in depth....
We are at square one and can't even get a simple response....
Seems like a very basic question...yet no answer !! If you go to the Russian forum they've been discussing MT5 for a very long time and are very in depth....
We are at square one and can't even get a simple response....
The reason why it does not work is because the *&^%&^ programmers changed order send, its a nightmare now... it has no magic number for starters.
here is a copy of the new syntax:
bool OrderSend( MqlTradeRequest& request // Structure query MqlTradeResult& result // Structure of the answer ); |
Options
request
[in] Pointer to a structure typeMqlTradeRequestDescribing the trade effect of the client.
result
[in, out] Pointer to a structure typeMqlTradeResultDescribing the result of trading in the event of successful completion (return true).
struct MqlTradeRequest
{
ENUM_TRADE_REQUEST_ACTIONS action; // Type of executable
ulong expert; // Clone expert (ID)
ulong order; // Ticket order
string symbol; // The name of the trade instrument
double volume; // The requested amount of the transaction
lots
double price; / Price
double stoplimit; // Level StopLimit warrant
double sl; // Stop Loss order level
double tp; // The level of Take Profit orders
ulong deviation; // Maximum acceptable deviation from the asking
price
ENUM_ORDER_TYPE type; // Type of warrant
ENUM_ORDER_TYPE_FILLING type_filling; // Type of warrant execution
ENUM_ORDER_TYPE_TIME type_time; // Type a warrant for the duration of
datetime expiration; // The expiration of the order (for orders type
ORDER_TIME_SPECIFIED)
string comment; // Comment to warrant
char reserved[128]; // Reserved
};
struct MqlTradeResult
{
uint retcode; // Result code
operation
ulong deal; // Ticket deal, if it is
made
ulong order; // Ticket warrant if he
may
double volume; // The volume of the transaction confirmed by
broker
double price; // Price of the transaction confirmed
by broker
double bid; // The current market offer price
(the price requotes)
double ask; // The current market price of demand
(prices requotes)
string comment; // Comment broker to the operation
(by default filled decoding)
char reserved[128]; // Reserved
};
Yet they can add idiotic bitmaps for a background...go figure
Seems like a very basic question...yet no answer !! If you go to the Russian forum they've been discussing MT5 for a very long time and are very in depth....
We are at square one and can't even get a simple response....
Well,I can't understanding the help word,Because it is Russian.You know that I am china. I am not good at English .Who can help us!
I need a English help word!

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Folks, Can any one show me how to send a market order in MQL5.
I just downloaded the platform but after several couple hours trials have not been successful in sending an order from a simple Expert Advisor.
This is my Ordersend structure in MQL4 for a market buy: How will I structure this in MQL5.
OrderSend(Symbol(), OP_BUY, Lots, Ask, 3, Ask - 250* Point, Ask + 250* Point, "MQL4 Sample", MagicNumber1, 0, Blue);