PROTECTED SOURCE SCRIPT
Aktualisiert Average True Range with Multiplier

Release Summary – ATR with Risk Management Tool (v6)
This script introduces an enhanced Average True Range (ATR) indicator with a user-defined multiplier and integrated risk management table. Users can choose from multiple smoothing methods (SMA, EMA, RMA, WMA) and dynamically calculate risk parameters including:
ATR and ATR × Multiplier
Dollar risk based on account size (1% default)
Position sizing (lot size)
Stop Loss and Take Profit levels (3× reward)
A built-in customizable table displays all calculated values for quick reference. The indicator is fully configurable and designed for precision risk management directly on the chart.
This script introduces an enhanced Average True Range (ATR) indicator with a user-defined multiplier and integrated risk management table. Users can choose from multiple smoothing methods (SMA, EMA, RMA, WMA) and dynamically calculate risk parameters including:
ATR and ATR × Multiplier
Dollar risk based on account size (1% default)
Position sizing (lot size)
Stop Loss and Take Profit levels (3× reward)
A built-in customizable table displays all calculated values for quick reference. The indicator is fully configurable and designed for precision risk management directly on the chart.
Versionshinweise
✨ Indicator: Average True Range (ATR) with Multiplier ✨⚙️ Inputs and Settings
Length: 14 bars (default)
Smoothing Method: SMA (options: SMA, EMA, WMA, RMA)
Multiplier: 1.5 (default)
Account Value: $25,000 (default)
Risk per Trade: 1%
📐 ATR Calculation
ATR computed using selected smoothing (SMA default).
Multiplied ATR: ATR × Multiplier (1.5)
📊 Trade Parameters
🔖 Label 📏 ATR 📏 ATR × 1.5
ATR Current ATR Current ATR × 1.5
Stop Loss ❌ ATR × 10 ATR × 1.5 × 10
Lot Size 📦 Calculated based on 1% risk Calculated based on 1% risk
Take Profit ✅ SL × 3 SL × 3
🎯 Calculation Logic
Risk Amount: Account Value × Risk% ($25,000 × 1% = $250)
Stop Loss: Rounded ATR values multiplied by 10.
Lot Size: Calculated by dividing Risk Amount by Stop Loss, then scaled appropriately.
Take Profit: 3 × Stop Loss.
🖥️ Display Features
Simplified table for easy visualization.
Customizable positioning (default: top-right).
🌈 Visual Aids
ATR plotted clearly in red 🟥.
ATR × Multiplier plotted clearly in blue 🟦.
🎨 Visual Appearance: Clear, color-coded table for quick glance decisions.
✅ Ready to Deploy: Suitable for rapid trade sizing and risk management.
✨ Happy Trading! ✨
Versionshinweise
📢 Release Summary – ATR Table Only (v1.0)This indicator provides a clean, customizable table displaying key ATR-based risk management metrics, suitable for both desktop and mobile interfaces. It allows traders to analyze stop loss, take profit, and position sizing based on current or historical candles using the ATR (Average True Range) volatility measure.
✅ Key Features:
Dynamic ATR calculation with selectable smoothing method (SMA, EMA, RMA, WMA).
User-defined ATR multiplier (default 1.5) for flexible SL/TP modeling.
Instant risk-per-trade evaluation based on account size and fixed 1% risk profile.
Selected Candle Mode – choose any past candle to lock and compare ATR metrics.
Live Mode – displays updated metrics for the most recent candle.
Detailed Table Output:
ATR values
Stop Loss (SL)
Take Profit (TP)
Lot size based on risk and volatility
Separate columns for both normal ATR and 1.5× ATR
🧩 Display Options:
Switch between Desktop and Phone UI layouts.
Position the table freely using X/Y axis controls.
Customize marker size to highlight selected candles directly on the chart.
🔧 Technical Notes:
Precision preserved using str.tostring(..., "#.000") for consistent decimal formatting.
Lot size is truncated (not rounded) to ensure accurate capital exposure estimates.
Fully overlay-safe and lightweight for live use.
Versionshinweise
Small bug fix in relation to rounding and truncation issuesVersionshinweise
**Patch Notes: ATR Table Indicator (v6)****New Features & Improvements:**
- ✅ **Official Symbol Support Added:**
The script now includes explicit formatting and SL/TP calculation support for:
- `XAUUSD` (Gold)
- `GBPUSD`
- `AUDUSD`
These symbols are now recognized for custom rounding and pip conversion rules.
- 📊 **Selectable Candle Time & Marker:**
You can now select a specific candle by timestamp (`selected_time`) and display a triangle marker below it. Marker size is customizable (Tiny to Huge or Auto).
- 🧮 **Precision-Aware Truncation Function:**
Introduced a custom `truncate()` function that handles floating-point precision gracefully, avoiding common rounding errors in ATR and lot calculations.
- 💼 **Risk Management Table Display:**
Displays a real-time and historical breakdown of:
- ATR values
- Stop Loss (SL)
- Take Profit (TP)
- Lot Size
For both normal (1×) and aggressive (1.5×) risk settings.
- 🧾 **Desktop and Phone UI Modes:**
- **Desktop Mode:** Full matrix table with separate columns for "Selected", "Live", and 1.5× variants.
- **Phone Mode:** Condensed vertical layout with key metrics for easier mobile viewing.
- 🔧 **Custom Table Positioning:**
Table can now be aligned to various screen positions via `x_pos` and `y_pos` inputs (e.g., top-right, bottom-left, etc.).
- 🔢 **Dynamic Rounding Format Based on Ticker:**
ATR, SL, TP, and Lot values are rounded to appropriate precision:
- XAUUSD → 3 decimals (`0.###`)
- GBPUSD, AUDUSD, EURUSD → 5 decimals (`0.#####`)
- USDJPY → 3 decimals (`0.000`)
- BTCUSD → 2 decimals (`000.00`)
- Default fallback → 5 decimals
- 🧠 **Smoothing Options for ATR:**
Users can choose from `SMA`, `RMA`, `EMA`, or `WMA` for the ATR smoothing method.
Versionshinweise
**Patch Notes: ATR Table Indicator (v6)****New Features & Improvements:**
- ✅ **Official Symbol Support Added:**
The script now includes explicit formatting and SL/TP calculation support for:
- `XAUUSD` (Gold)
- `GBPUSD`
- `AUDUSD`
These symbols are now recognized for custom rounding and pip conversion rules.
- 📊 **Selectable Candle Time & Marker:**
You can now select a specific candle by timestamp (`selected_time`) and display a triangle marker below it. Marker size is customizable (Tiny to Huge or Auto).
- 🧮 **Precision-Aware Truncation Function:**
Introduced a custom `truncate()` function that handles floating-point precision gracefully, avoiding common rounding errors in ATR and lot calculations.
- 💼 **Risk Management Table Display:**
Displays a real-time and historical breakdown of:
- ATR values
- Stop Loss (SL)
- Take Profit (TP)
- Lot Size
For both normal (1×) and aggressive (1.5×) risk settings.
- 🧾 **Desktop and Phone UI Modes:**
- **Desktop Mode:** Full matrix table with separate columns for "Selected", "Live", and 1.5× variants.
- **Phone Mode:** Condensed vertical layout with key metrics for easier mobile viewing.
- 🔧 **Custom Table Positioning:**
Table can now be aligned to various screen positions via `x_pos` and `y_pos` inputs (e.g., top-right, bottom-left, etc.).
- 🔢 **Dynamic Rounding Format Based on Ticker:**
ATR, SL, TP, and Lot values are rounded to appropriate precision:
- XAUUSD → 3 decimals (`0.###`)
- GBPUSD, AUDUSD, EURUSD → 5 decimals (`0.#####`)
- USDJPY → 3 decimals (`0.000`)
- BTCUSD → 2 decimals (`000.00`)
- Default fallback → 5 decimals
- 🧠 **Smoothing Options for ATR:**
Users can choose from `SMA`, `RMA`, `EMA`, or `WMA` for the ATR smoothing method.
Versionshinweise
ATR Table Indicator (v6.1) — Advanced ATR-Based Risk Management ToolThis script is a precision-focused tool for traders who rely on the Average True Range (ATR) to guide risk management. It calculates and displays ATR-derived stop loss, take profit, and lot size values in a responsive table format directly on the chart.
The indicator uses a user-selected smoothing method (SMA, RMA, EMA, or WMA) to calculate the ATR and applies custom pip conversion rules based on the active trading symbol. It is especially helpful for those trading across symbols with differing decimal formats, such as forex pairs, gold (XAUUSD), or cryptocurrencies.
🔍 How It Works
ATR Calculation: The script calculates the ATR using the selected smoothing method. This forms the foundation for all other derived metrics (SL, TP, Lot Size).
Pip Conversion: Each supported symbol (e.g., XAUUSD, GBPUSD, USDJPY) uses a different decimal format. A dynamic rounding system handles these variations to ensure consistent outputs across markets.
Risk Modeling: Two risk models are shown — one using the base ATR (1×) and one using an aggressive multiplier (1.5×). These are used to compute SL, TP, and recommended lot sizes based on the selected risk setting.
Take Profit Multiplier: Users can define their own TP multiplier, applied consistently across both live and historical data points.
Lot Size Calculation: The lot size is computed using the standard formula:
Lot Size
=
Risk Capital
ATR
×
Pip Value
Lot Size=
ATR×Pip Value
Risk Capital
The script simplifies this for the user while maintaining symbol-specific precision.
🧰 Main Features
Real-time and historical table showing ATR, SL, TP, and Lot Size
Supports both standard and aggressive risk models
Symbol-specific decimal and pip formatting for accurate results
Customizable marker display for a specific historical candle
Responsive UI modes for desktop and mobile users
User-defined TP multiplier for strategic flexibility
📈 How to Use It
Add the indicator to your chart — it will automatically detect the symbol and format accordingly.
Adjust smoothing and TP settings — choose your preferred ATR smoothing method and take profit multiplier.
View table in real time — the table updates dynamically with ATR, SL/TP, and lot size based on live data or the selected candle.
Interpret results — use the 1× and 1.5× models to guide risk sizing decisions.
The script does not execute trades but is meant as a risk visualization aid. All calculations are designed to help traders gauge realistic, volatility-adjusted position sizes in volatile markets.
Versionshinweise
📌 ATR Table Only — Precision Risk Modeling Tool (v6.2)Closed-Source | Trade Planning & Volatility-Based Sizing
This script displays an ATR-based table for real-time position sizing, risk assessment, and volatility analysis. It’s built for traders who require accurate SL/TP calculations and position sizing tailored to market volatility.
🔧 Core Calculations
This tool uses the Average True Range (ATR) — selectable via SMA, RMA, EMA, or WMA — to measure recent volatility. From this:
Stop Loss (SL) is calculated as:
SL = ATR × Multiplier
where Multiplier is fixed (1x) or user-defined (e.g., 1.5x for aggressive mode).
Take Profit (TP) is derived by multiplying SL by a custom TP ratio (default: 3×).
TP = SL × TP Multiplier
Lot Size uses the formula:
Lot Size = (Account Risk in $) / (SL in Pips × Pip Value)
Pip value is adjusted per symbol based on fixed rules (e.g., 0.01 for Gold, 0.0001 for Forex pairs).
The script auto-detects symbol types (e.g., XAUUSD, GBPUSD) and applies decimal and pip logic accordingly.
🧠 Technical Features
Real-Time ATR Table:
Displays ATR, SL, TP, and Lot Size for two profiles — Standard (1× ATR) and Aggressive (1.5× ATR).
Selectable Historical Candle Mode:
Choose a bar manually to recalculate ATR/SL/TP/lot size for that specific candle (great for trade review).
Precision Handling:
Uses decimal-aware rounding to match broker conventions and prevent floating point noise.
🖥️ Interface and Chart Behavior
Adds a table to the chart — location customizable (top-left, bottom-right, etc.).
UI supports Desktop and Phone modes for better readability.
No external indicators are required. All visuals are from this script alone.
A label may appear when Candle Mode is active to mark the selected bar.
📌 Best Used On
This version is optimized for:
Symbol Market Format
XAUUSD Gold 3 decimals
GBPUSD Forex 5 decimals
AUDUSD Forex 5 decimals
Pip conversions and decimal rounding are handled automatically for these.
🧭 How to Use
Load the indicator on your chart.
Select ATR smoothing type, TP multiplier, and UI layout in settings.
Read values from the on-screen table.
(Optional) Select a specific historical candle to analyze.
⚠️ Note:
This is not an order execution script. It provides strategic metrics to support manual trade planning with volatility-aware sizing.
Versionshinweise
📌 ATR Table Only — Precision Risk Modeling Tool (v6.2)Closed-Source | Trade Planning & Volatility-Based Sizing
This script displays an ATR-based table for real-time position sizing, risk assessment, and volatility analysis. It’s built for traders who require accurate SL/TP calculations and position sizing tailored to market volatility.
🔧 Core Calculations
This tool uses the Average True Range (ATR) — selectable via SMA, RMA, EMA, or WMA — to measure recent volatility. From this:
Stop Loss (SL) is calculated as:
SL = ATR × Multiplier
where Multiplier is fixed (1x) or user-defined (e.g., 1.5x for aggressive mode).
Take Profit (TP) is derived by multiplying SL by a custom TP ratio (default: 3×).
TP = SL × TP Multiplier
Lot Size uses the formula:
Lot Size = (Account Risk in $) / (SL in Pips × Pip Value)
Pip value is adjusted per symbol based on fixed rules (e.g., 0.01 for Gold, 0.0001 for Forex pairs).
The script auto-detects symbol types (e.g., XAUUSD, GBPUSD) and applies decimal and pip logic accordingly.
🧠 Technical Features
Real-Time ATR Table:
Displays ATR, SL, TP, and Lot Size for two profiles — Standard (1× ATR) and Aggressive (1.5× ATR).
Selectable Historical Candle Mode:
Choose a bar manually to recalculate ATR/SL/TP/lot size for that specific candle (great for trade review).
Precision Handling:
Uses decimal-aware rounding to match broker conventions and prevent floating point noise.
🖥️ Interface and Chart Behavior
Adds a table to the chart — location customizable (top-left, bottom-right, etc.).
UI supports Desktop and Phone modes for better readability.
No external indicators are required. All visuals are from this script alone.
A label may appear when Candle Mode is active to mark the selected bar.
📌 Best Used On
This version is optimized for:
Symbol Market Format
XAUUSD Gold 3 decimals
GBPUSD Forex 5 decimals
AUDUSD Forex 5 decimals
Pip conversions and decimal rounding are handled automatically for these.
🧭 How to Use
Load the indicator on your chart.
Select ATR smoothing type, TP multiplier, and UI layout in settings.
Read values from the on-screen table.
(Optional) Select a specific historical candle to analyze.
⚠️ Note:
This is not an order execution script. It provides strategic metrics to support manual trade planning with volatility-aware sizing.
Geschütztes Skript
Dieses Script ist als Closed-Source veröffentlicht. Sie können es kostenlos und ohne Einschränkungen verwenden – erfahren Sie hier mehr.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Geschütztes Skript
Dieses Script ist als Closed-Source veröffentlicht. Sie können es kostenlos und ohne Einschränkungen verwenden – erfahren Sie hier mehr.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.