comparing todays price Rate this Topic:
 Previous Topic · Next Topic Watch this topic · Print this topic ·
stevehchis
 Posted : Sunday, January 24, 2016 5:45:55 PM
Registered User
Joined: 3/7/2010
Posts: 168

what would be the formula for comparing todays price to a date in time

example : the difference between say: jan 1st 2015 (high) and current price (measured in % difference) if current price is below this dates high then it would show negative numbers and positive numberes  if above the high of this dates high

and a separate formula that  is the same but measured in ATR 14 period % that includes todays price in the 14 day period .....thank you

Bruce_L
 Posted : Monday, January 25, 2016 8:26:00 AM

Worden Trainer

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

The first one could be written as follows. I used January 2nd because there wasn't any trading on January 1st.

100 * (C / H'01/02/2015' - 1)

The 14 period average true range expressed as a percentage of the average price can be written as follows.

100 * ((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) / AVGC14

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stevehchis
 Posted : Monday, January 25, 2016 10:08:10 PM
Registered User
Joined: 3/7/2010
Posts: 168

no buce

for the second one (not the 14 period average true range it self  i wanted the same formula as the first one but with the exception that it be expressed in % ATR  as opposed to just % like the first one ...thank you

Bruce_L
 Posted : Tuesday, January 26, 2016 9:35:47 AM

Worden Trainer

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

100 * (C - H'01/02/2015') / ((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)

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stochastics
 Posted : Sunday, October 16, 2016 8:45:57 AM
Gold Customer

Joined: 3/3/2013
Posts: 57

Hi Bruce,

May I get ATR 14 as a percent of its stock price?

I'm looking for hedged trading stocks that have a decent - but not extreme &mdash; amount of daily movement.

Bruce_L
 Posted : Monday, October 17, 2016 9:24:22 AM

Worden Trainer

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

Just change the AVGC14 at the end of the second formula in my Monday, January 25, 2016 8:26:00 AM ET post to a C instead.

100 * ((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) / C

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

 Forum Jump Customer Training & Support - Ask a Trainer - TC2000 version 12/18 - Ask a Trainer - TC2000 version 7 - Ask a Trainer - StockFinder 5.0 - PCFs, EasyScan and Custom Indicators General Discussions - Stock and Market Talk - TC2000 version 12 or 18 - TC2000 version 7 - StockFinder 5.0 - RealCode for StockFinder 5.0 Tutorial Videos - TC2000 version 12 tutorial videos - TC2000 version 7 tutorial videos 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.