easiest slope is the ROC function. Basicly gives you the slope in percentage 
terms over a function of your liking (MA1), over the period of you liking.

so for example the 1 bar slope of MA1 and MA2 in percentage terms are:

per = 1; // period

MA1 = MA(Close,50); ROCMA1 = ROC(MA1,per);
MA2 = MA(Close,20); ROCMA2 = ROC(MA2,per);

rgds, Ed



  ----- Original Message ----- 
  From: jfenello 
  To: [email protected] 
  Sent: Saturday, February 21, 2009 11:12 PM
  Subject: [amibroker] Slope of Moving Averages



  Anyone figure out how to test the slope of a moving average
  before executing a position?

  I keep getting stuck with testing an array, as in:

  MA1 = MA(Close,50);
  MA2 = MA(Close,20);
  if (MA1[1] < MA1[2]) Short = Cross(MA1,MA2);


  

Reply via email to