Volume limit reached problem when publishing the EA

 

Hi everyone, there is an issue I saw many people had when they were trying to publish their EAs.

Here is some output I get(errors).

2019.04.05 03:30:00   failed instant sell 0.75 EURUSD at 1.12243 sl: 1.12503 tp: 1.11463 [Volume limit reached]
 2019.04.05 09:00:00   failed instant sell 0.75 EURUSD at 1.12260 sl: 1.12520 tp: 1.11480 [Volume limit reached]
 2019.04.08 06:30:00   failed instant sell 0.75 EURUSD at 1.12259 sl: 1.12519 tp: 1.11479 [Volume limit reached]

And many more like this. About 10 trades with volume limit reached.

For the checks I've done, I am rounding the lot size, also if the SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MAX) returns 0 then I am taking max volume as my lot size, then I am calculating a sum of all opened trades to see if with opening this one, it will go above the max_volume.

Can someone suggest any more checks, because I can't reproduce this issue in strategy tester so I don't know how to debug it?

Thanks in advance!

 
I have in trouble with the same issue, too. Even if i check the allowed max volume for an order before openning it, this error still blocking to publish my ea. Did you find any solution ?
 
Faik Kemal #: I have in trouble with the same issue, too. Even if i check the allowed max volume for an order before openning it, this error still blocking to publish my ea. Did you find any solution ?

You also have to check the overall volume limit: SYMBOL_VOLUME_LIMIT

Maximum allowed aggregate volume of an open position and pending orders in one direction (buy or sell) for the symbol. For example, with the limitation of 5 lots, you can have an open buy position with the volume of 5 lots and place a pending order Sell Limit with the volume of 5 lots. But in this case you cannot place a Buy Limit pending order (since the total volume in one direction will exceed the limitation) or place Sell Limit with the volume more than 5 lots.