EMA Crossover (help) - page 2

 
newdigital:
MACD? But you have MACD indicator in MetaTrader and you can change it to 34 or 5.

the problem is .. i want to change the period into 34,5 not 34 or 5 ..

 

MACD periods

nuaing:
the problem is .. i want to change the period into 34,5 not 34 or 5 ..

nuaing,

The parameter data type of the MACD period is an Integer, so you can not use 34.5 (double).

 

I think it is the last version.

Some indicators were added as a filers and the default setting of the EA was optimised.

Files:
 
newdigital:
I think it is the last version. Some indicators were added as a filers and the default setting of the EA was optimised.

It was not last.

This version is the last one. This version of EA is working with I_XO_A_H.mq4 indicator.

Files:
 

Some default settings was optimised.

And please find the backtesting statements.

Modelling quality 84.9%

M30 timeframe.

 
newdigital:
Some default settings was optimised.

And please find the backtesting statements.

Modelling quality 84.9%

M30 timeframe.

This EA may be good for GBPUSD.

 
newdigital:
Some default settings was optimised.

And please find the backtesting statements.

Modelling quality 84.9%

M30 timeframe.

I modified this a little. Just to backtest easy.

This version (versions 5 and 6) is using I_XO_A_H indicator as a filter.

Files:
 
newdigital:
I modified this a little. Just to backtest easy. This version (versions 5 and 6) is using I_XO_A_H indicator as a filter.

just trying to uderstand the logic here.

if ((diMA0 >= diMA1 && diMA2 diStochastic5 && diSAR6 < diSAR7 && diSAR8 d22))

{

OpenBuy();

return(0);

}

if ((diMA11 diMA14 && diStochastic15 diSAR18 && diSAR19 > diSAR20 && diIXO21 < d22))

{

OpenSell();

return(0);

}

Why you are checking MA twice? diMA0 >= diMA1 && diMA2 < diMA3

Is it because of Shift??? What is shift?

thanks

 

shift is bar: 0 is current bar, 1 is previous bar.

It is if one MA is below the other MA 2 bar ago but above 1 bar ago - so it is the crossing.

It is the same as X/Y scale. 'Bar' is horizontal scale (same with time scale).

So we are having the value of MA indicator and when this value was taken (bar).

 
newdigital:
shift is bar: 0 is current bar, 1 is previous bar.

It is if one MA is below the other MA 2 bar ago but above 1 bar ago - so it is the crossing.

It is the same as X/Y scale. 'Bar' is horizontal scale (same with time scale).

So we are having the value of MA indicator and when this value was taken (bar).

Thanks mate, but here "diMA0>=diMA1 && diMA2<diMA3 then OpenBuy()" where

double diMA0=iMA(NULL,0,MAsmall,0,MAsmallMode,PRICE_CLOSE,0);

double diMA1=iMA(NULL,0,MAbig,0,MAbigMode,PRICE_CLOSE,0);

double diMA2=iMA(NULL,0,MAsmall,0,MAsmallMode,PRICE_CLOSE,1);

double diMA3=iMA(NULL,0,MAbig,0,MAbigMode,PRICE_CLOSE,1);

so that means that when current bar is abiove or equal to previous one (means its heading up) and MA2 (which is fast i believe) is lower then MA2 (slower) then buy??? I thought when slower is crossing below then its a buy order - shouldnt the logic be diMA0>=diMA1 && diMA2>diMA3 then OpenBuy ????

or should i change the following variables to

extern double MAsmall = 25;

extern double MAbig = 10; ????

Reason: