Hi. Recently I have devoloped simple EA, code seems to be ok in my terminal, no errors so far, but when I'm trying to upload my EA to MQL market it doesn't pass automatic validation, error 131 appears - invalid trade volume. have anyone idea what it could be? here's the code :
Maybe you need to call minlot, maxlot and lotstep in LotsOptimized().
Also print your values to see if there's any abnormal numbers.
Try add a line below in your code