Registered User Joined: 6/30/2014 Posts: 60 
	 | 
	
		 
	Hi Bruce, 
	First thing, first.  I know that this is your job, but anyways:  THANK YOU for YOUR GREAT SUPPORT. 
	I am trying to code for the MACD HISTOGRAM (8,18) with a rsi6 bouncing up from its 5 day max low.  This is what I have so far and it almost works: 
	IIF(MACD(8,18)-XAVG(MACD(8,18),9)>MACD(8,18,1)-XAVG(MACD(8,18,1),9) AND     MACD(8,18,1)=MIN(MACD(8,18),5) AND MACD(8,18,1)<0,4,1/0) 
	for example VRA is TRUE on 7/17 not 7/16 ; 8/3 not 7/31 
	What have I done wrong? 
	Thanks 
	HarleyBD 
	 | 
	
	
		Registered User Joined: 6/30/2014 Posts: 60 
	 | 
	
		 
	 
	So , I see my mistake, I was comparing Apples to Tomatoes and coming up with mystery meat.  I was wanting to check the MACD histogram on a 8,18 schedule, but then checking only the MACD 8,18. 
	  
	Here is what I now have, which I'm sure can be compressed: 
	IIF(MACD(8,18)-XAVG(MACD(8,18),6)>MACD(8,18,1)-XAVG(MACD(8,18,1),6) AND MACD(8,18,1)-XAVG(MACD(8,18,1),6)= LEAST((MACD(8,18,1)-XAVG(MACD(8,18,1),6)),(MACD(8,18,2)-XAVG(MACD(8,18,2),6)),(MACD(8,18,3)-XAVG(MACD(8,18,3),6)),(MACD(8,18,4)-XAVG(MACD(8,18,4),6)),(MACD(8,18,5)-XAVG(MACD(8,18,5),6))) 
	 AND MACD(8,18)-XAVG(MACD(8,18),6)<0,4,0) 
	  
	  
	 | 
	
	
		 
   Worden Trainer
  Joined: 10/7/2004 Posts: 65,138 
	 | 
	
		 
	I am happy to read you were able to figure it out on your own. 
	You can shorten it a bit to the following. 
	IIF(XAVGC18 + 5 * XAVGC6 < 6 * XAVGC8 AND 40 * C + 266 * XAVGC8.1 > 21 * XAVGC18.1 + 285 * XAVGC6.1 AND XAVGC18.1 + 5 * XAVGC6.1 - 6 * XAVGC8.1 = MIN(XAVGC18.1 + 5 * XAVGC6.1 - 6 * XAVGC8.1, 5), 4, 0) 
  -Bruce Personal Criteria Formulas TC2000 Support Articles
	 | 
	
	
		Registered User Joined: 6/30/2014 Posts: 60 
	 | 
	
		 
	Thank you  Bruce for the shorter form. 
	HarleyBD 
	 |