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 |

Consistently close in upper range Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
thomasjenkinsjr
Posted : Thursday, November 7, 2013 3:41:20 PM
Registered User
Joined: 4/1/2011
Posts: 90

Hello Bruce,

 

Can you create a PCF that will count how many times a stock has closed within 5% of its range within the past 21 days.

 

Thanks in advance.

Bruce_L
Posted : Thursday, November 7, 2013 3:58:41 PM


Worden Trainer

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

I'm not quite sure what you are asking, but if you want to count how many times in the previous 21 days that price closed at or below 5% of the range above the high of the current bar but at or above 5% of the range below the low of the current bar, it could be written as:

ABS(1.05 * L - .05 * H <= C1 AND C1 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C2 AND C2 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C3 AND C3 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C4 AND C4 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C5 AND C5 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C6 AND C6 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C7 AND C7 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C8 AND C8 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C9 AND C9 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C10 AND C10 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C11 AND C11 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C12 AND C12 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C13 AND C13 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C14 AND C14 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C15 AND C15 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C16 AND C16 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C17 AND C17 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C18 AND C18 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C19 AND C19 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C20 AND C20 <= 1.05 * H - .05 * L) - (1.05 * L - .05 * H <= C21 AND C21 <= 1.05 * H - .05 * L)

PCF Formula Descriptions



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
thomasjenkinsjr
Posted : Thursday, November 7, 2013 4:53:35 PM
Registered User
Joined: 4/1/2011
Posts: 90

Hey Bruce,

 

I don't think this is exactly what I was looking for. What i'm asking is...

 

Within the past 21 days how many time has a stock closed at or within 5% of its high for the day.

 

wouldn't you use STOC1 >= 95 for this?

 

Thanks in advance.

Bruce_L
Posted : Thursday, November 7, 2013 4:58:05 PM


Worden Trainer

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

Thank you for the clarification, I did not see the high mentioned in your original post and was unsure what you were requesting. You are correct that the easiest way to do this would being using a stochastic.

ABS(STOC1 >= 95) - (STOC1.1.1 >= 95) - (STOC1.1.2 >= 95) - (STOC1.1.3 >= 95) - (STOC1.1.4 >= 95) - (STOC1.1.5 >= 95) - (STOC1.1.6 >= 95) - (STOC1.1.7 >= 95) - (STOC1.1.8 >= 95) - (STOC1.1.9 >= 95) - (STOC1.1.10 >= 95) - (STOC1.1.11 >= 95) - (STOC1.1.12 >= 95) - (STOC1.1.13 >= 95) - (STOC1.1.14 >= 95) - (STOC1.1.15 >= 95) - (STOC1.1.16 >= 95) - (STOC1.1.17 >= 95) - (STOC1.1.18 >= 95) - (STOC1.1.19 >= 95) - (STOC1.1.20 >= 95)

Understanding Stochastics



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Quiktdr
Posted : Friday, December 15, 2017 7:03:45 AM
Registered User
Joined: 10/7/2004
Posts: 794

I just want to confirm that the PCF for close is not more then 20% below 52 weekly high   

               C>MaxH240 *.80

 

Thank you

Bruce_L
Posted : Friday, December 15, 2017 9:11:05 AM


Worden Trainer

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

Less than 20% below 52 weekly high (so above the line that is 20% below the high) would probably be a few more days than that (between say 250 on the low end and 260 on the high end).

C > MAXH252 * .8

If you want it to actually be "no more", then you would include equality.

C >= MAXH252 * .8



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Quiktdr
Posted : Friday, December 15, 2017 9:17:56 AM
Registered User
Joined: 10/7/2004
Posts: 794

Thank you have a great day

Bruce_L
Posted : Friday, December 15, 2017 9:25:46 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.