
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
OrderSend
use Print("Lot size: "+Lots); before OrderSend function and observe the lot size in the terminal expert log.
use Print("Lot size: "+Lots); before OrderSend function and observe the lot size in the terminal expert log.
Hello,
thanks for your reply.
In the backtest the EA behaves like it's supposed to be:
2024.03.14 23:43:01.172 2021.02.05 17:00:00 TestEA v1.00 EURNZD,H1: open #11 sell 0.01 EURNZD at 1.67230 ok
2024.03.14 23:43:01.172 2021.02.05 17:00:00 TestEA v1.00 EURNZD,H1: Enter sell 1 trade for EURNZD | lots: 0.01
I tried my code with 1.000.000 € and 1.000 € as deposit. The EA-calculations are correct.
Does someone has some other thoughts?
Hello,
Does someone has some other thoughts?
Hello,
Try to apply this check:
Hello,
Try to apply this check:
Hello,
thanks for the idea. I already implemented this.
The error refers to https://www.mql5.com/en/articles/2555#invalid_lot
Do I have to use this specific function? How do I use
&description
This is an input. What do I have to insert here?
Maybe this helps? Bu honestly I don't think so.
Normally I use such a code to cut digits
Is this something different to your code?
Hello,
I would like to upload my EA-structure with simplified code - I got rid of all code which is not relevant for the topic (mostly). This upload to mql does not work either.
Is there somewhere a mistake which I don't see? The mq4-file is attachted
This is really anoying as it works in Backtests & live trading...
I appreciate any help! :-)
test on EURUSD,H1 2021.04.05 16:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.05 16:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.05 16:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.05 16:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.05 16:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.05 16:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.05 16:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.05 16:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.05 16:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.05 16:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.05 20:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.05 20:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.05 20:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.05 20:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.05 20:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.05 20:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.05 20:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.05 20:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.05 20:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.05 20:00:00 Test_EA EURUSD,H1: OrderSend error 131 2021.04.06 00:00:00 Test_EA EURUSD,H1: OrderSend error 131 strategy tester report 7 total trades
About using NormalizeDouble(..) in cases other than prices for sending orders
=======================================================================
Most cases of using NormalizeDouble(..) at least are useless
Many => harmful like this => mql5.com/ru/forum/160683/page1049
=======================================================================
This statement is similar to
if ( lots < minLot ) lots = minLot ;
Both are very popular but very incorrect
Because lead to the possibility of taking more risk than allowed by risk-management calculations of =lots=
For example when lots = 0.01 and minLot = 0.10 then accepted risk will be 10 times greater than required
Must be
Links
https://www.mql5.com/en/forum/111230
https://www.mql5.com/en/forum/112782
https://www.mql5.com/en/forum/132147
https://www.mql5.com/en/forum/336236