PROTECTED SOURCE SCRIPT
Diupdate

Calculo de VOL

44
Indicator Description for TradingView Publication
Title: Average Volatility Range Calculator (ADR, AWR, AMR)
Overview:
This Pine Script indicator calculates and displays Average Daily Range (ADR), Average Weekly Range (AWR), and Average Monthly Range (AMR) levels on your TradingView chart. It overlays horizontal lines representing key volatility ranges based on historical true range data, helping traders identify potential support/resistance zones, expansion targets, and volatility expectations for daily, weekly, and monthly timeframes. The ranges are projected from the current bar, extending left and right for better visualization, with customizable labels showing prices and percentage variations. Ideal for day traders, swing traders, and position traders in forex, stocks, crypto, or futures markets.
Key Features:

Multiple Range Types:
ADR: Average Daily Range over a configurable period (default: 22 days).
AWR: Average Weekly Range over a configurable period (default: 13 weeks).
AMR: Average Monthly Range over a configurable period (default: 6 months).
Each range can be independently enabled/disabled.

Reference Point Options:
Use daily/weekly/monthly open as the base reference (e.g., "From DO/WO/MO") for range calculations, or fallback to a dynamic high/low midpoint.

Expanded Levels:
Core levels: +100% (upper) and -100% (lower) ranges.
Intermediate levels: +25%, +50%, +75% (and negatives), with customizable visibility, color, and thickness.
Optional expansion up to +200% and -200% (in 25% increments) for extreme volatility scenarios.
Zero level (0%) line as a midpoint reference, configurable separately.

Visual Customization:
Individual colors, line styles (solid, dashed, dotted), and widths for main lines, zero lines, and intermediate levels.
Default colors optimized for dark backgrounds (e.g., cyan for ADR, orange for AWR, pink for AMR).
Labels: Toggleable price and percentage labels at the end of lines, with dynamic formatting (e.g., "ADR +100%: 1.2345 (+5.67%)").

Extension and Spacing Controls:
Lines extend left by a fixed 20 bars (lookback) and right by configurable candles (default: 20 per range type).
Horizontal spacing between range groups (default: 35 bars) to prevent label overlap; set to 0 for compact display.

Performance and Compatibility:
Uses request.security for higher timeframe data, ensuring accurate calculations across any chart timeframe.
Optimized for real-time updates with var declarations to minimize redraws.
Supports up to 500 lines and labels for complex setups without performance issues.
No alerts or plots; focused on overlay visualization for clean chart integration.


How to Use:
Add the indicator to your chart and adjust settings via the inputs panel. Enable the ranges you need, tweak periods for your asset's volatility, and customize visuals to match your strategy. For example, use ADR for intraday targets in forex pairs or AWR/AMR for longer-term planning in stocks. The percentage values help gauge relative volatility strength.
Notes:

This indicator does not provide trading signals; it's a tool for volatility analysis.
Tested on various assets; adjust periods based on market conditions.
Version: Pine Script v6.
Average Volatility Range Calculator (ADR, AWR, AMR) – Key Features

3 Volatility Ranges in One Indicator
ADR (Daily), AWR (Weekly), AMR (Monthly) – enable/disable independently.

Smart Reference Point
Option to use Open of the Period (DO/WO/MO) or High-Low Midpoint as base for range projection.

Multi-Level Grid
±100% (main range)
±25%, ±50%, ±75% (intermediate)
±125%, ±150%, ±175%, ±200% (expandable)
0% midline with dedicated style

Fully Customizable Visuals
Unique colors, thickness, and line styles (solid/dashed/dotted) for each range and level.
Price + % labels on the right (e.g., +100%: 1.0850 (+2.34%)).

Smart Horizontal Layout
Adjustable right extension per range (default: 20 bars).
Spacing control (default: 35 bars) to avoid label overlap – set to 0 for compact view.
Fixed 20-bar left alignment from current candle.

High Performance & Compatibility
Pine Script v6, uses var + request.security for smooth real-time updates.
Supports 500 lines/labels, works on any timeframe/asset.


Ideal for: intraday targets (ADR), swing setups (AWR), or long-term zones (AMR) in forex, crypto, stocks, futures.
Catatan Rilis
## Update Notes - Version 2.0

**Major Changes:**

- Renamed indicator to "Cálculo de VOL" (Volume Calculation)
- Added expandable levels up to ±200% for all ranges (ADR, AWR, AMR) with optional activation
- Implemented individual horizontal offset controls (left/right) for each range
- Added configurable spacing between ranges to prevent label overlap on different screen sizes
- Enhanced labels now display average percentage variation for each level
- Updated default color scheme optimized for dark backgrounds: cyan for ADR, orange for AWR, magenta for AMR
- Improved calculation accuracy with lookahead parameter for precise alignment with base TR ADR/AWR/AMR indicator
- Removed Midnight Open feature from ADR section
- All intermediate levels (±25%, ±50%, ±75%) now enabled by default
- Level ±200% follows main line styling, while ±125%, ±150%, ±175% follow intermediate level styling


**Interface Improvements:**

- Hybrid configuration structure with global spacing control and individual offset controls per range
- Enhanced visual hierarchy with optimized transparency levels
- All configuration labels translated to Portuguese


This version maintains full compatibility with previous calculations while offering enhanced customization and visual clarity.

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.