| Registered User Joined: 5/23/2005
 Posts: 13
 
 | I am looking for a PCF that will identify stocks where price has crossed a designated moving average in the last 10 days, or whatever time value I select. I would like to be able to easily substitute the MA value and the historical time period. I don't particularly care if the price is moving up or down (I have a PCF that identifies the trend of the MA). 
 This is an example that I found, but I think I would have to replicate this many times over to achieve my objective for pricce moving up or down (plus I am not sure the result will be what I want):
 Price crossing Moving Average: In last 5 days, Up, Simple (average:10)
 C>AVGC10 AND (C1<AVGC10.1 OR C2<AVGC10.2 OR C3<AVGC10.3 OR C4<AVGC10.4 OR C5<AVGC10.5)
 
 I have attempted to do this myself, but the formula seems very long and clumsy. I am willing to bet you can come up with a very compact and efficient one. If not, just let me know.
 | 
	
	|  Administration
 
 Joined: 9/30/2004
 Posts: 9,187
 
 | A PCF would be very lengthy if you were looking for crosses over the last 30 days for example. 
 But try this.  Add the following formula as a Custom Percent True indicator on your chart:
 
 (C < AVGC10 and C1 > AVGC10.1) or (C > AVGC10 and C1 < AVGC10.1)
 
 Change the 10s to whatever moving average you want.  Set the Smoothing Average on the custom indicator to the "lookback" period you want (in past x days).  Now right click on the indicator and select Sort By.  Set the sort to Actual Value.
 
 The sort column will show a list of values.  Any stock with a value > 0.00% has crossed the average in the preceding x days.
 | 
	
	| Registered User Joined: 5/23/2005
 Posts: 13
 
 | Thanks a lot - I will give it a try. |