Registered User Joined: 9/20/2014 Posts: 6 
	 | 
	
		 
	Hi, 
	I would like to know if there is a PCF formula that allows me to workout the steepness of the difference between moving averages e.g (21EMA - 34EMA). Basically I am trying to workout the first derivative of an indicator that tracks the difference between moving averages. I would like the output to be a number, e.g. 2, 1.5, 1, . Which would allow me to make comparison across different stocks. 
	Many Thanks in advance 
	 | 
	
	
		 
   Worden Trainer
  Joined: 10/7/2004 Posts: 65,138 
	 | 
	
		 
	So just the change in 21EMA - 34EMA between the previous and the current bar? 
	(13 * C - 35 * XAVGC21.1 + 22 * XAVGC34.1) / 385 
	Or maybe the following as it easier to modify. 
	XAVGC21 - XAVGC34 - XAVGC21.1 + XAVGC34.1 
	The first one should be slightly more efficient. 
  -Bruce Personal Criteria Formulas TC2000 Support Articles
	 | 
	
	
		Registered User Joined: 9/20/2014 Posts: 6 
	 | 
	
		 
	Hi Bruce, 
	Thank you so much for the equation.  
	As for the first equation, if i where to apply it to (2EMA - 8EMA) between the previous and current bar. 
	Would it be (6 * C - 9* XAVGC2.1 +3*XAVGC8.1) / 385? If not could you provide the correct equation. 
	Once again thank you so much for your help 
	Kind Regards 
	  
	  
	  
	 | 
	
	
		 
   Worden Trainer
  Joined: 10/7/2004 Posts: 65,138 
	 | 
	
		 
	It would actually be: 
	(2 * C - 3 * XAVGC2.1 + XAVGC8.1) / 4.5 
	Not sure if that is better than the following or not. 
	(4 * C - 6 * XAVGC2.1 + 2 * XAVGC8.1) / 9 
	The difference equation for exponential moving averages can be expressed as follows. 
	XAVGCP = a * XAVGCP1 + (1 - a) * C 
	Where: 
	a = (P - 1) / (P + 1) 
	So what I'm doing is expressing this using the moving averges. 
	XAVGC2 - XAVGC8 - XAVGC2.1 + XAVGC8.1 
	And then replacing XAVGC2 with a version created from XAVGC2.1 and C and replacing XAVGC8 with a version created from XAVGC8.1 and C. This allows us to use two EMAs in the formula instead of four EMAs and three terms instead of four terms. 
	(XAVGC2.1 + 2 * C) / 3 - (7 * XAVGC8.1 + 2 * C) / 9 - XAVGC2.1 + XAVGC8.1 
	(9 * XAVGC2.1 + 18 * C - 21 * XAVGC8.1 - 6 * C - 27 * XAVGC2.1 + 27 * XAVGC8.1) / 27 
	(12 * C - 18 * XAVGC2.1 + 6 * XAVGC8.1) / 27 
	(4 * C - 6 * XAVGC2.1 + 2 * XAVGC8.1) / 9 
	(2 * C - 3 * XAVGC2.1 + XAVGC8.1) / 4.5 
  -Bruce Personal Criteria Formulas TC2000 Support Articles
	 | 
	
	
		Registered User Joined: 9/20/2014 Posts: 6 
	 | 
	
		 
	Bruce, 
	I am indebted to you. I will take time to go through your equation. 
	Many Thanks 
	Tino 
	 | 
	
	
		 
   Worden Trainer
  Joined: 10/7/2004 Posts: 65,138 
	 | 
	
		 
	You're welcome. 
  -Bruce Personal Criteria Formulas TC2000 Support Articles
	 |