Error with MarketInfo


Got a problem here.

I'm working on an EA, obviously, but I discovered a problem when trying to create orders. I have the lotsize increase by 2x on each reversal. Well, on small lot sizes (0.03, 0.06, etc.) it's fine.

The problem is when it gets to lot sizes above 2.5

For some reason the program will not let me enter anything above that value automatically. If I manually code a 4, it will work, but only if I manually put it into the OrderSend() statement. If I put it into a variable and try to plug it in, it breaks.


OrderSend(OP_BUY,4,..... WORKS

Lots = 4

OrderSend(OP_BUY,Lots,.... FAILS

Basically, I discovered that on every currency the program will give a MarketInfo(Symbol(),MODE_MAXLOT) size of 2.5

Anything above this will fail if not manually coded.

I have no idea why. You can manually open trades of 8 lots or more on all of the symbols.

I'm using the Neuimex Trading Terminal (MT4) version 4, build 196.

Any help? PLEASE!

(FYI I have the same EA working on a friend's comp who is using the MIG terminal and it's having the same problem.)


*bump* *bump*

No one knows?


I am not sure if the limits are that low. I have seen people trading 10 lots or more, using EAs and it works fine. Did you check the algorithm on how "Lots" is calculated? Also, make sure that it is declared as a double variable type.

Igor Durkin
Igor Durkin  

Try to do the same with other broker because MAX_LOT is being set by the broker.