Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Multi-Year Uptrend and Range Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
esc952
Posted : Tuesday, March 1, 2016 5:18:05 PM
Registered User
Joined: 2/11/2013
Posts: 78

I'm looking to build a core holding scan based on

1) A slow, steady uptrend over multiple years

2) A relatively narrow trading range.

Since this is not a trading scan, there is no problem making this multiple scans.  However, I need some help fleshing out hte logic.

Let's say I use these definitions:

- multi-year  = 2+ year

- slow uptrend = slope in the 10% to 50% range

- relatively narrow = stays within a 10% range over any 1mo period.

How would you approach scanning for these characteristics?

My first thought would be to use the slope of a linear regression channel over a long period of Months.  My thought on the range would be that the chart does not violate that channel when set to say 1.0 Standard Deviations.  

However, there may be other more elegant solutions.

So, how would I code my approach and is there a preferable approach anyone can offer?  (I know Bruce can only provide code for specific scan requests...so the second question is to the community.)

In case it matters, I run 12.6

Bruce_L
Posted : Wednesday, March 2, 2016 1:12:18 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Well we could test for your definitions literally.

Start by creating two Custom PCF % True Indicators using a weekly time frame.

How to add an indicator to a chart template
How to edit an Indicator

The first is going to test for less than a 10% range over 4 weeks with the Period set to 101 since that would make the oldest 4 bars be the beginning of a two year span.

- Period: 101
- Average Type: Simple
- Boolean Formula: MAXH4 <= 1.1 * MINL4

The second Custom PCF % True Indicator is going to check for the price percent change over 1 year being between 10% and 50%. In this case we are using a period of 52 because the span we are checking is for 52 bars instead of 4. So the first span being checked is the percent change over the entire first year.

- Period: 52
- Average Type: Simple
- Boolean Formula: 1.1 * C52 <= C AND C <= 1.5 * C52

You can click on the Custom PCF % True Indicators and select Copy to WatchList or Report... in v16 to use these indicators as WatchList Columns and sorts.

How to add an indicator to a WatchList

You will want to try sorting by each of these columns. You are interested in instances where both values are high (preferably both are 100).

This will probably lead to adjusting the parameters somewhat. You may want to check for percent changes over periods smaller than a year for example or use different percentages or periods in either or both formulas.

Once you have decided on appropriate settings and what percentage you want to pass for both Custom PCF % True Indicators, you could click on them and select Create Scan Condition to check for the value being Greater Than whatever value you decided upon.

Create Conditions from Your Chart (5:25)

You would want to add both conditions to the same EasyScan.

Building a Scan with Multiple Conditions (7:29)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
esc952
Posted : Wednesday, March 2, 2016 5:06:36 PM
Registered User
Joined: 2/11/2013
Posts: 78

Thanks Bruce...looks like what I wanted

Bruce_L
Posted : Wednesday, March 2, 2016 5:18:04 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You're welcome.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.