OPEN-SOURCE SCRIPT
Trader Assistant

Description of the "Trader Assistant" indicator
Overview
- Trader Assistant is a comprehensive TradingView indicator (Pine Script v5) that combines volatility analysis (ATR), trading volume monitoring, and signal generation to support decision-making.
Core components
1) ATR (Average True Range) calculation
- Uses a custom daily ATR function [calcATR()](Trader-Assistant.pine:86)
- Daily timeframe enforcement via [request.security()](Trader-Assistant.pine:107), independent of the current chart timeframe
- Configurable ATR length (default 5 bars)
2) ATR exhaustion analysis
- From daily open: how much of the daily ATR the price has moved from the open, as a percentage: [atrPercent](Trader-Assistant.pine:156)
- From daily extremes: percentage of the daily high–low range covered: [traveledATR](Trader-Assistant.pine:159)
3) Trading signals
- Long signal (💪) when ATR exhaustion is below the long threshold (default 30%)
- Short signal (✋) when ATR exhaustion is above the short threshold (default 70%)
- Color coding: green for long, red for short
4) Risk management levels
- From daily Open:
- Maximum: [dailyOpen + ATR](Trader-Assistant.pine:166)
- Minimum: [dailyOpen - ATR](Trader-Assistant.pine:167)
- Stop-loss: percentage of daily ATR (default 10%)
- Take-profit: multiple of stop-loss (default 4x)
- Slippage: percentage of stop-loss (default 10%)
- From daily High/Low:
- Maximum: [dailyLow + ATR](Trader-Assistant.pine:162)
- Minimum: [dailyHigh - ATR](Trader-Assistant.pine:163)
- Intra-day granularity via 5-minute ATR: [ta.atr()](Trader-Assistant.pine:170) over 30 bars, with corresponding SL/TP/slippage derived from it
5) Volume analysis
- Daily notional volume is built by summing 24 hourly bars: [d1 + d2 + ... + d24](Trader-Assistant.pine:142)
- Human-friendly K/M/B formatting of numbers
- Liquidity filter: line turns red when volume is below the configurable threshold (default 30M)
- Optional display toggle
Visualization
Table content (bottom-left of the chart), three columns:
- Columns: label, “From Open”, “From High/Low”
- Rows:
- Today’s maximum with ATR: “From Open” vs “From Low”
- Stop-loss: daily ATR vs 5-minute ATR
- Take-profit: daily ATR vs 5-minute ATR
- Slippage: daily ATR vs 5-minute ATR
- Today’s minimum with ATR: “From Open” vs “From High”
- Day volume (optional): value and color-coded sufficiency
- ATR value
- ATR exhaustion: percentage with emoji signal in both columns
Display settings and color cues
- Adjustable font size (0–3)
- Blue for max/min rows
- Green/red for signal rows
- Red for insufficient volume
Configurable inputs
ATR:
- Number of bars for ATR
- Upper/lower deviation limits for outlier handling (as inputs)
- Stop-loss size (% of daily ATR)
- Take-profit multiplier
- Slippage as % of stop-loss
Signals:
- Long threshold (% ATR exhaustion)
- Short threshold (% ATR exhaustion)
Volume:
- Toggle display
- Average period and averaging type (inputs exist; not used in current calculations)
- Minimum day volume threshold (in millions)
Technical notes
- Multi-timeframe aggregation via [request.security()](Trader-Assistant.pine:107) for daily and 5-minute data
- Tick-accurate formatting with [fRound()](Trader-Assistant.pine:34) and [fFormat()](Trader-Assistant.pine:37)
- Direct hourly summation for daily volume for simplicity and clarity: [d1 + d2 + ... + d24](Trader-Assistant.pine:142)
- Table adapts the number of rows based on whether volume is shown
Intended use
- Intraday trading: identify entry timing based on daily ATR exhaustion
- Risk management: automatic SL/TP/slippage calculations
- Trade filtering: ensure sufficient liquidity before acting
- Volatility assessment: track current movement relative to average daily range
Overview
- Trader Assistant is a comprehensive TradingView indicator (Pine Script v5) that combines volatility analysis (ATR), trading volume monitoring, and signal generation to support decision-making.
Core components
1) ATR (Average True Range) calculation
- Uses a custom daily ATR function [calcATR()](Trader-Assistant.pine:86)
- Daily timeframe enforcement via [request.security()](Trader-Assistant.pine:107), independent of the current chart timeframe
- Configurable ATR length (default 5 bars)
2) ATR exhaustion analysis
- From daily open: how much of the daily ATR the price has moved from the open, as a percentage: [atrPercent](Trader-Assistant.pine:156)
- From daily extremes: percentage of the daily high–low range covered: [traveledATR](Trader-Assistant.pine:159)
3) Trading signals
- Long signal (💪) when ATR exhaustion is below the long threshold (default 30%)
- Short signal (✋) when ATR exhaustion is above the short threshold (default 70%)
- Color coding: green for long, red for short
4) Risk management levels
- From daily Open:
- Maximum: [dailyOpen + ATR](Trader-Assistant.pine:166)
- Minimum: [dailyOpen - ATR](Trader-Assistant.pine:167)
- Stop-loss: percentage of daily ATR (default 10%)
- Take-profit: multiple of stop-loss (default 4x)
- Slippage: percentage of stop-loss (default 10%)
- From daily High/Low:
- Maximum: [dailyLow + ATR](Trader-Assistant.pine:162)
- Minimum: [dailyHigh - ATR](Trader-Assistant.pine:163)
- Intra-day granularity via 5-minute ATR: [ta.atr()](Trader-Assistant.pine:170) over 30 bars, with corresponding SL/TP/slippage derived from it
5) Volume analysis
- Daily notional volume is built by summing 24 hourly bars: [d1 + d2 + ... + d24](Trader-Assistant.pine:142)
- Human-friendly K/M/B formatting of numbers
- Liquidity filter: line turns red when volume is below the configurable threshold (default 30M)
- Optional display toggle
Visualization
Table content (bottom-left of the chart), three columns:
- Columns: label, “From Open”, “From High/Low”
- Rows:
- Today’s maximum with ATR: “From Open” vs “From Low”
- Stop-loss: daily ATR vs 5-minute ATR
- Take-profit: daily ATR vs 5-minute ATR
- Slippage: daily ATR vs 5-minute ATR
- Today’s minimum with ATR: “From Open” vs “From High”
- Day volume (optional): value and color-coded sufficiency
- ATR value
- ATR exhaustion: percentage with emoji signal in both columns
Display settings and color cues
- Adjustable font size (0–3)
- Blue for max/min rows
- Green/red for signal rows
- Red for insufficient volume
Configurable inputs
ATR:
- Number of bars for ATR
- Upper/lower deviation limits for outlier handling (as inputs)
- Stop-loss size (% of daily ATR)
- Take-profit multiplier
- Slippage as % of stop-loss
Signals:
- Long threshold (% ATR exhaustion)
- Short threshold (% ATR exhaustion)
Volume:
- Toggle display
- Average period and averaging type (inputs exist; not used in current calculations)
- Minimum day volume threshold (in millions)
Technical notes
- Multi-timeframe aggregation via [request.security()](Trader-Assistant.pine:107) for daily and 5-minute data
- Tick-accurate formatting with [fRound()](Trader-Assistant.pine:34) and [fFormat()](Trader-Assistant.pine:37)
- Direct hourly summation for daily volume for simplicity and clarity: [d1 + d2 + ... + d24](Trader-Assistant.pine:142)
- Table adapts the number of rows based on whether volume is shown
Intended use
- Intraday trading: identify entry timing based on daily ATR exhaustion
- Risk management: automatic SL/TP/slippage calculations
- Trade filtering: ensure sufficient liquidity before acting
- Volatility assessment: track current movement relative to average daily range
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.