Registered User Joined: 3/20/2011 Posts: 18
|
I need help creating PCF for scanning stocks in trading zone or trading range 20bars or more. If I could have the ability to change the time period or bars (30, 40, 50 bars etc.), that will really be great.
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
What is your particular unambiguous objective definition of a stock being in a trading zone?
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 3/20/2011 Posts: 18
|
Stock price fluctuating between two prices (example between $4 and $12) for certain bars period (30, 40, 50days etc). I could have the flexibilty to change the number of days in the PCF.
I hope this help to clarify the request.
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The following is adapted from the Scan for stocks bouncing in a lateral channel video but is much simplified.
We are going to divide the number of bars over which you want to check by the minimum number of bounces for which you want to check and express the sum of the absolute differences between the highs and lows of each section from the highs and lows of the period as a whole as a percentage of the low over the entire period.
Low values represent potential bouncing or channeling, but you will still need to look at the symbols using your own eyes and brain to actually determine which potential patterns meet your particular needs.
So if we were looking for at least two bounces over a period of 20-bars, the formula would look like the following:
100 * (2 * MAXH20 - MAXH10 - MAXH10.10 + MINL10 + MINL10.10 - 2 * MINL20) / MINL20 / 2
At least 2-bounces over 30-bars would look like:
100 * (2 * MAXH30 - MAXH15 - MAXH15.15 + MINL15 + MINL15.15 - 2 * MINL30) / MINL30 / 2
At least 2-bounces over 40-bars would look like:
100 * (2 * MAXH40 - MAXH20 - MAXH20.10 + MINL20 + MINL20.20 - 2 * MINL40) / MINL40 / 2
At least 2-bounces over 50-bars would look like:
100 * (2 * MAXH50 - MAXH25 - MAXH25.25 + MINL25 + MINL25.25 - 2 * MINL50) / MINL50 / 2
I will provide one example of 3-bounces and use 30-bars as 30 is evenly divisible by 3:
100 * (3 * MAXH30 - MAXH10 - MAXH10.10 - MAXH10.20 + MINL10 + MINL10.10 + MINL10.20 - 3 * MINL30) / MINL30 / 3
You want the resulting percentages returned by these formulas to be as low as possible, so you will probably want to use this type of Indicator Formula as a WatchList Column to use as a descending order sort.
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
-Bruce Personal Criteria Formulas TC2000 Support Articles
|