how to request to mt4 allowing the developer to know the max simultaneous opened orders from broker without having to get the error 148

 

how to request to mt4 allowing the developer to know the max simultaneous opened orders from broker without having to get the error 148?

 

Shouldn't they add in MQL4 language a function to know the maximum simultaneous opened orders? 

 
triangulitos: Shouldn't they add in MQL4 language a function
  1. This is a user's forum not Metaquotes.
  2. Until they do, you can use an external.
  3. The reality is that you will exceed margin long before you reach it. Check FreeMargin to avoid stop out
 
OrdersTotal()
 
gooly: OrdersTotal()
Sorry Gooly that tells you how many you have, not the maximum you can have.
Reason: