Adjustable MA 3G

bubo

Trader
Jul 31, 2014
2
0
12
I tried to backtest the EA in MT4 build 670, but got a zero divide error for the indicator (at 76,50).

In the iCustom call of the EA (lines 99, 100) there is no input parameter for the sampling period of the indicator.

Not sure if the new build processes differently, or if this MT4 version of the EA has not been updated.
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,212
1,504
144
Odesa
www.earnforex.com
I tried to backtest the EA in MT4 build 670, but got a zero divide error for the indicator (at 76,50).

In the iCustom call of the EA (lines 99, 100) there is no input parameter for the sampling period of the indicator.

Not sure if the new build processes differently, or if this MT4 version of the EA has not been updated.

Are you talking about this EA? What time period for testing do you use? What currency pair and timeframe? Input parameters?

Backtesting on EUR/USD @ M5 (every tick) on 2008-04-01 through 2014-01-24 does not generate any errors.
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,212
1,504
144
Odesa
www.earnforex.com

Freddy Tri

Trader
May 24, 2018
2
0
11
44
Hello,
I'm new here, this EA running good on backtes with appropriate TP/SL and TF
Can it modified to close running order by opposite of MA cross
Example : Running Buy position will be closed after meet Sell condition and continued with Opened Sell position
Thank you
image.jpg
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,212
1,504
144
Odesa
www.earnforex.com
@Freddy Tri, the EA is already functioning this way - it closes the previous trade on an opposite signal and opens a new one. Please use the input parameter MinDiff if you want to increase the sensitivity of the crosses. You might also want to remove this part of the code if you want the difference between MAs of less than 1 standard pip to qualify as a cross:
MQL4:
    // Checking for unconvetional Point digits number.
   if ((Point == 0.00001) || (Point == 0.001))
   {
      Poin *= 10;
      Deviation *= 10;
   }
 

Freddy Tri

Trader
May 24, 2018
2
0
11
44
@Freddy Tri, the EA is already functioning this way - it closes the previous trade on an opposite signal and opens a new one. Please use the input parameter MinDiff if you want to increase the sensitivity of the crosses. You might also want to remove this part of the code if you want the difference between MAs of less than 1 standard pip to qualify as a cross:
MQL4:
    // Checking for unconvetional Point digits number.
   if ((Point == 0.00001) || (Point == 0.001))
   {
      Poin *= 10;
      Deviation *= 10;
   }
Okey thank you Sir
But it didn't work on mt5, the opposite positions open but the previous not closed
 
Last edited: