Been running strategyquant created ea on live account but notice sometimes get error message on metatrader terminal. (running ea on 2 different brokers live accounts). Both accounts get this message at the same time and on the same currency pair : Order failed error : 4051 Invalid lots amount for order send function.
The ea is programmed to open a set lot amount of 0.01 lots.
Does anyone know why this error message comes up sometimes and does not open position?
hm, this error means incorrect parameter was used. Can you check in the journal what is the order size it is trying to open?
Does it happen only sometimes and other times the orders are opened correctly?
I cannot say what could cause this now, without knowing more details.
Yes, it only happens sometimes. Most of the time it’s fine. I have the ea programmed to only open orders with the minimum lot size of 0.01 lots for any order. I could not see any details in the journal where it provides any information about the lot size it is trying to open. It seems that when 4 or 5 orders are already opened it does not want to open any more? But I have not programmed this into the ea. I have not included a maximum number of orders allowed but it seems this may be the problem? I also open 2 orders at the same time (using different trailing stops) but I don’t think this could be the problem? or maybe it could be??
You must be logged in to reply to this topic.