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 |

Average trading range Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
accutrading
Posted : Sunday, May 8, 2005 8:36:12 PM
Registered User
Joined: 3/20/2005
Posts: 17
Is there a way to calculate a stock's average daily trading range for past 6 month or 12 month? Thanks!

Dennis
Bruce_L
Posted : Monday, May 9, 2005 12:59:58 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Please try the following formulas:

6 Month Average Daily Trading Range:
AVGH126-AVGL126

1 Year Average Daily Trading Range:
AVGH252-AVGL252

It is possible to calculate a Average True Range as well, but the PCF for this would be rather long. To do it as a Custom Indicator, use the following formula with a Smoothing Average of 126 or 252 on a daily chart:

(H-L+ABS(H-C1)+ABS(L-C1))/2

The following videos might be useful reading on this topic:

How to create a Personal Criteria Forumula (PCF)
Adding, removing and saving indicators to a chart template

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
accutrading
Posted : Monday, May 9, 2005 4:05:06 AM
Registered User
Joined: 3/20/2005
Posts: 17
Thanks!

How about weekly trading range for past 1 year or 2 years? Any formulas?

Bruce_L
Posted : Monday, May 9, 2005 6:36:28 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
TeleChart 2005 doesn't use calendar weeks, but you can do calculations based on overlapping 5-Day increments using a very similar set of formulas:

6 Month Average of 5-Period Trading Ranges:
AVG(MAXH5,126)-AVG(MINL5,126)

1 Year Average of 5-Period Trading Ranges:
AVG(MAXH5,252)-AVG(MINL5,252)

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bustermu
Posted : Monday, May 9, 2005 12:37:03 PM
Registered User
Joined: 1/1/2005
Posts: 2,645
Suppose the current date is at the right-edge of your Daily chart and you change to a Weekly Time Frame. A PCF for the average range over the last 5 bars is PCF1:

(MAXH5.0+MAXH5.5+MAXH5.10+MAXH5.15+MAXH5.20)/5
-(MINL5.0+MINL5.5+MINL5.10+MINL5.15+MINL5.20)/5

This can be extended to any number of "Weekly" bars you like.

The corresponding PCF Bruce gave, PCF2:

AVG(MAXH5,25)-AVG(MINL5,25)

is the average of the average 5 bar ranges you would observe by switching to a Weekly Time Frame from a Daily Time Frame with each of the 5 most recent days in turn at the right-edge.

The PCF2 may be more appropriate for your needs. Remember, "Weekly" charts are only duplicated every 5 days.

Thanks,
Jim Murphy
CelticTrader
Posted : Wednesday, July 6, 2005 5:48:13 AM
Registered User
Joined: 10/7/2004
Posts: 23
How might I write a pcf to calculate the average true range for three days?

Thanks,
Tony.
Bruce_L
Posted : Wednesday, July 6, 2005 6:14:15 AM


Worden Trainer

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

Wilder's 3-Period Average True Range approximation PCF:

(985261*(H-L+ABS(C1-L)+ABS(C1-H)) +656841*(H1-L1+ABS(C2-L1)+ABS(C2-H1)) +437894*(H2-L2+ABS(C3-L2)+ABS(C3-H2)) +291929*(H3-L3+ABS(C4-L3)+ABS(C4-H3)) +194620*(H4-L4+ABS(C5-L4)+ABS(C5-H4)) +129746*(H5-L5+ABS(C6-L5)+ABS(C6-H5)) +86498*(H6-L6+ABS(C7-L6)+ABS(C7-H6)) +57665*(H7-L7+ABS(C8-L7)+ABS(C8-H7)) +38443*(H8-L8+ABS(C9-L8)+ABS(C9-H8)) +25629*(H9-L9+ABS(C10-L9)+ABS(C10-H9)) +17086*(H10-L10+ABS(C11-L10)+ABS(C11-H10)) +11391*(H11-L11+ABS(C12-L11)+ABS(C12-H11)) +7594*(H12-L12+ABS(C13-L12)+ABS(C13-H12)) +5063*(H13-L13+ABS(C14-L13)+ABS(C14-H13)) +3375*(H14-L14+ABS(C15-L14)+ABS(C15-H14)) +2250*(H15-L15+ABS(C16-L15)+ABS(C16-H15)) +1500*(H16-L16+ABS(C17-L16)+ABS(C17-H16)) +1000*(H17-L17+ABS(C18-L17)+ABS(C18-H17)))/5907570

The same thing as a Custom Indicator:

Select Chart Template | Add Indicator | Indicator
-Visible: Checked
-Center Zero Line: Unchecked
-Plot Using Price Scale: Unchecked
-Smoothing Average: 5
-Average Type: Exponential
-Indicator Formula:

(H-L+ABS(H-C1)+ABS(L-C1))/2

The Custom Indicator is much easier to modify since changing the length and type is simply a matter of adjusting the Smoothing Average and Average Type:

Wilder's:
Smoothing Average = (twice the Period) minus one
Average Type: Exponential

Exponential:
Smoothing Average = Period
Average Type: Exponential

Simple:
Smoothing Average = Period
Average Type: Simple

You may want to check out the following topics if you are interested in writing your own ATR Personal Criteria Formulas:

Average True Range (ATR) & Stop Losses
average true range pcf

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
hawesdj
Posted : Tuesday, December 30, 2008 2:31:29 PM
Registered User
Joined: 9/9/2008
Posts: 10
Bruce or whoever,
I did the custom indicator like you had with the formula, my question is I just want a 5 day ATR, thus what would be my smoothing average and average type?
diceman
Posted : Wednesday, December 31, 2008 2:57:49 PM
Registered User
Joined: 1/28/2005
Posts: 6,049
If you wanted:
 
 
"Simple" then: 5, average type simple.
"Exponential" then: 5, average type exponential.
"Wilders" then: 9, average type exponential.
 
 
Thanks
diceman
 
 
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.