Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
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
|
|
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
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
|
|
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
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try the following instead then.
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
|
|
Registered User 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 — amount of daily movement.
|
|
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
|
|
Guest-1 |