OrderSend error: 4111,4110

 

When I set “Long Only” or “Short Only” in the advisor settings, the terminal sees error 4110 or 4111, how can I write a check for position allowing in the code before completing the OrderSend function.

how can I get the value of this position in the EA code

Documentation on MQL5: Trade Functions / OrderSend
Documentation on MQL5: Trade Functions / OrderSend
  • www.mql5.com
OrderSend - Trade Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5