Market Breadth Peaks & Troughs IndicatorIndicator Overview
Market Breadth (S5TH) visualizes extremes of market strength and weakness by overlaying -
a 200-period EMA (long-term trend)
a 5-period EMA (short-term trend, user-adjustable)
on the percentage of S&P 500 constituents trading above their 200-day SMA (INDEX:S5TH).
Peaks (▼) and troughs (▲) are detected with prominence filters so you can quickly spot overbought and oversold conditions.
⸻
1. Core Logic
Component Description
Breadth series INDEX:S5TH — % of S&P 500 stocks above their 200-SMA
Long EMA 200-EMA to capture the primary trend
Short EMA 5-EMA (default, editable) for short-term swings
Peak detection ta.pivothigh + prominence ⇒ major peaks marked with red ▼
Trough detection (200 EMA) ta.pivotlow + prominence + value < longTroughLvl ⇒ blue ▲
Trough detection (5 EMA) ta.pivotlow + prominence + value < shortTroughLvl ⇒ green ▲
Background shading Pink when 200 EMA slope is down and 5 EMA sits below 200 EMA
⸻
2. Adjustable Parameters (input())
Group Variable Default Purpose
Symbol breadthSym INDEX:S5TH Breadth index
Long EMA longLen 200 Period of long EMA
Short EMA shortLen 5 Period of short EMA
Pivot width (long) pivotLen 20 Bars left/right for 200-EMA peaks/troughs
Pivot width (short) pivotLenS 10 Bars for 5-EMA troughs
Prominence (long) promThresh 0.5 %-pt Depth filter for 200-EMA pivots
Prominence (short) promThreshS 3.0 %-pt Depth filter for 5-EMA pivots
Trough level (long) longTroughLvl 50 % Max value to accept a 200-EMA trough
Trough level (short) shortTroughLvl 30 % Max value to accept a 5-EMA trough
⸻
3. Signal Guide
Marker / Color Meaning Typical reading
Red ▼ Major breadth peak Overbought / possible top
Blue ▲ Deep 200-EMA trough End of mid-term correction
Green ▲ Shallow 5-EMA trough (early) Short-term rebound setup
Pink background Long-term down-trend and short-term weak Risk-off phase
⸻
4. Typical Use Cases
1. Counter-trend timing
• Fade greed: trim longs on red ▼
• Buy fear: scale in on green ▲; add on blue ▲
2. Trend filter
• Avoid new longs while the background is pink; wait for a trough & recovery.
3. Risk management
• Reduce exposure when peaks appear, reload partial size on confirmed troughs.
⸻
5. Notes & Tips
• INDEX:S5TH is sourced from TradingView and may be back-adjusted when index membership changes.
• Fine-tune pivotLen, promThresh, and level thresholds to match current volatility before relying on alerts or automated rules.
• Slope thresholds (±0.10 %-pt) that trigger background shading can also be customized for different market regimes.
Breadth Indicators
On Balance Volume MomentumA combination of "On Balance Volume (OBV)" and "Volume Oscillator" with customized parameters.
A combination of "On Balance Volume (OBV)" and "Volume Oscillator" with customized parameters.
A combination of "On Balance Volume (OBV)" and "Volume Oscillator" with customized parameters.
A combination of "On Balance Volume (OBV)" and "Volume Oscillator" with customized parameters.
A combination of "On Balance Volume (OBV)" and "Volume Oscillator" with customized parameters.
A combination of "On Balance Volume (OBV)" and "Volume Oscillator" with customized parameters.
Professional Multi-Indicator SystemA next-level, all-in-one trading tool that fuses multiple proven indicators and smart filters into a single overlay. Customize each component independently to match your style and timeframe:
📊 Core Indicators:
MACD with adjustable fast/slow/signal periods & optional confirmation
RSI with configurable length, overbought/oversold levels & trend detection
Bollinger Bands (upper/middle/lower) with custom period & deviation
Fibonacci Retracements auto-drawn or manual, with key levels (23.6%, 38.2%, 50%, 61.8%, 78.6%, 100%)
🌪️ Volatility & Volume Filters:
ATR-based spacing for signal placement
Volume threshold & smoothing to reduce noise
🔺🔻 Smart Signals & Labels:
Up to 5-level “signal strength” grading
Modern, Classic or Minimal label styles with emojis
📋 Custom Info Table:
Real-time price, trend, MACD, RSI, BB width, volume & last signal strength
Fully positionable and resizable
🚨 Advanced Alerts:
Buy/Sell, RSI OB/OS, MACD crossovers, BB touches & squeezes
“Strong” variants when signal strength ≥ 4/5
🎨 Visual Controls:
Toggle each indicator on/off
Choose label size, table position & overall styling
How to Use:
Add to chart.
Open Settings → configure groups: Main, MACD, RSI, BB, Volume, Fibonacci & Visuals.
Enable only the indicators and alerts you need.
Adjust label style/size and info table location for your workspace.
⚠️ For educational purposes only. Always apply proper risk management.
Theonator Bank Volume Entry & Exit v2This is the best of the best of the best idnicators for sniping the big boys and aboslutely stealing cash from the other retail brokeys, just follow it on like silver or sum and it will actully blow ur mind to pieces
GGG - Market Breadth UST vs GoldThis indicator provides a dynamic macro view between the 10YR U.S. Treasury future market and Gold prices. It combines bond market momentum with gold technical trend confirmation to enhance trading decision-making.
Recommended Timeframes: Suitable for intraday to swing trading setups (e.g., 15-minutes, 1-hour, 4-hour).
Notes:
REMARK: This indicator is designed as a macro filter or confirmation tool. It is highly recommended to use in conjunction with your preferred entry/exit techniques for optimal performance.
PHAI GIAU NHAT VN)positive and negative are recreated each bar using nz(... ) to keep the old value if no new signal is present.
The line p_mom ? true : nz(positive , false) ensures the variable keeps the correct state across bars.
Clearly displays "UP" and "DOWN" signals.
theonator bank volume entry & exitThe best high volume indicator out there, find where the big boys go long & short trough high volume trading, be the first to know to be the moneymaker
PsicoTraders PRO - Versão Final (Otimizada)## ENGLISH VERSION
# PsicoTraders PRO - Smart Money & Risk Management (Optimized)
## Description
PsicoTraders PRO is an advanced indicator that combines traditional technical analysis, Smart Money concepts, and quantitative risk management to identify high-probability trading opportunities. Developed for traders seeking a structured and disciplined approach, this indicator provides precise signals with integrated risk management.
**Developed by Silvio Deusdara**
## How the Visual Elements Work
### Main Visual Components
**1. Entry Signals**
- **Green Background**: Indicates confirmed buy signal when all conditions are met
- **Red Background**: Indicates confirmed sell signal when all conditions are met
- **Detailed Labels**: Appear on the chart showing complete information about each signal, including:
- Entry price
- Stop Loss
- Take Profit levels (TP1, TP2, TP3)
- Recommended position size
- Suggested leverage
- Current volatility regime
- Fibonacci and Order Block confirmation
**2. Order Blocks**
- **Transparent Green Boxes**: Represent Bullish Order Blocks - areas where institutions placed significant buy orders
- **Transparent Red Boxes**: Represent Bearish Order Blocks - areas where institutions placed significant sell orders
- These boxes remain visible for a defined period (default: 50 bars) and are areas of interest for entries
**3. Liquidity Zones**
- **Horizontal Blue Lines**: Mark liquidity zones where traders' stops are concentrated
- **Upper Line**: High liquidity zone - area where sellers' stops are positioned
- **Lower Line**: Low liquidity zone - area where buyers' stops are positioned
**4. Fibonacci Levels**
- **Yellow/Orange Circles**: Mark the 0.618 Fibonacci levels (the most important for reversals)
- **Yellow Level**: 0.618 Fibonacci for uptrend
- **Orange Level**: 0.618 Fibonacci for downtrend
**5. Pivots and Reversal Points**
- **Red Triangles**: Mark pivot highs - potential reversal points to the downside
- **Green Triangles**: Mark pivot lows - potential reversal points to the upside
**6. Long-Term Trend**
- **Blue Line**: Represents the 200-period moving average, indicating the long-term trend
- Price above the line = uptrend
- Price below the line = downtrend
**7. Performance Table**
- Located in the upper right corner of the chart
- **Trend**: Shows the current direction (Up/Down/Sideways) with color coding
- **Volatility**: Displays the current regime (High/Medium/Low) with color coding
- **RSI**: Current value with color coding (red for overbought, green for oversold)
- **ATR**: Current volatility value
- **Kelly %**: Optimal percentage of capital to risk based on Kelly formula
- **Vol Ratio**: Volatility as a percentage of price
- **Fib 0.618**: Indicates if price is near the 0.618 Fibonacci level
- **Order Block**: Indicates if there are active Order Blocks on the chart
## Setup Instructions
1. **Add the Indicator to Your Chart**
- After adding the indicator, you'll see the visual elements appear on your chart
2. **Adjust Risk Parameters**
- Set "Account Balance (USDT)" to your actual trading account size
- Set "Risk per Trade (USDT)" to your desired risk amount per trade
- Set "Maximum Account Risk (%)" to your risk tolerance (recommended: 5-10%)
- Set "Historical Win Rate" to your actual win rate (if unknown, start with 0.50)
3. **Adjust Filter Settings**
- Enable/disable filters based on your trading style:
- Trend Filter: Recommended ON for trend following
- Volatility Filter: Recommended ON for most markets
- Session Filter: ON for stocks/forex, OFF for crypto
- Macro Filter: Recommended ON for alignment with long-term trend
- Fibonacci Filter: Recommended ON for better quality signals
4. **Customize Visual Settings**
- Adjust colors for buy/sell signals and Order Blocks if needed
- Enable/disable performance table based on preference
5. **Set Up Alerts**
- Create alerts for Buy Signals, Sell Signals, and Trailing Stop hits
- Use the pre-formatted alert messages for complete trade information
## How to Interpret the Visual Signals
### Buy Signals (Long)
A valid buy signal occurs when:
1. The chart background turns green
2. A detailed label appears below the current candle
3. Price is near a bullish Order Block (green box)
4. The performance table shows an uptrend
5. Ideally, price is near the 0.618 Fibonacci level (yellow circle)
### Sell Signals (Short)
A valid sell signal occurs when:
1. The chart background turns red
2. A detailed label appears above the current candle
3. Price is near a bearish Order Block (red box)
4. The performance table shows a downtrend
5. Ideally, price is near the 0.618 Fibonacci level (orange circle)
### Visual Risk Management
- Labels show exactly where to place stop loss and take profits
- Recommended position size is automatically calculated
- Trailing stop is visualized when activated
- Liquidity zones help identify areas where price may reverse
## Benefits of the Indicator
- **Complete Approach**: Combines technical analysis, Smart Money, and risk management
- **High-Quality Signals**: Multiple filters reduce false signals
- **Integrated Risk Management**: Automatic position and stop loss calculations
- **Clear Visualization**: Intuitive visual elements facilitate interpretation
- **Adaptability**: Works in multiple markets and timeframes
- **Alert System**: Notifications for entries, trailing stops, and approaching liquidity zones
This indicator was developed for traders seeking a disciplined and evidence-based approach to the market, combining the best of traditional technical analysis with modern Smart Money concepts and quantitative risk management.
Iconic Traders SessionsIconicTraders Sessions. D.D. indicatior, markiert die highs and lows (Asia & London Session)
Relative Strength Indexrsi 2468 ema14 wma 45.đây là tổng hợp chỉ báo rsi và ma +wma trên 1 biểu đồ.nó rất ngắn gọn hữu ích
RSI Divergence with MA9 & WMA45RSI Divergence with MA9 & WMA45
Description:
This indicator identifies both regular and hidden RSI divergences based on pivot highs and lows of the RSI. It plots:
The RSI line, along with two optional moving averages:
SMA (MA9): for smoothing short-term RSI movements.
WMA (WMA45): for broader RSI trend detection.
It visually marks divergence signals directly on the RSI pane:
Bullish Divergence → "Bull" label
Hidden Bullish Divergence → "H Bull" label
Bearish Divergence → "Bear" label
Hidden Bearish Divergence → "H Bear" label
The indicator includes the following features:
Adjustable RSI period, source, and divergence lookback settings.
Optional display of MA9 and WMA45 on the RSI.
Customizable colors for bullish, bearish, hidden divergence signals.
Overbought and oversold zones are shown at 70 and 30, with a background fill for easy visualization.
Built-in alert conditions trigger notifications when divergences are detected.
This script is useful for traders looking to anticipate trend reversals by spotting RSI divergences in combination with moving average smoothing.
Ind JDV 2.2 PRO🛡️ Ind JDV 2.0 PRO – Chandelier Exit + FVG + EMA (Precise Entry)
Description:
Ind JDV 2.0 PRO is an advanced indicator that combines three powerful confirmations to find the best trading opportunities:
Chandelier Exit: Filters trade direction based on volatility breakouts controlled by ATR.
Fair Value Gap (FVG): Detects price inefficiency zones at their very first appearance.
EMA (Exponential Moving Average): Acts as a trend filter to ensure trading with the dominant market flow.
🔍 Key Features:
Marks only one precise signal on the candle where the FVG starts.
Confirms the trend using a 150-period EMA (fully adjustable).
Optionally draws Take Profit and Stop Loss target lines for clear visual guidance.
Background color changes (green or red) to reflect the active market trend.
Built-in automatic alerts for buy or sell opportunities.
Optimized code for maximum speed across all timeframes.
✅ Perfect for trading indices, forex, cryptocurrencies, and stocks.
✅ Compatible with all timeframes (5m, 15m, 1H, 4H, Daily).
✅ Fully customizable to fit scalping, intraday, or swing trading styles.
⚙️ Default Parameters:
ATR Period: 10
ATR Multiplier: 3.0
EMA Period: 150
FVG Lookback: 3 candles
Take Profit: 100 points
Stop Loss: 50 points
(All values are adjustable in settings.)
📈 How it works:
The indicator analyzes price structure.
Detects a valid Fair Value Gap (FVG) formation.
Confirms the breakout with a Chandelier Exit signal.
Verifies price alignment with the EMA trend.
Triggers a single entry signal (BUY or SELL) exactly on the first candle that meets all conditions.
🚀 Optimize your trading by focusing on high-probability zones, supported by solid confirmations and clean visual signals.
Add Ind JDV 2.0 PRO to your trading arsenal and take your strategy to the next level! 🔥
UT Bot Pro | Final Fixedclear entry and tp/sl signals , the entries are given by advanced bot and TP SL are based on user choice and be modified
BLACK ArrowPERFECT INDICATOR It also includes dynamic trade tracking that updates the status of each TP/SL level, showing whether each has been hit, and persists these statuses in a screener table even if the price reverses. The indicator features auto-adjusting parameters for different tickers and provides visual feedback for each trade setup, making it a useful tool for trend-following and risk management.
RSI + MACD AL SinyaliIt creates a buy signal using RSI and MACD in the daily watch list. Signals give better results on the daily.
Zweig Market Breadth Thrust Indicator+Trigger [LazyBear x rwak]The Breadth Thrust (BT) indicator is a market momentum indicator developed by Dr. Martin Zweig. According to Dr. Zweig, a Breadth Thrust occurs when, during a 10-day period, the Breadth Thrust indicator rises from below 40 percent to above 61.5 percent.
A "Thrust" indicates that the stock market has rapidly changed from an oversold condition to one of strength, but has not yet become overbought. This is very rare and has happened only a few times. Dr. Zweig also points out that most bull markets begin with a Breadth Thrust.
This version of the Breadth Thrust indicator includes a trigger visualized with red circles, making it easier to spot when the indicator crosses the critical 61.5% level, signaling potential bullish momentum.
All parameters are configurable. You can draw BT for NYSE, NASDAQ, AMEX, or based on combined data (i.e., AMEX+NYSE+NASD). There is also a "CUSTOM" mode supported, so you can enter your own ADV/DEC symbols.
Credit: The original Breadth Thrust logic was created by LazyBear, whose public indicators can be found here , and app-store indicators here .
More info:
Definition of Breadth Thrust
A Breadth Thrust Signal
A Rare "Zweig" Buy Signal
Zweig Breadth Thrust: Redux
SuperZweig thrust (<= 30 dias)SuperZweig Thrust (≤ 30-day breadth trigger)
This study tracks the classic Zweig Breadth Thrust pattern, but restricts valid signals to a 30-bar (≈ 30-trading-day) window.
---
What it plots
| Plot | Meaning |
|------|---------|
| **Blue line** – `EMA10` | 10-bar exponential moving average of the _breadth ratio_:`advancing issues / (advancing + declining)` |
| **Red h-line 0.35** | Oversold threshold ( < 0.35 ) |
| **Green h-line 0.64** | Overbought threshold ( > 0.64 ) |
| **Red “×”** | The moment EMA10 crosses **down** through 0.35 |
| **Green “●”** | The moment EMA10 crosses **up** through 0.64 |
| **Green “BUY” label** | Complete Super-Zweig thrust: red × followed by green ● **within 30 daily bars** |
Signal logic
1. **Trigger phase** – when EMA10 drops below 0.35
*Script starts a 30-bar countdown.*
2. **Confirmation phase** – if, while the countdown is active, EMA10 rises above 0.64:
*A single “BUY” label is plotted beneath that bar.*
3. **Expiry** – if 30 bars elapse without the 0.64 cross, the cycle resets; no signal is produced.
4. After any valid “BUY” the cycle also resets, so a new signal requires a fresh cross < 0.35.
Inputs
* **EMA length** – default 10.
* **Advancing / Declining symbols** – default `ADVS` / `DECS` (NYSE issues); can be pointed to any Exchange-specific or custom breadth tickers.
Typical use
Apply on a **daily chart** of a broad index (e.g., S&P; 500).
A printed “BUY” indicates a historically rare surge in market breadth often associated with durable rallies. Combine with other risk-management and trend filters before trading.
High ATRHigh-ATR is an indicator that visualizes volatility using the Average True Range (ATR). It highlights periods of elevated volatility by comparing the ATR to its moving average.
When the ATR exceeds its moving average, it is considered "Overthreshold" and is displayed in red. This helps identify candles with significant volatility.
Note: ATR does not indicate market direction, only the magnitude (width) of the trading range.
Default Settings:
Long length: 50 (used for the ATR moving average)
Short length: 1 (used for the current ATR)
Multiplier: 2
These values can be adjusted depending on your trading style, but this is the default configuration.
ADR% Extension Levels from SMA 50I created this indicator inspired by RealSimpleAriel (a swing trader I recommend following on X) who does not buy stocks extended beyond 4 ADR% from the 50 SMA and uses extensions from the 50 SMA at 7-8-9-10-11-12-13 ADR% to take profits with a 20% position trimming.
RealSimpleAriel's strategy (as I understood it):
-> Focuses on leading stocks from leading groups and industries, i.e., those that have grown the most in the last 1-3-6 months (see on Finviz groups and then select sector-industry).
-> Targets stocks with the best technical setup for a breakout, above the 200 SMA in a bear market and above both the 50 SMA and 200 SMA in a bull market, selecting those with growing Earnings and Sales.
-> Buys stocks on breakout with a stop loss set at the day's low of the breakout and ensures they are not extended beyond 4 ADR% from the 50 SMA.
-> 3-5 day momentum burst: After a breakout, takes profits by selling 1/2 or 1/3 of the position after a 3-5 day upward move.
-> 20% trimming on extension from the 50 SMA: At 7 ADR% (ADR% calculated over 20 days) extension from the 50 SMA, takes profits by selling 20% of the remaining position. Continues to trim 20% of the remaining position based on the stock price extension from the 50 SMA, calculated using the 20-period ADR%, thus trimming 20% at 8-9-10-11 ADR% extension from the 50 SMA. Upon reaching 12-13 ADR% extension from the 50 SMA, considers the stock overextended, closes the remaining position, and evaluates a short.
-> Trailing stop with ascending SMA: Uses a chosen SMA (10, 20, or 50) as the definitive stop loss for the position, depending on the stock's movement speed (preferring larger SMAs for slower-moving stocks or for long-term theses). If the stock's closing price falls below the chosen SMA, the entire position is closed.
In summary:
-->Buy a breakout using the day's low of the breakout as the stop loss (this stop loss is the most critical).
--> Do not buy stocks extended beyond 4 ADR% from the 50 SMA.
--> Sell 1/2 or 1/3 of the position after 3-5 days of upward movement.
--> Trim 20% of the position at each 7-8-9-10-11-12-13 ADR% extension from the 50 SMA.
--> Close the entire position if the breakout fails and the day's low of the breakout is reached.
--> Close the entire position if the price, during the rise, falls below a chosen SMA (10, 20, or 50, depending on your preference).
--> Definitively close the position if it reaches 12-13 ADR% extension from the 50 SMA.
I used Grok from X to create this indicator. I am not a programmer, but based on the ADR% I use, it works.
Below is Grok from X's description of the indicator:
Script Description
The script is a custom indicator for TradingView that displays extension levels based on ADR% relative to the 50-period Simple Moving Average (SMA). Below is a detailed description of its features, structure, and behavior:
1. Purpose of the Indicator
Name: "ADR% Extension Levels from SMA 50".
Objective: Draw horizontal blue lines above and below the 50-period SMA, corresponding to specific ADR% multiples (4, 7, 8, 9, 10, 11, 12, 13). These levels represent potential price extension zones based on the average daily percentage volatility.
Overlay: The indicator is overlaid on the price chart (overlay=true), so the lines and SMA appear directly on the price graph.
2. Configurable Inputs
The indicator allows users to customize parameters through TradingView settings:
SMA Length (smaLength):
Default: 50 periods.
Description: Specifies the number of periods for calculating the Simple Moving Average (SMA). The 50-period SMA serves as the reference point for extension levels.
Constraint: Minimum 1 period.
ADR% Length (adrLength):
Default: 20 periods.
Description: Specifies the number of days to calculate the moving average of the daily high/low ratio, used to determine ADR%.
Constraint: Minimum 1 period.
Scale Factor (scaleFactor):
Default: 1.0.
Description: An optional multiplier to adjust the distance of extension levels from the SMA. Useful if levels are too close or too far due to an overly small or large ADR%.
Constraint: Minimum 0.1, increments of 0.1.
Tooltip: "Adjust if levels are too close or far from SMA".
3. Main Calculations
50-period SMA:
Calculated with ta.sma(close, smaLength) using the closing price (close).
Serves as the central line around which extension levels are drawn.
ADR% (Average Daily Range Percentage):
Formula: 100 * (ta.sma(dhigh / dlow, adrLength) - 1).
Details:
dhigh and dlow are the daily high and low prices, obtained via request.security(syminfo.tickerid, "D", high/low) to ensure data is daily-based, regardless of the chart's timeframe.
The dhigh / dlow ratio represents the daily percentage change.
The simple moving average (ta.sma) of this ratio over 20 days (adrLength) is subtracted by 1 and multiplied by 100 to obtain ADR% as a percentage.
The result is multiplied by scaleFactor for manual adjustments.
Extension Levels:
Defined as ADR% multiples: 4, 7, 8, 9, 10, 11, 12, 13.
Stored in an array (levels) for easy iteration.
For each level, prices above and below the SMA are calculated as:
Above: sma50 * (1 + (level * adrPercent / 100))
Below: sma50 * (1 - (level * adrPercent / 100))
These represent price levels corresponding to a percentage change from the SMA equal to level * ADR%.
4. Visualization
Horizontal Blue Lines:
For each level (4, 7, 8, 9, 10, 11, 12, 13 ADR%), two lines are drawn:
One above the SMA (e.g., +4 ADR%).
One below the SMA (e.g., -4 ADR%).
Color: Blue (color.blue).
Style: Solid (style=line.style_solid).
Management:
Each level has dedicated variables for upper and lower lines (e.g., upperLine1, lowerLine1 for 4 ADR%).
Previous lines are deleted with line.delete before drawing new ones to avoid overlaps.
Lines are updated at each bar with line.new(bar_index , level, bar_index, level), covering the range from the previous bar to the current one.
Labels:
Displayed only on the last bar (barstate.islast) to avoid clutter.
For each level, two labels:
Above: E.g., "4 ADR%", positioned above the upper line (style=label.style_label_down).
Below: E.g., "-4 ADR%", positioned below the lower line (style=label.style_label_up).
Color: Blue background, white text.
50-period SMA:
Drawn as a gray line (color.gray) for visual reference.
Diagnostics:
ADR% Plot: ADR% is plotted in the status line (orange, histogram style) to verify the value.
ADR% Label: A label on the last bar near the SMA shows the exact ADR% value (e.g., "ADR%: 2.34%"), with a gray background and white text.
5. Behavior
Dynamic Updating:
Lines update with each new bar to reflect new SMA 50 and ADR% values.
Since ADR% uses daily data ("D"), it remains constant within the same day but changes day-to-day.
Visibility Across All Bars:
Lines are drawn on every bar, not just the last one, ensuring visibility on historical data as well.
Adaptability:
The scaleFactor allows level adjustments if ADR% is too small (e.g., for low-volatility symbols) or too large (e.g., for cryptocurrencies).
Compatibility:
Works on any timeframe since ADR% is calculated from daily data.
Suitable for symbols with varying volatility (e.g., stocks, forex, cryptocurrencies).
6. Intended Use
Technical Analysis: Extension levels represent significant price zones based on average daily volatility. They can be used to:
Identify potential price targets (e.g., take profit at +7 ADR%).
Assess support/resistance zones (e.g., -4 ADR% as support).
Measure price extension relative to the 50 SMA.
Trading: Useful for strategies based on breakouts or mean reversion, where ADR% levels indicate reversal or continuation points.
Debugging: Labels and ADR% plot help verify that values align with the symbol’s volatility.
7. Limitations
Dependence on Daily Data: ADR% is based on daily dhigh/dlow, so it may not reflect intraday volatility on short timeframes (e.g., 1 minute).
Extreme ADR% Values: For low-volatility symbols (e.g., bonds) or high-volatility symbols (e.g., meme stocks), ADR% may require adjustments via scaleFactor.
Graphical Load: Drawing 16 lines (8 upper, 8 lower) on every bar may slow the chart for very long historical periods, though line management is optimized.
ADR% Formula: The formula 100 * (sma(dhigh/dlow, Length) - 1) may produce different values compared to other ADR% definitions (e.g., (high - low) / close * 100), so users should be aware of the context.
8. Visual Example
On a chart of a stock like TSLA (daily timeframe):
The 50 SMA is a gray line tracking the average trend.
Assuming an ADR% of 3%:
At +4 ADR% (12%), a blue line appears at sma50 * 1.12.
At -4 ADR% (-12%), a blue line appears at sma50 * 0.88.
Other lines appear at ±7, ±8, ±9, ±10, ±11, ±12, ±13 ADR%.
On the last bar, labels show "4 ADR%", "-4 ADR%", etc., and a gray label shows "ADR%: 3.00%".
ADR% is visible in the status line as an orange histogram.
9. Code: Technical Structure
Language: Pine Script @version=5.
Inputs: Three configurable parameters (smaLength, adrLength, scaleFactor).
Calculations:
SMA: ta.sma(close, smaLength).
ADR%: 100 * (ta.sma(dhigh / dlow, adrLength) - 1) * scaleFactor.
Levels: sma50 * (1 ± (level * adrPercent / 100)).
Graphics:
Lines: Created with line.new, deleted with line.delete to avoid overlaps.
Labels: Created with label.new only on the last bar.
Plots: plot(sma50) for the SMA, plot(adrPercent) for debugging.
Optimization: Uses dedicated variables for each line (e.g., upperLine1, lowerLine1) for clear management and to respect TradingView’s graphical object limits.
10. Possible Improvements
Option to show lines only on the last bar: Would reduce visual clutter.
Customizable line styles: Allow users to choose color or style (e.g., dashed).
Alert for anomalous ADR%: A message if ADR% is too small or large.
Dynamic levels: Allow users to specify ADR% multiples via input.
Optimization for short timeframes: Adapt ADR% for intraday timeframes.
Conclusion
The script creates a visual indicator that helps traders identify price extension levels based on daily volatility (ADR%) relative to the 50 SMA. It is robust, configurable, and includes debugging tools (ADR% plot and labels) to verify values. The ADR% formula based on dhigh/dlow
Stocks & Sectors TableThis is a special edition and upgrade to the tables I have previously released
NB It must be placed on a 24 hour symbol such as BTC to work properly
It has the ability to switch between winter and daylight savings time
It has the ability to be reset both at preopen and RTH open
סשנים עם קווים ורקע + טקסטShows diffrent Session Times, ASIA LONDON and NEW YORK , for FOREX traders , its very helpful your welcome