OPEN-SOURCE SCRIPT

ATR TP Levels

612
ATR TP Levels is a trade management tool for swing traders operating on the daily timeframe. Instead of guessing profit targets, it calculates three take profit levels directly from the ATR (Average True Range) recorded on the day you opened the trade — locking volatility as a fixed ruler for the entire duration of the position.

Why ATR-based exits?
Most traders set targets based on round numbers or arbitrary percentages. ATR-based targets are different — they reflect the actual volatility of the instrument at the moment you entered.

Recommended setup — the 2 ATR combo
This indicator is designed to pair with a 2 ATR stop loss below your entry. With the default take profit levels set at 3, 4, and 5 ATR above entry, the risk/reward ratios are:

TP1 at 3 ATR → 1.5:1 R/R — first partial close
TP2 at 4 ATR → 2:1 R/R — second partial close
TP3 at 5 ATR → 2.5:1 R/R — third partial close

The multipliers and close percentages are fully customizable — every trader has a different style, risk tolerance, and position sizing approach. Adjust the ATR multipliers to match how far you typically expect a move to extend, and set the close percentages to reflect how aggressively you want to scale out. There are no right or wrong values here — the defaults are a starting point, not a prescription.

How to use it

Add ATR(14) to your chart. When your trade opens, note the ATR value on that candle.
Open the indicator settings and fill in three values under Trade setup:

Entry price — your exact fill price
ATR at entry — the ATR(14) value from your entry candle
Quantity — your total position size in shares, contracts, or units


Set the trade open date (day, month, year) to the date you entered. The lines will draw from that bar forward.
Optionally adjust the ATR multipliers and close percentages under Take profit levels to match your strategy.


Reading the labels
Each line shows a label at the right end in the format:
3.0 ATR → 0.150 (187.50, +2.34%)

3.0 ATR — how many ATRs from entry this level is
0.150 — how many units to close at this level (based on your quantity and close %)
187.50 — the exact price of this take profit level
+2.34% — percentage gain from your entry price


Settings reference
Trade setup — entry price, ATR value, and total position quantity.
Trade open date — the date your trade was opened. Lines start from this bar so the chart stays clean and accurate to your actual trade.
Take profit levels — three independently configurable levels. Each has an ATR multiplier (how far the target is) and a close % (what fraction of your position to sell there). Defaults are 3/4/5 ATR at 15/20/25%.

Notes

ATR is locked to your entry day — it does not update as the trade progresses. This is intentional. Your targets should reflect the volatility you accepted when you entered, not today's conditions.
Works on any instrument and timeframe, but is designed and calibrated for daily swing trades.
For short trades, you would need to flip the TP calculations — this version is long-only.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.