OPEN-SOURCE SCRIPT
Updated ATR + % + SL & 3 Targets Dashboard

A simple ATR-based risk management tool that automatically calculates Stop Loss and three Take Profit levels with a clean on-chart dashboard.
ATR Risk Manager – Stop Loss & 3 Targets Dashboard
Managing risk is one of the most important parts of trading. This indicator helps traders quickly plan trades by calculating ATR-based Stop Loss and three Take Profit targets directly on the chart.
Using Average True Range (ATR), the script adjusts exit levels according to market volatility, helping traders avoid stops that are too tight or targets that are unrealistic.
A built-in trend direction filter based on Supertrend logic automatically determines whether the market bias is LONG or SHORT, and the levels adjust accordingly.
The result is a clean and practical trade planning dashboard that helps traders maintain structured risk management.
Key Features
• ATR-based Stop Loss calculation
• Three Take Profit targets for scaling out
• Automatic risk and reward % calculation
• Built-in trend direction detection
• Clean on-chart SL/TP lines
• Dashboard table displaying trade metrics
• Fully customizable ATR multipliers
• Lightweight and optimized Pine Script v5 code
Dashboard Displays
The indicator dashboard shows:
• Market direction (LONG / SHORT)
• Current ATR value
• ATR % of price
• Stop Loss price and risk %
• Target 1 reward %
• Target 2 reward %
• Target 3 reward %
This helps traders quickly evaluate risk-to-reward before entering a trade.
How Many Traders Use It
A common approach is:
• Target 1: partial profit
• Target 2: main take profit
• Target 3: runner position
This allows traders to lock profits while letting winning trades run.
Works Well With
This tool can complement many trading strategies such as:
• Price Action
• Trend Following
• Breakout Trading
• Moving Average Systems
• Support & Resistance Trading
It works across crypto, stocks, forex, and indices.
Important Note
This indicator does not generate buy or sell signals.
It is designed purely as a risk management and trade planning tool.
Always combine it with your own strategy and proper position sizing.
ATR Risk Manager – Stop Loss & 3 Targets Dashboard
Managing risk is one of the most important parts of trading. This indicator helps traders quickly plan trades by calculating ATR-based Stop Loss and three Take Profit targets directly on the chart.
Using Average True Range (ATR), the script adjusts exit levels according to market volatility, helping traders avoid stops that are too tight or targets that are unrealistic.
A built-in trend direction filter based on Supertrend logic automatically determines whether the market bias is LONG or SHORT, and the levels adjust accordingly.
The result is a clean and practical trade planning dashboard that helps traders maintain structured risk management.
Key Features
• ATR-based Stop Loss calculation
• Three Take Profit targets for scaling out
• Automatic risk and reward % calculation
• Built-in trend direction detection
• Clean on-chart SL/TP lines
• Dashboard table displaying trade metrics
• Fully customizable ATR multipliers
• Lightweight and optimized Pine Script v5 code
Dashboard Displays
The indicator dashboard shows:
• Market direction (LONG / SHORT)
• Current ATR value
• ATR % of price
• Stop Loss price and risk %
• Target 1 reward %
• Target 2 reward %
• Target 3 reward %
This helps traders quickly evaluate risk-to-reward before entering a trade.
How Many Traders Use It
A common approach is:
• Target 1: partial profit
• Target 2: main take profit
• Target 3: runner position
This allows traders to lock profits while letting winning trades run.
Works Well With
This tool can complement many trading strategies such as:
• Price Action
• Trend Following
• Breakout Trading
• Moving Average Systems
• Support & Resistance Trading
It works across crypto, stocks, forex, and indices.
Important Note
This indicator does not generate buy or sell signals.
It is designed purely as a risk management and trade planning tool.
Always combine it with your own strategy and proper position sizing.
Release Notes
Update: Dashboard Customization & Layout Improvements• Added movable dashboard with position options (Top Right, Top Left, Bottom Right, Bottom Left)
• Added full table color customization including header, rows, background, and text
• Added alternating row colors for better readability
• Added settings to enable/disable specific dashboard rows
• Improved table styling and spacing
• Improved label readability on chart
Release Notes
📝 1. Description for TradingView PublicationDescription:
"Most risk management indicators fail because they trade in a vacuum. They calculate Stop Losses and Take Profits based purely on mathematical formulas (like ATR) while completely ignoring the actual market structure—the real walls of Support and Resistance.
The ATR Risk Manager PRO v2 bridges the gap between pure math and market reality. It is designed for traders who want to plan high-probability breakout strategies and manage wealth-building positions with absolute precision.
Key Features:
Smart 'Structure-Snapped' Stop Loss: Instead of blindly placing your Stop Loss at a fixed ATR distance, this indicator scans the chart for the nearest major swing low (Support Floor). If your mathematical stop loss is floating dangerously close to a major floor, the script automatically 'snaps' your stop loss to hide safely just below that structural level.
Manual Trade Planner: Don't wait for the price to move to calculate your risk. Toggle on 'Manual Entry Price' to type in your exact planned breakout level, and instantly view your Position Size, Max Loss, and Target Ratios before you ever click buy.
Macro-Aware Warnings (52W & ATH): The dynamic dashboard alerts you if your Take Profit targets are placed directly into heavy historical resistance like a 52-Week High, or if your target is in 'Blue Sky' All-Time High territory.
Auto-Scaling Pivot Zones: The indicator automatically adjusts its lookback periods based on the timeframe you are trading. It draws clean, transparent support/resistance boxes that filter out intraday noise and only highlight the major structural turning points.
Customizable Cockpit Dashboard: A sleek, fully customizable on-chart dashboard matrix calculates your exact position sizing based on your account size and risk percentage. You can easily toggle columns and text sizes to keep your chart clutter-free."
🔍 2. The Exact Differences: Old Code vs. New Code
To ensure you have full control over what was added, here is the exact breakdown of how the new script differs from the original baseline you provided. Importantly, your core ATR formulas, risk percentage math, and position sizing logic from the old code were completely untouched. Here is what was layered on top:
1. The Entry Anchor
Old: You could only calculate risk based on the current live candle (close).
New: Added a useManualEntry toggle. You can now override the live price and manually type in a specific entry price to project your risk matrix.
2. Market Awareness (The Key Levels)
Old: The script didn't know if the stock was at an all-time low or an all-time high.
New: Added Phase 1 logic. It silently calculates the 52-Week High, 52-Week Low, and All-Time High, comparing your targets to these levels to generate visual dashboard warnings (e.g., ⚠️ Near 52WH).
3. The Smart Stop Loss (Structure Snapping)
Old: Stop Loss was strictly Entry Price - (ATR * Multiplier).
New: Added Phase 2 logic. It detects the nearest historical Swing Low. If your ATR Stop Loss is within a 3% threshold of that Swing Low, it overrides the math and moves the Stop Loss slightly below the structural floor for added safety.
4. Visual Context (The Boxes)
Old: Only drew horizontal lines for SL and TP.
New: Draws semi-transparent green/red boxes to highlight immediate structural Support and Resistance zones. This includes an Auto-Lookback feature that dynamically changes how far back it looks for pivots based on whether you are on a 5-minute chart or a Weekly chart.
5. Dashboard Flexibility
Old: The dashboard size and width were permanently fixed.
New: Added toggles to turn off specific columns (like the "%" or "Status" columns) and change the text size, allowing you to shrink the dashboard horizontally to save chart space.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.