ERR_TRADE_TOO_MANY_ORDERS

 

Hello,

Is it possible to know via a function like MarketInfo or another method the maximum of possible orders before getting the ERR_TRADE_TOO_MANY_ORDERS occurs?

Of course I can count the number of opened positions when the error occurs but I'm wondering if there is a more clean way to catch the correct value?

Thanks

 
If I remember correctly there is a hard limit of 100  or 120 orders.
 
I believe it is broker dependent. IBFX was 1,000 IIRC
 
Yes this is broker dependent, especially in demo modes. Limits or often 80 or 100... so do you think there is better function than my method to detect this?
 
thanks
 

Maybe "AccountInfoInteger(ACCOUNT_LIMIT_ORDERS)" can help you.

if Total Order < Account Limit Order, then you can open new order.

Reason: