Cannot figure out 131 invalid trade volume on DAX and US30
8 replies
jmtc1230
6 years ago #116714
Hey all,
Can anybody advise me in this? I am having an issue with using the proper lot sizes for DAX and US30. Broker is IC Market.
Settings in the EA are:
Lots = .1
Lots Decimals = 2
Specifications from broker are:
Digits = 2
Contract size = 1
Minimal volume = 1.00
Max volume = 250
Volume step = 1.00
Code in the EA is:
AND HERE IS THE RESULT FROM TRADING:
2017.04.24 14:59:59.948 4008 Strategy 13.31 US30,H1: 2017.04.24 22:00:00 Error opening order: 131 : invalid trade volume
My goal is to have the EA request lots of 1.0. I am not sure how to accomplish this.
Thank you for your input. I appreciate it.
tomas262
6 years ago #142738
Hello,
try to change extern int LotsDecimals = 2; to extern int LotsDecimals = 1;
It could solve the issue with the invalid volume error 131
Let me know
jmtc1230
6 years ago #142744
Tomas,
Thanks for the tip but there is no improvement. Can you take another look into this please? Thanks for the input.
Josh
jmtc1230
6 years ago #142759
jenial
6 years ago #142761
I have ths same issue with Lmfx broker, haven’t figured out yet how to solve this issue.
tomas262
6 years ago #142770
Hello,
the Dax strategy works for me. See screenshot. With the error message there should be also message about lot size applied. What lot size it tried to trade causing error? Can you check that? I suspect it has something to do with settings at your brokerage
jmtc1230
6 years ago #142774
tomas262
6 years ago #142776
Hello,
your broker’s Minimal volume = 1.00 but you use 0.5 lots in the EA. That’s the problem. Set extern double MaximumLots = 1.0; or higher and it will work with MM = false
jmtc1230
6 years ago #142781
Tomas,
Your last comment nailed it. Thank you so much for you help. The lots must be 1.0 and the max lots must be higher than that.
Josh
Viewing 8 replies - 1 through 8 (of 8 total)