| Welcome Guest, please  sign in  to participate in a discussion. | 	Search | 	Active Topics |  | 
	
	
	
	
		Registered User Joined: 9/14/2006 Posts: 11 
	 | 
	
		Without writing an absurdly long PCF, is it possible to determine the minimum value of a custom indicator over a period of 161 bars (6 months). My end goal is to determine if the current value is less than the minimum value over the last 6 months. A true/false answer or a net value is acceptable.
  Thanks, Richard
	 | 
	 | 
	
	
	
		 
   Worden Trainer
  Joined: 10/1/2004 Posts: 18,819 
	 | 
	
		Give me the custom indicator and lets see.  As an aside, there are generally 125-130 trading days in 6 months.
  - Craig Here to Help!
	 | 
	 | 
	
	
	
		Registered User Joined: 9/14/2006 Posts: 11 
	 | 
	
		Sorry for the typo on the number of bars in 6 mos. It should be 126 (approximate). The indicator is Bollinger's Bandwidth which is 4 standard deviations of price. For a period of 20 bars, the formula is as follows:
  4*SQR(ABS(C^2+C1^2+C2^2+C3^2+C4^2+C5^2+C6^2+C7^2+C8^2+C9^2+ C10^2+C11^2+C12^2+C13^2+C14^2+C15^2+C16^2+C17^2+C18^2+C19^2-20*AVGC20^2)/19)/AVGC20*100
  One of Bollinger's techniques is to scan for a potential volatility breakout by determining if the current bandwidth value is lower than any other over a period of at least the last 6 months.
  Thanks, Richard
	 | 
	 | 
	
	
	
		Registered User Joined: 1/28/2005 Posts: 6,049 
	 | 
	
		rwwoods
  I would create an Easyscan:
  Your Indicator<(whatever value you think is low)
  You may want to add fundamental/price screening also. -------------------------------------------------------------------------------- Once you have a watchlist.
  Set your zoom to 4 ( I believe approximately 148 days)
  Do a visual sort on the watchlist.
  At one end you will have the highest values. At the other the lowest.
  Thanks diceman 
	 | 
	 | 
	
	
	
		 
   Worden Trainer
  Joined: 10/1/2004 Posts: 18,819 
	 | 
	
		In this case, rwwoods, it would take a long PCF.
  You would have to write in this form:
  Today < 1-day ago AND Today < 2-days ago AND Today < 3-days ago (etc.)
  Keep in mind that band width is just a measure of the volatility of the stock.  What you are really searching for are the stocks falling into their lowest volatility for the past six months.
  Take a look at the stocks this PCF finds and see if you like recent band width:
  (MAXH20-MINL20)/MINL20<(MAXH20.10-MINL20.10)/MINL20.10 AND (MAXH20-MINL20)/MINL20<(MAXH20.20-MINL20.20)/MINL20.20 AND (MAXH20-MINL20)/MINL20<(MAXH20.30-MINL20.30)/MINL20.30 AND (MAXH20-MINL20)/MINL20<(MAXH20.40-MINL20.40)/MINL20.40 AND (MAXH20-MINL20)/MINL20<(MAXH20.50-MINL20.50)/MINL20.50 AND (MAXH20-MINL20)/MINL20<(MAXH20.60-MINL20.60)/MINL20.60 AND (MAXH20-MINL20)/MINL20<(MAXH20.70-MINL20.70)/MINL20.70 AND (MAXH20-MINL20)/MINL20<(MAXH20.80-MINL20.80)/MINL20.80 AND (MAXH20-MINL20)/MINL20<(MAXH20.90-MINL20.90)/MINL20.90 AND (MAXH20-MINL20)/MINL20<(MAXH20.100-MINL20.100)/MINL20.100 AND (MAXH20-MINL20)/MINL20<(MAXH20.110-MINL20.110)/MINL20.110 AND (MAXH20-MINL20)/MINL20<(MAXH20.120-MINL20.120)/MINL20.120 
  This does a spot check (doesnt check every day) for a different measure of volatility.  I think you will see most stocks returning TRUE for this are experiending the lowest bandwidth recently.
  - Craig Here to Help!
	 | 
	 | 
	
	
	
		Registered User Joined: 9/14/2006 Posts: 11 
	 | 
	
		Craig, that is a very creative approach and it seems to work well. 
  Thanks! Richard
	 | 
	 | 
	
	
	
		 
   Worden Trainer
  Joined: 10/1/2004 Posts: 18,819 
	 | 
	
		My pleasure.
  - Craig Here to Help!
	 | 
	 | 
| 
Guest-1 |