| Registered User Joined: 3/8/2010
 Posts: 129
 
 | 
	Hi Bruce.how would I do a condition , So that the H and L over the last 8 bars would not be higher or lower , by no more than,  .10 of 1%, of  the average H-L ,over the 8 bars.  loking for a very tight side ways range .  
	Thanks Peter | 
	
	|  
  Worden Trainer
 
 Joined: 10/7/2004
 Posts: 65,138
 
 | 
	If I am understanding the requirements correctly (which is not guaranteed). 
	MINL8 >= .999 * AVGL8 AND 1.001 * AVGL8 >= MAXL8 AND MINH8 >= .999 * AVGH8 AND 1.001 * AVGH8 >= MAXH8 
 -Bruce
 Personal Criteria Formulas
 TC2000 Support Articles
 | 
	
	| Registered User Joined: 3/8/2010
 Posts: 129
 
 | 
	Hi bruce , not sure yet?  but does this formula give that no H orL of any of the 8 candles ,go out side the average  .10 of the average ?  I want all candle to not have gone out of the average. | 
	
	|  
  Worden Trainer
 
 Joined: 10/7/2004
 Posts: 65,138
 
 | 
	It makes sure none of the lows are more than 0.1% away from the average low and none of the highs are more than 0.1% away from the average high. 
	If you only care about if the highs or lows go outside the range by more then 0.1%, the formula might be shorter. The reduces the number of required comparisons by half. 
	MINL8 >= .999 * AVGL8 AND 1.001 * AVGH8 >= MAXH8 
	If you meant 0.10 or 1% instead of 0.10 of 1% but are treating highs and lows separately as in my first response, maybe the following? 
	(MINL8 >= .99 * AVGL8 AND 1.01 * AVGL8 >= MAXL8 AND MINH8 >= .99 * AVGH8 AND 1.01 * AVGH8 >= MAXH8) OR (MINL8 >= AVGL8 - .01 AND AVGL8 + .01 >= MAXL8 AND MINH8 >= AVGH8 - .01 AND AVGH8 + .01 >= MAXH8) 
	If you only care about if the highs or lows go outside the range by more then 0.10 or 1%: 
	(MINL8 >= .99 * AVGL8 AND 1.01 * AVGH8 >= MAXH8) OR (MINL8 >= AVGL8 - .1 AND AVGH8 + 1 >= MAXH8) 
 -Bruce
 Personal Criteria Formulas
 TC2000 Support Articles
 |