How to use OrderSend() function to open a order in EA,please give a example,thank you. - page 2

 
luenbo:

No, I wanted to leave SL in 0 but after this error I thought it shouldn't be 0, so I changed it to an unreachable value.anyhow, when it was 0 the same error was thrown.

 
paladin800:

Article Trade Operations in MQL5 - It's Easy, read it carefully and several times. After I red this I have no problems with trade operations in MQL5.

Thank you its useful :D
 
RaptorUK:
What is your SYMBOL_TRADE_STOPS_LEVEL  ?
I don't know what is that? now my expert opens sell orders but it needs more pips to open buy order.
 
amin_mohammadi:
I don't know what is that? now my expert opens sell orders but it needs more pips to open buy order.
Your stops (SL/TP) need to be at least SYMBOL_TRADE_STOPS_LEVEL points from open price. You have to check what is this value for the symbol you trade.
Documentation on MQL5: Standard Constants, Enumerations and Structures / Indicator Constants / Price Constants
Documentation on MQL5: Standard Constants, Enumerations and Structures / Indicator Constants / Price Constants
  • www.mql5.com
Standard Constants, Enumerations and Structures / Indicator Constants / Price Constants - Documentation on MQL5
 
angevoyageur:
Your stops (SL/TP) need to be at least SYMBOL_TRADE_STOPS_LEVEL points from open price. You have to check what is this value for the symbol you trade.
Great, thank you, I really need this :D
 

Hello


how to design an expert advisor which just check balance and trade in mentioned currency pairs without tp or sl. it should variable currency pairs and buy or sell.  kinldy help it would be good help for me.

Reason: