is there a solution for the negative shift ???

 

hello , With simpler EA for moving average cross , when i make the shift of MA negative (-5) , all deals are wrong 

is there a solution for the negative shift ??? 

 
Waddah:

hello , With simpler EA for moving average cross , when i make the shift of MA negative (-5) , all deals are wrong 

is there a solution for the negative shift ??? 

If you have a negative shift (-5) then if you try to check the values for Bar[0] to Bar[4] you will get the value as 0
 
Keith Watford:
Keith Watford:
If you have a negative shift (-5) then if you try to check the values for Bar[0] to Bar[4] you will get the value as 0
thanks , I know that , I am looking for solution ....
 
Waddah:

hello , With simpler EA for moving average cross , when i make the shift of MA negative (-5) , all deals are wrong 

is there a solution for the negative shift ??? 

A solution to what ? a negative shift is in the future.