Thread: Ask!
View Single Post
  #1043 (permalink)  
Old 04-08-2008, 02:38 PM
Michel Michel is offline
Senior Member
 
Join Date: Feb 2006
Posts: 546
Michel is on a distinguished road
Quote:
Originally Posted by Dave137 View Post
What is an easy statement to check to see if 2 moving averages have crossed within 5 bars before the current bar?? Can anybody help me with this??
Dave
PHP Code:
ma1_0 iMA(....,0);
ma2_0 iMA(....,0);
ma1_5 iMA(....,5);
ma2_5 iMA(....,5);

if((
ma1_0 ma2_0) * (ma1_5 ma2_5) < 0cross true
Reply With Quote