% Equity => Lots intermittent error?
-
Hi, I have a problem that only shows up intermittently and I'm hoping to try and find out what might be the cause.
I have Sell / Buy blocks that are set to % Equity => Lots and in the 'How Much' field has a Constant (defined as say 14000).
In back testing this happily opens lots as a percentage of the equity but when run on a live account I randomly get the error:
'Not enough money to trade 200.00, the volume to trade will be the maximum possible of x.xx' (where x.xx is just whatever the maximum is for the account equity)
Clearly the EA is trying to open the absolute maximum possible LOT and the broker is just defaulting to the maximum possible for the account equity. I am on IC Markets 1:500 so it's not a leverage problem. Obviously I don't want this as large positions can suddenly be opened. Is it a stored constant problem (i.e. The constant is lost temporarily or something) or something else. It only seems to happen on a handful of trades despite the same Buy and Sell blocks running.
I have tried deleting and recreating blocks, switching between Constants and Variables. I have tried it with different VPSs on MQL and AWS and on different accounts but the same thing happens. Any ideas am I doing wrong?
I have switched to running a formula for X lots per 100 equity for now as a workaround but I would be a bonus to know why this happened.
Thanks
-
@droctagon Do your trades have an initial SL? That money management option needs an initial SL to work correctly.
-
Thanks for replying, yes the Sell / Buy blocks have an SL, also defined as a Constant. The SL shows up fine. I find it strange that you have to have a SL when defining the Equity => Lots though? Shouldn't they be completely independent of each other (i.e. what if you wanted to trade with virtual SL or just Trailing Stop)... don't worry if this is going off track...
-
@droctagon If we were programmers that wouldn't matter, certainly because we would be able to find the code to make it work. However, we're not and that block option is the only element we have, so there is no choice.