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 |

Ratio of closes to range Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
bleesgeld
Posted : Monday, September 30, 2013 5:34:40 AM
Registered User
Joined: 4/15/2011
Posts: 29

Hi, I am looking for a scan which shows me the ratio of a close to a given range:

The equation I am looking for is an X Bar Moving Average of the Close minus the Low and dividing it by the Average True Range of X Bars. Then I want to take that result and multiply it by 100.

 

Appreciate any help!

Thank you and best regards

Thomas

Bruce_L
Posted : Monday, September 30, 2013 9:14:29 AM


Worden Trainer

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

It would require knowing X to be able to help you write the Condition Formula as I cannot think of a way to write a generalized version. For example, a 14-period version of this could be written as:

100 * (AVGC14 - AVGL14) / ((AVGH14 - AVGL14) / 2 + (ABS(H - C1) + ABS(C1 - L) + ABS(H1 - C2) + ABS(C2 - L1) + ABS(H2 - C3) + ABS(C3 - L2) + ABS(H3 - C4) + ABS(C4 - L3) + ABS(H4 - C5) + ABS(C5 - L4) + ABS(H5 - C6) + ABS(C6 - L5) + ABS(H6 - C7) + ABS(C7 - L6) + ABS(H7 - C8) + ABS(C8 - L7) + ABS(H8 - C9) + ABS(C9 - L8) + ABS(H9 - C10) + ABS(C10 - L9) + ABS(H10 - C11) + ABS(C11 - L10) + ABS(H11 - C12) + ABS(C12 - L11) + ABS(H12 - C13) + ABS(C13 - L12) + ABS(H13 - C14) + ABS(C14 - L13)) / 28)

Please provide a description and PCF for calculating an ATR value to be used as a stop loss value



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bleesgeld
Posted : Monday, September 30, 2013 10:06:12 AM
Registered User
Joined: 4/15/2011
Posts: 29

Thanks a lot, Bruce,

that's exactly what I was looking for!

Thomas

bleesgeld
Posted : Monday, September 30, 2013 11:01:53 AM
Registered User
Joined: 4/15/2011
Posts: 29

I tried to extend that to 22 days but something must be wrong....can u help? Thanx!!

100 * (AVGC22 - AVGL22) / ((AVGH22 - AVGL22) / 2 + (ABS(H - C1) + ABS(C1 - L) + ABS(H1 - C2) + ABS(C2 - L1) + ABS(H2 - C3) + ABS(C3 - L2) + ABS(H3 - C4) + ABS(C4 - L3) + ABS(H4 - C5) + ABS(C5 - L4) + ABS(H5 - C6) + ABS(C6 - L5) + ABS(H6 - C7) + ABS(C7 - L6) + ABS(H7 - C8) + ABS(C8 - L7) + ABS(H8 - C9) + ABS(C9 - L8) + ABS(H9 - C10) + ABS(C10 - L9) + ABS(H10 - C11) + ABS(C11 - L10) + ABS(H11 - C12) + ABS(C12 - L11) + ABS(H12 - C13) + ABS(C13 - L12) + ABS(H13 - C14) + ABS(C14 - L13)+ ABS(H14 - C15) + ABS(C15 - L14) + ABS(H15 - C16) + ABS(C16 - L15) + ABS(H16 - C17) + ABS(C17 - L16) + ABS(H17 - C18) + ABS(C18 - L17) + ABS(H18 - C19) + ABS(C19 - L18) + ABS(H19 - C20) + ABS(C20 - L19) + ABS(H20 - C21) + ABS(C21 - L20) + ABS(H21 - C22) + ABS(C22 - L21)) / 44)

Bruce_L
Posted : Monday, September 30, 2013 11:09:31 AM


Worden Trainer

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

I'm not sure I see anything wrong with the formula, but this is what I get:

100 * (AVGC22 - AVGL22) / ((AVGH22 - AVGL22) / 2 + (ABS(H - C1) + ABS(C1 - L) + ABS(H1 - C2) + ABS(C2 - L1) + ABS(H2 - C3) + ABS(C3 - L2) + ABS(H3 - C4) + ABS(C4 - L3) + ABS(H4 - C5) + ABS(C5 - L4) + ABS(H5 - C6) + ABS(C6 - L5) + ABS(H6 - C7) + ABS(C7 - L6) + ABS(H7 - C8) + ABS(C8 - L7) + ABS(H8 - C9) + ABS(C9 - L8) + ABS(H9 - C10) + ABS(C10 - L9) + ABS(H10 - C11) + ABS(C11 - L10) + ABS(H11 - C12) + ABS(C12 - L11) + ABS(H12 - C13) + ABS(C13 - L12) + ABS(H13 - C14) + ABS(C14 - L13) + ABS(H14 - C15) + ABS(C15 - L14) + ABS(H15 - C16) + ABS(C16 - L15) + ABS(H16 - C17) + ABS(C17 - L16) + ABS(H17 - C18) + ABS(C18 - L17) + ABS(H18 - C19) + ABS(C19 - L18) + ABS(H19 - C20) + ABS(C20 - L19) + ABS(H20 - C21) + ABS(C21 - L20) + ABS(H21 - C22) + ABS(C22 - L21)) / 44)

Why do you think it is wrong?



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bleesgeld
Posted : Monday, September 30, 2013 11:26:51 AM
Registered User
Joined: 4/15/2011
Posts: 29

Hmmm, my TC 2000 first said "syntax error" and didn't show anything. Pasted and copied again, now it works. Sorry and thanx!

Bruce_L
Posted : Monday, September 30, 2013 11:29:03 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.