NonLagMA Crossover EA Help - page 2

 

Why you don´t use the Shift?

double dFastMA1 = iCustom(sSymbol,CurrentTimeFrame,sMAIndicatorName,0,iFastMAPeriod,0,0,1,1,0,0,0,0,1);
double dSlowMA1 = iCustom(sSymbol,CurrentTimeFrame,sMAIndicatorName, 0,iSlowMAPeriod,0,0,1,1,0,0,0,0,1);

double dFastMA2 = iCustom(sSymbol,CurrentTimeFrame,sMAIndicatorName,0,iFastMAPeriod,0,0,1,1,0,0,0,0,2);
double dSlowMA2 = iCustom(sSymbol,CurrentTimeFrame,sMAIndicatorName, 0,iSlowMAPeriod,0,0,1,1,0,0,0,0,2);



If (dFastMA2 < dSlowMA2 && dFastMA1 > dSlowMA1)

{

//Cross up

}

If (dFastMA2 > dSlowMA2 && dFastMA1 < dSlowMA1)

{

//Cross Down

}




 
Sorry for the slow response, my main computer went the way of the dodo this weekend so I have lost access to the files/code for the time being. When I sort it out I will try out what you suggested, thankyou for your help so far.
Reason: