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 |

New multi year tops or bottoms Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
patrick_m_c
Posted : Friday, May 19, 2017 9:57:12 AM
Registered User
Joined: 6/15/2015
Posts: 49

Hello,

I"m tryin to create a scan that will look for equities that near multi year highs or lows that have been touched in the past.

 

For example:

Lookback: 5 years on the weekly chart.

Within that time frame, the stock has traded up to highs multiple times, an it is curently within that upper range again.

An example that I can find for it today is Ticker: NOC (however, I'd prefer more touches going back 5 years).

 

Thank you.

 

Bruce_L
Posted : Friday, May 19, 2017 2:24:37 PM


Worden Trainer

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

Maybe something like the following for the tops?

10 * H > 9 * MAXH260 + MINL260 AND ABS(10 * MAXH5 > 9 * MAXH260 + MINL260 AND 10 * MINH5.5 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.5 > 9 * MAXH260 + MINL260 AND 10 * MINH5.10 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.10 > 9 * MAXH260 + MINL260 AND 10 * MINH5.15 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.15 > 9 * MAXH260 + MINL260 AND 10 * MINH5.20 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.20 > 9 * MAXH260 + MINL260 AND 10 * MINH5.25 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.25 > 9 * MAXH260 + MINL260 AND 10 * MINH5.30 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.30 > 9 * MAXH260 + MINL260 AND 10 * MINH5.35 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.35 > 9 * MAXH260 + MINL260 AND 10 * MINH5.40 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.40 > 9 * MAXH260 + MINL260 AND 10 * MINH5.45 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.45 > 9 * MAXH260 + MINL260 AND 10 * MINH5.50 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.50 > 9 * MAXH260 + MINL260 AND 10 * MINH5.55 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.55 > 9 * MAXH260 + MINL260 AND 10 * MINH5.60 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.60 > 9 * MAXH260 + MINL260 AND 10 * MINH5.65 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.65 > 9 * MAXH260 + MINL260 AND 10 * MINH5.70 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.70 > 9 * MAXH260 + MINL260 AND 10 * MINH5.75 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.75 > 9 * MAXH260 + MINL260 AND 10 * MINH5.80 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.80 > 9 * MAXH260 + MINL260 AND 10 * MINH5.85 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.85 > 9 * MAXH260 + MINL260 AND 10 * MINH5.90 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.90 > 9 * MAXH260 + MINL260 AND 10 * MINH5.95 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.95 > 9 * MAXH260 + MINL260 AND 10 * MINH5.100 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.100 > 9 * MAXH260 + MINL260 AND 10 * MINH5.105 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.105 > 9 * MAXH260 + MINL260 AND 10 * MINH5.110 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.110 > 9 * MAXH260 + MINL260 AND 10 * MINH5.115 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.115 > 9 * MAXH260 + MINL260 AND 10 * MINH5.120 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.120 > 9 * MAXH260 + MINL260 AND 10 * MINH5.125 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.125 > 9 * MAXH260 + MINL260 AND 10 * MINH5.130 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.130 > 9 * MAXH260 + MINL260 AND 10 * MINH5.135 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.135 > 9 * MAXH260 + MINL260 AND 10 * MINH5.140 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.140 > 9 * MAXH260 + MINL260 AND 10 * MINH5.145 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.145 > 9 * MAXH260 + MINL260 AND 10 * MINH5.150 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.150 > 9 * MAXH260 + MINL260 AND 10 * MINH5.155 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.155 > 9 * MAXH260 + MINL260 AND 10 * MINH5.160 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.160 > 9 * MAXH260 + MINL260 AND 10 * MINH5.165 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.165 > 9 * MAXH260 + MINL260 AND 10 * MINH5.170 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.170 > 9 * MAXH260 + MINL260 AND 10 * MINH5.175 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.175 > 9 * MAXH260 + MINL260 AND 10 * MINH5.180 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.180 > 9 * MAXH260 + MINL260 AND 10 * MINH5.185 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.185 > 9 * MAXH260 + MINL260 AND 10 * MINH5.190 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.190 > 9 * MAXH260 + MINL260 AND 10 * MINH5.195 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.195 > 9 * MAXH260 + MINL260 AND 10 * MINH5.200 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.200 > 9 * MAXH260 + MINL260 AND 10 * MINH5.205 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.205 > 9 * MAXH260 + MINL260 AND 10 * MINH5.210 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.210 > 9 * MAXH260 + MINL260 AND 10 * MINH5.215 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.215 > 9 * MAXH260 + MINL260 AND 10 * MINH5.220 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.220 > 9 * MAXH260 + MINL260 AND 10 * MINH5.225 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.225 > 9 * MAXH260 + MINL260 AND 10 * MINH5.230 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.230 > 9 * MAXH260 + MINL260 AND 10 * MINH5.235 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.235 > 9 * MAXH260 + MINL260 AND 10 * MINH5.240 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.240 > 9 * MAXH260 + MINL260 AND 10 * MINH5.245 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.245 > 9 * MAXH260 + MINL260 AND 10 * MINH5.250 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.250 > 9 * MAXH260 + MINL260 AND 10 * MINH5.255 <= 9 * MAXH260 + MINL260) - (10 * MAXH5.255 > 9 * MAXH260 + MINL260 AND 10 * MINH5.260 <= 9 * MAXH260 + MINL260) > 2

It checks for the high of the current week to be in the top 10% of the 260 week range. It then breaks the 260 bar range don into 52 x 5 week chunks and counts how many times the highest high in a 5 week chunk is in the top 10% of the range while the lowest high in the previous 5 chunk was not in the top 10% of the range. It requires the count to be greater than 2 to return true.

If that works for tops we can convert it for bottoms. If it doesn't we can try re-working it before creating a bottom formula.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
patrick_m_c
Posted : Friday, May 19, 2017 3:16:50 PM
Registered User
Joined: 6/15/2015
Posts: 49

I just re-read my own question and it confused me. I guess I'm looking for a scanner that provides me with stocks that are trading near multi year highs or multi year lows. Thank you

patrick_m_c
Posted : Friday, May 19, 2017 3:18:32 PM
Registered User
Joined: 6/15/2015
Posts: 49

Hi Bruce,

I just read your response. That is incredible. I will try to input that into a formula and see if it works. Thank you so much

Bruce_L
Posted : Friday, May 19, 2017 3:20:04 PM


Worden Trainer

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

Well if you just want to know if price say in the top 10% of its range over the most recent 5 years, you could use the following in a weekly time frame.

STOC260 >= 90

And the bottom 10% could be checked using the following in a weekly time frame.

STOC260 <= 10

Stochastic



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
sonjiab
Posted : Monday, May 22, 2017 11:16:00 PM
Registered User
Joined: 8/23/2009
Posts: 4

Hi

 

I tried to copy and paste your PCF into version 17, it would not accept it it just keeps saying enter formula.

What am I doing wrong?

 

Bruce_L
Posted : Tuesday, May 23, 2017 9:32:38 AM


Worden Trainer

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

I have just copied and pasted all three of the formulas given above using the Chrome browser into TC2000 v17 and they all seem to work correctly without generating any error messages.

Try copying and pasting the formula into a text editor (such as Notepad and not a word processor such as Word) and then copy and paste from the text editor into TC2000.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
patrick_m_c
Posted : Wednesday, May 24, 2017 6:57:13 AM
Registered User
Joined: 6/15/2015
Posts: 49

Hi Bruce, 

Is there a way to cap the stock on the daily timeframe to be below the 52 high. 

 

For instance, I'm looking for a stock that in the last five years on the weekly chart has made a double or multiple top. It's within 10% of that range on the weekly timeframe, but on the daily time frame it's below it's 52 week high. 

For example, look at ticker HBMD. 

It fit my first parameter about being near a double top on the weekly chart. However, it exploded up yesterday from 19 to 20.50. Therefore, I'm not really interested in it appearing in my scan as it already made a significant move on the daily timeframe. Therefore, I'd like to cap any stop that is trading above it's 52h. 

Bruce_L
Posted : Wednesday, May 24, 2017 9:16:20 AM


Worden Trainer

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

You would need to create a daily Condition Formula to check to make sure price is below its own 52 week high on a daily time frame.

Note that the current day is part of the most recent 52 weeks, so we would have to exclude the current day from the calculatin of the 52 week high. The following excludes just the current day from the calculation of the 52 week high and compares the current price to this value. 

C < MAXH259.1

The following excludes the entire most recent week from the 52 week high calculations and makes sure the high of the current bar is below this value.

H < MAXH255.5

You can adjust the values as desired based on the examples.

Once you have created the daily Condition Formula, you would need to add both the original weekly Condition Formula and the new daily Condition Formula to the same EasyScan as EasyScan Conditions.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
patrick_m_c
Posted : Wednesday, May 24, 2017 9:35:08 AM
Registered User
Joined: 6/15/2015
Posts: 49

Thanks Bruce. I'll give it a try today.

Bruce_L
Posted : Wednesday, May 24, 2017 9:54:06 AM


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.