OPEN-SOURCE SCRIPT

True Average Period Traded Range

Mis à jour
True Average Period Trading Range (TAPTR)

The J. Welles Wilder Average True Range calculation includes the ability to calculate in gaps into the equation.
It is in my opinion that gaps are untraded range values until the prices on their own come back and close the gaps.

The TAPTR calculation is simple, it is the average for a set period of time of the HIGH - LOW.

The ATR average calculation is automatically set based on the timeframe period you are looking at.
12 Months (1 year) = 10 (1 decade)
Months = 12 (1 year)
Weeks = 12 (1 business quarter)
Days = 21 (1 trading month)
4 Hour = 9 (5 trading days)
1 Hour = 33 (5 trading days)
45 minutes = 9 (1 trading day)
30 minutes = 14 (1 trading day)
15 minutes = 28 (1 trading day)
10 minutes = 42 (1 trading day)
5 minutes = 85 (1 trading day)
1 minute = 420 (1 trading day)
default value = 21 (if using a timeframe not described above)

The "master trend" as being a 21 SMA.

The colored columns represent the actual range value for that time period.

Description of values from left to right.
1) Actual Trade Range Value for the time period you are viewing
2) % of price (in decimal, you need multiply by 100 to get the true percent)
3) Average Traded Range
4) % of price
5) .618 of Average Traded Range
6) % of price
7) Mean of #3 and #5
8) % of price

The % of price is displayed in its calculated form. You need to multiple the value by 100 if you want the actual percent.
Example: Displayed Value: 0.0246 = 2.46%

Why calculated form only? If the ranges are .72 and the % of price is 2.32 the indicator looks all jacked up like a redneck's pick-up.
However, if it is .0232, everything is to scale.

Why is % of price helpful?
If you are trading and are aware that average period traded range is 5%, you now have an idea of an average return if you could catch from low to high (or short high to low).

Bar Colors

RED is greater than 4.2x TAPTR
ORANGE is greater than 2.618x TAPTR but less than RED
YELLOW is greater than 1.618x TAPTR but less than ORANGE
GREEN is greater than .618x TAPTR but less than YELLOW
BLUE is less than GREEN

The colors of the bars represent how far from the Master Trend (21 SMA) the close is.
This is determined by taking the difference between the close and the 21 SMA and dividing by the current TAPTR.

EXAMPLE:
IF you have a RED bar, the close is greater than 4.2 TAPTRs away from the 21 SMA. This means that either prices will stall and remain flat until
the SMA comes to the prices or turn and return to the SMA.
If prices are greater than 4.2 TAPTR, that also represents that it is greater than 4 or more time periods from the mean if the return traded within the averages.








Notes de version
UPDATE:

-Changed the primary trend calculation from using the mean of the time period (HL2) to using the CLOSE.
-Add a new calculation which will appear at the end of the list. This new calculation is what I call FREE ATR. FREE ATR is an average of the amount of range that DOES NOT overlap the previous period. In other words, it is range prices that are not in common with the previous bar.

What this provides is an idea of approximately how much freedom of movement the prices actually have. If determining movement, you could use this value + high to get an idea of where prices might be trying to get to.

FREE ATR + HIGH = Potential Target to let a portion of the holding go and lock in some profit. The look ahead on this type of calculation would only be 1 or 2 bars.

Hope this additional calculation assists everyone in their trading.

-PriceProphet
ATRAverage True Range (ATR)multitimeframewilder

Script open-source

Dans le plus pur esprit TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par nos Règles. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Vous voulez utiliser ce script sur un graphique ?


Aussi sur:

Clause de non-responsabilité