LotSize/8.0
remember to check MODE_MINLOT & MODE_LOTSTEP
I've been printing the Lotsize and it says I'm trying to buy zero lots?? this is just happening immediately after the EA initialises. I could wait a couple of days and see if it happens again.
Min lot and max lot are part of my comment()s.
MetaNt:
Min lot and max lot are part of my comment()s.
Min lot and max lot are part of my comment()s.
but not in the calculation of the LotSize
qjol:
but not in the code
but not in the code
What I meant was that the minlot is 0.01 the maxlot is 100 (as calculated and commented on the chart) the volume of the trade is well within these limits (as calculated and commented on the chart)
are you sure the returning error code 4051 is from OrderSend ?
try:
OrderSend(....
GetLastError();
Ah fixed it, it was an initialisation issue, I needed to define Lotsize during initialisation.
regardless (or not) why use a calculation (LotSize/8) inside OrderSend function
especially when it can cause problems such as error 131
qjol:
regardless (or not) why use a calculation (LotSize/8) inside OrderSend function
especially when it can cause problems such as error 131
Just further scaling it's part of the strategy, there is most likely a better alternative.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
During my demo testing I have received this error 4051, after checking my ordersend() lines I have come to the conclusion that everything is in order.
Please note that I added the clr before the colour names as this was suggested by the new mql4 syntax.