This is MT5 | bool OrderSend(const MqlTradeRequest&,MqlTradeResult&) |
This is MT4 | ticket = OrderSend(_Symbol, ORDER_TYPE_SELL, lotSize, SymbolInfoDouble(_Symbol, SYMBOL_ASK), 3, 0, 0, "Sell Order", magicNumber, 0, Blue); |
This is MT5 | |
This is MT4 |
could you please give code for this line only for MT5 version below :
ticket = OrderSend(_Symbol, ORDER_TYPE_SELL, lotSize, SymbolInfoDouble(_Symbol, SYMBOL_ASK), 3, 0, 0, "Sell Order", magicNumber, 0, Blue);
could you please give code for this line only for MT5 version below :
ticket = OrderSend(_Symbol, ORDER_TYPE_SELL, lotSize, SymbolInfoDouble(_Symbol, SYMBOL_ASK), 3, 0, 0, "Sell Order", magicNumber, 0, Blue);
Search: https://www.mql5.com/en/search#!keyword=OrderSend&module=mql5_module_documentation
ticket = OrderSend(_Symbol, ORDER_TYPE_SELL, lotSize, SymbolInfoDouble(_Symbol, SYMBOL_ASK), 3, 0, 0, "Sell Order", magicNumber, 0, Blue);
You don't replace just one line, it must be rewritten. MT4 only has orders (pending and open). MT5 has orders, deals, and positions.
No, not all good. That one line shows that a large part of your code is not compatible with MQL5.
You probably generated it using ChatGPT (or other A.I.) which produces horrible code, mixing MQL4 and MQL5.
So, please don't request help for generated code. Learn to properly code in MQL5 or hire a programmer in the Freelance section.
- 2024.01.20
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
any one tell why i got 'OrderSend' - wrong parameters count built-in: bool OrderSend(const MqlTradeRequest&,MqlTradeResult&)
any one clarify ??
// Open a sell order