Registered User Joined: 3/13/2006 Posts: 25
|
Is it possible to write a PCF to use in a scan and find stocks that made new 52 weeks high within the last 35 trading days. If not then what is the formula to find stocks with a new high within the last 35 trading days? The first one (with new 52 weeks high) is better. When writing the formula please specify for which one, Thank
|
Registered User Joined: 10/9/2011 Posts: 485
|
Try something like this
MAXH35 > MAXH252
It checks if the high made in the last 35 days is greater than or equal to high made in the last 52 weeks, If its true it means 52 week high was made in the last 35 days.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
MAXH35 can't be greater than MAXH252, but it can be equal to it.
MAXH35 = MAXH252
Or you could check for the high of the most recent 35 days being greater than the rest of the days.
MAXH35 > MAXH217.35
Or you could check for the most recent 35 days to be above the previous 252 days.
MAXH35 > MAXH252.35
A method which would by a more literal interpretation of the request would be to create a Condition Formula for a New High.
H > MAXH251.1
And use it as the Boolean Formula in a Custom PCF % True Indicator with the Period set to 35. You could then click on the Custom PCF % True Indicator and select Create Scan Condition to create a condition for the Boolean Formula being greater than 0.
Condition True at Least Once Over x Bars
You could create this as a single Condition Formula, but it would be a long formula as it would need to make 35 daily comparisons individually within the formula.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 10/9/2011 Posts: 485
|
Your idea (pasted below) is good. I would probably go with that one....
Or you could check for the most recent 35 days to be above the previous 252 days.
MAXH35 > MAXH252.35
|