Using moving average.ex4, i change input lot to 1,2,3, but the tab 'Results" show the size still 0.1
Hi, I am a starter. Using moving average.ex4, i change input lot to 1,2,3, but the tab 'Results" show the size still 0.1 .
Can anyone explain the odd phenomenon?
Can anyone help? Many thanks.
I've never used it,
But I was curious so I had a quick look at the source code.
It seems like a bug in the EA.
The EA ignores the 'Lots' input variable and calculates the lot based on the 'MaximumRisk' input variable (with a min lot of 0.10).
I don't know why MetaQuotes have decided to release this example EA with such an obvious logical bug...
Hi, I am a starter. Using moving average .ex4, i change input lot to 1,2,3, but the tab 'Results" show the size still 0.1 .
Can anyone explain the odd phenomenon?
Can anyone help? Many thanks.
I've never used it,
But I was curious so I had a quick look at the source code.
It seems like a bug in the EA.
The EA ignores the 'Lots' input variable and calculates the lot based on the 'MaximumRisk' input variable (with a min lot of 0.10).
I don't know why MetaQuotes have decided to release this example EA with such an obvious logical bug...
It's not a bug, it's due to a lot of optimizing functions in the code. If you make the decrease factor in the entries zero, it will process the lots as you write.
It's not a bug, it's due to a lot of optimizing functions in the code. If you make the decrease factor in the entries zero, it will process the lots as you write.
No it will not.
This is the code snippet of the EA (LotOptimized function. lines 42-46)-
double lot=Lots; int orders=HistoryTotal(); // history orders total int losses=0; // number of losses orders without a break //--- select lot size lot=NormalizeDouble(AccountFreeMargin()*MaximumRisk/1000.0,1);
The above is the only reference to the 'Lots' input variable,
Which assign its value to the local 'lot' variable.
As you can clearly see- after only 3 lines the local 'lot' variable is overwritten with a different value.
Since, as stated, the above is the only reference to the 'Lots' input variable,
And after only 3 lines the local variable which stores the 'Lots' value is overwritten-
Essentially 'Lots' input variable is useless.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, I am a starter. Using moving average.ex4, i change input lot to 1,2,3, but the tab 'Results" show the size still 0.1 .
Can anyone explain the odd phenomenon?
Can anyone help? Many thanks.