PROTECTED SOURCE SCRIPT

ADR% / CDR% Range Analyzer - Pajamein

47
The "ADR%/CDR% Range Analyzer" is a versatile TradingView indicator designed for traders who want to monitor and compare the "Average Daily Range (ADR%)" and "Current Daily Range (CDR%)" in real-time. ADR% represents the average percentage range (high-low relative to low) over a user-defined number of daily bars, helping you gauge a stock's typical volatility. CDR% shows the current session's range as a percentage, either intraday (customizable from start to end price) or full daily, allowing you to assess how the current bar's movement stacks up against historical norms.

Key features include:
- "Visual Comparison": Displays both values as clean labels on the chart with customizable positions (separate or combined).
- "Dynamic Background Coloring": CDR% label background changes color based on its relation to ADR%—light green for low volatility (< low threshold), light blue for neutral (between thresholds), and light red for high volatility (> high threshold). This helps quickly spot expansion or contraction in daily moves.
- "Flexibility": Works on any timeframe, with options for intraday customization and anti-clipping adjustments for multi-pane layouts.

This indicator is ideal for day traders, swing traders, or anyone tracking volatility breakouts, range-bound setups, or risk management based on expected daily moves.

Input Settings Guide
Here's a breakdown of each setting and how it enhances your trading workflow:

- "Show ADR%" (Boolean, default: true)
Toggle to display/hide the ADR% label. Use this to declutter your chart when focusing solely on current range.

- "Show CDR%" (Boolean, default: true)
Toggle to display/hide the CDR% label. Ideal for charts where you only need historical average or current metrics.

- "ADR% Length" (Integer, default: 20, min: 1)
Number of daily bars for averaging the range percentage. Shorter lengths (e.g., 10) for recent volatility; longer (e.g., 50) for broader trends.

- "CDR%: Start" (Source, default: low)
Starting price for intraday CDR% (e.g., open, previous close). Customize for specific range measurements like gap fills.

- "CDR%: End" (Source, default: high)
Ending price for intraday CDR% (e.g., low, close). Pair with Start for targeted ranges, like open-to-low for downside capture.

- "Intraday Display" (String dropdown: "Intraday CDR%", "Daily CDR%", default: "Daily CDR%")
Switch between real-time intraday calculation (dynamic updates) or fixed daily value (stable, non-repainting).

- "Low Threshold %" (Float, default: 40.0, range: 0-100)
Percentage of ADR% below which CDR% gets the low (green) background. Lower it (e.g., 30%) for stricter low-volatility alerts.

- "High Threshold %" (Float, default: 60.0, range: 0-100)
Percentage of ADR% above which CDR% gets the high (red) background. Raise it (e.g., 70%) to highlight only extreme expansions.

- "ADR% Text Color" (Color picker, default: black)
Foreground color for ADR% text. Choose contrasting colors for dark/light themes.

- "CDR% Text Color" (Color picker, default: black)
Foreground color for CDR% text. Ensures readability over dynamic backgrounds.

- "Low CDR% Background (below low threshold)" (Color picker, default: light green with 70% transparency)
Background for subdued ranges. Adjust opacity for subtlety.

- "Mid CDR% Background (between thresholds)" (Color picker, default: light blue with 70% transparency)
Neutral background for typical moves.

- "High CDR% Background (above high threshold)" (Color picker, default: light red with 70% transparency)
Alert-style background for breakouts.

- "Cell Height %" (Integer, default: 8, range: 1-20)
Vertical padding for labels as a percentage of chart height. Increase (e.g., 12) in multi-pane layouts to prevent text clipping; decrease for compact views.

- "ADR% Position" (String dropdown: Top/Bottom/Middle Left/Right/Center, default: Bottom Right)
Placement of ADR% label. Use separate positions for side-by-side comparison.

- "CDR% Position" (String dropdown: Top/Bottom/Middle Left/Right/Center, default: Bottom Right)
Placement of CDR% label. Matching positions auto-stacks them vertically.

- "Text Size" (String dropdown: Tiny/Small/Normal/Large, default: Normal)
Font size for labels. "Small" for dense charts; "Normal" for clarity.

Usage Tips
- "Volatility Trading": Set thresholds to 50%/80% for spotting range expansions during news events.
- "Multi-Timeframe": Apply on 5-min charts with daily ADR for intraday targets (e.g., aim for 80% of ADR).
- "Customization": For forex/crypto, tweak Start/End to session opens. Test in replay mode to verify non-repainting.
- "Limitations": Intraday mode updates live but may not repaint until bar close; daily mode is fixed.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.