MagiaTrade Logo
Indicators

Volatility

Complete guide to all volatility indicators available in MagiaTrade

Volatility Indicators

Volatility indicators measure the rate and magnitude of price changes, helping traders understand market dynamics, set appropriate stop-losses, and identify potential breakout opportunities.

Available Volatility Indicators

Bollinger Bands

Bollinger Bands are a volatility indicator that creates dynamic support and resistance levels based on standard deviation from a moving average.

Overview

Created by John Bollinger, this indicator consists of three lines: a middle band (moving average) and two outer bands that expand and contract based on market volatility. The bands help identify overbought/oversold conditions and potential breakouts.

Components

  1. Middle Band: Simple Moving Average (typically 20 periods)
  2. Upper Band: Middle Band + (Standard Deviation × Multiplier)
  3. Lower Band: Middle Band - (Standard Deviation × Multiplier)

Configuration

indicator: Bollinger_Bands
period: 20          # MA period
std_dev: 2          # Standard deviation multiplier
ma_type: SMA        # Moving average type

Parameters

ParameterDefaultRangeDescription
period205-50Moving average period
std_dev21-3Standard deviation multiplier
ma_typeSMASMA/EMAType of moving average

Interpretation

Band Interaction

  • Price at Upper Band: Potential overbought/resistance
  • Price at Lower Band: Potential oversold/support
  • Price at Middle Band: Neutral, often acts as support/resistance

Band Width

  • Narrow Bands (Squeeze): Low volatility, potential breakout coming
  • Wide Bands: High volatility, trending market
  • Expanding Bands: Increasing volatility
  • Contracting Bands: Decreasing volatility

Trading Signals

Mean Reversion

  • Buy Signal: Price touches lower band and reverses
  • Sell Signal: Price touches upper band and reverses

Breakout Trading

  • Bullish Breakout: Price closes above upper band with volume
  • Bearish Breakout: Price closes below lower band with volume

Band Squeeze

  • Setup: Bands at narrowest point in 6 months
  • Signal: Trade the breakout direction

Bollinger Band Strategies

Band Bounce

strategy: BB_Bounce
indicators:
  - Bollinger_Bands:
      period: 20
      std_dev: 2
rules:
  - Buy at lower band touch with RSI < 30
  - Sell at upper band touch with RSI > 70

Squeeze Breakout

strategy: BB_Squeeze
indicators:
  - Bollinger_Bands:
      period: 20
      std_dev: 2
  - ATR:
      period: 14
conditions:
  - Identify squeeze: Band width < ATR
  - Trade breakout direction with volume

Advanced Techniques

Double Bollinger Bands

Use two sets of bands (1 and 2 standard deviations) to create zones:

  • Buy Zone: Between -1 and -2 SD
  • Sell Zone: Between +1 and +2 SD
  • Neutral Zone: Between -1 and +1 SD

%B Indicator

Measures where price is relative to the bands:

%B = (Price - Lower Band) / (Upper Band - Lower Band)
  • %B > 1: Above upper band
  • %B < 0: Below lower band
  • %B = 0.5: At middle band

Best Practices

Tip: Bollinger Bands work best when combined with momentum indicators like RSI or MACD for confirmation.

Market Conditions

  • Trending Markets: Use band walks (price hugging bands)
  • Ranging Markets: Trade band bounces
  • Low Volatility: Watch for squeeze setups

Parameter Optimization

  • Short-term (10-period): More signals, more noise
  • Standard (20-period): Balanced approach
  • Long-term (50-period): Fewer, more reliable signals

Common Patterns

Band Walk

Price "walks" along upper or lower band in strong trends:

  • Upper Band Walk: Strong uptrend
  • Lower Band Walk: Strong downtrend

M-Tops and W-Bottoms

  • M-Top: Double top with second peak below upper band
  • W-Bottom: Double bottom with second low above lower band

Squeeze Patterns

  1. Volatility Squeeze: Bands narrow significantly
  2. Squeeze Release: Explosive move after squeeze
  3. False Breakout: Initial breakout fails, reverses

Advantages

  • Visual representation of volatility
  • Dynamic support/resistance levels
  • Multiple trading strategies possible
  • Works in various market conditions

Limitations

  • Lagging indicator
  • False signals in choppy markets
  • Doesn't predict direction, only volatility
  • Requires confirmation from other tools

Combining with Other Indicators

Powerful combinations:

  • RSI: Confirm overbought/oversold
  • Volume: Validate breakouts
  • MACD: Momentum confirmation
  • ATR: Volatility comparison

AI Agent Configuration

agent_config:
  indicators:
    - Bollinger_Bands:
        period: 20
        std_dev: 2
  prompt: |
    Monitor Bollinger Bands for opportunities:
    
    Mean Reversion Setup:
    - Buy when price touches lower band
    - Confirm with RSI oversold
    - Target: Middle band
    
    Breakout Setup:
    - Identify band squeeze (narrow width)
    - Enter on breakout with volume
    - Stop: Opposite band

Further Reading

ATR (Average True Range)

Measures market volatility without indicating price direction, providing crucial information for risk management and position sizing.

Overview

ATR calculates the average of true ranges over a specified period, helping traders understand how much an asset typically moves.

Configuration

indicator: ATR
period: 14          # Calculation period

Parameters

ParameterDefaultRangeDescription
period145-50Number of periods for averaging

Interpretation

Volatility Levels

  • High ATR: High volatility periods
  • Low ATR: Low volatility periods
  • Rising ATR: Increasing volatility
  • Falling ATR: Decreasing volatility

Applications

  • Stop-loss placement: Use ATR multiples for stops
  • Position sizing: Adjust size based on volatility
  • Volatility filters: Avoid low volatility periods
  • Breakout confirmation: High ATR confirms breakouts

Trading Applications

Risk Management

  • Stop loss: Set stops at 2-3 × ATR from entry
  • Position sizing: Reduce size in high ATR periods
  • Risk assessment: Higher ATR = higher risk

Market Analysis

  • Volatility cycles: Identify expansion/contraction
  • Breakout trading: High ATR suggests strong moves
  • Mean reversion: Extreme ATR levels may revert

Best Practices

Pro Tip: Use ATR for position sizing - risk the same dollar amount by adjusting position size based on current ATR.

Period Selection

  • Short-term: 7-10 periods for active trading
  • Standard: 14 periods for most applications
  • Long-term: 20-30 periods for position trading

Example Strategies

ATR-Based Stop Loss

strategy: ATR_Risk_Management
indicators:
  - ATR:
      period: 14
  - Moving_Average:
      period: 20
      type: EMA
rules:
  - Buy when price crosses above EMA
  - Set stop loss at entry - (2 × ATR)
  - Set target at entry + (3 × ATR)

Volatility Breakout

strategy: ATR_Breakout
indicators:
  - ATR:
      period: 14
  - Bollinger_Bands:
      period: 20
      std_dev: 2
rules:
  - Wait for low ATR (below 20-day average)
  - Buy breakout above upper BB when ATR starts rising
  - Use ATR for stop placement

Advantages

  • Objective volatility measurement
  • Essential for risk management
  • Works in all market conditions
  • Helps with position sizing
  • Universal application across assets

Limitations

  • Doesn't indicate direction
  • Lagging indicator
  • May lag sudden volatility changes
  • Requires combination with directional indicators

Combining with Other Indicators

Works excellently with:

  • All trend indicators: For stop-loss placement
  • Bollinger Bands: Volatility confirmation
  • Breakout systems: Movement validation
  • Support/Resistance: Risk/reward calculation

AI Agent Configuration

agent_config:
  indicators:
    - ATR:
        period: 14
    - Moving_Average:
        period: 20
        type: EMA
  prompt: |
    Use ATR for intelligent risk management:
    
    Buy when:
    - Price crosses above 20 EMA
    - ATR is not extremely high (< 2x recent average)
    - Volume confirms the move
    
    Risk management:
    - Stop loss: Entry - (2 × current ATR)
    - Position size: Risk same $ amount regardless of ATR
    - Target: Entry + (2.5 × current ATR)
    
    Avoid trading when ATR is extremely low (potential breakout pending)

Keltner Channels

Volatility-based envelope similar to Bollinger Bands but using Average True Range (ATR) for channel width calculation.

Configuration

indicator: Keltner_Channels
period: 20          # EMA period
multiplier: 2       # ATR multiplier
atr_period: 10      # ATR calculation period

Parameters

ParameterDefaultRangeDescription
period2010-50EMA period for center line
multiplier21-5ATR multiplier for bands
atr_period105-20ATR calculation period

Interpretation

  • Price above upper: Strong bullish momentum
  • Price below lower: Strong bearish momentum
  • Price returns to middle: Mean reversion
  • Channel width: Volatility measure

Trading Signals

  1. Buy: Price breaks above upper channel
  2. Sell: Price breaks below lower channel
  3. Mean reversion: Price returns to center EMA

Standard Deviation

Statistical measure of how much price varies from its average, providing objective volatility measurement.

Configuration

indicator: Standard_Deviation
period: 20

Interpretation

  • High values: High volatility
  • Low values: Low volatility
  • Sudden spike: Potential market event

Bollinger Bands %B

Shows where the current price is relative to the Bollinger Bands as a percentage.

Configuration

indicator: BB_Percent_B
period: 20
std_dev: 2

Interpretation

  • %B > 1: Price above upper band
  • %B < 0: Price below lower band
  • %B = 0.5: Price at middle band

Bollinger Bands Width

Measures the distance between the upper and lower Bollinger Bands to identify volatility cycles.

Configuration

indicator: BB_Width
period: 20
std_dev: 2

Interpretation

  • High width: High volatility
  • Low width: Low volatility (squeeze)
  • Expanding: Increasing volatility

Chaikin Volatility

Measures the rate of change in the Average True Range to identify changing volatility conditions.

Configuration

indicator: Chaikin_Volatility
period: 14
roc_period: 10

Interpretation

  • Above zero: Increasing volatility
  • Below zero: Decreasing volatility
  • Extreme values: Volatility extremes

Historical Volatility

Calculates the statistical volatility of price returns over a specified period, often annualized.

Configuration

indicator: Historical_Volatility
period: 20
annualize: true

Interpretation

  • Higher values: More volatile period
  • Lower values: Less volatile period
  • Compare: To implied volatility in options

Standard Error

Statistical measure that indicates the accuracy of trend line estimates and regression calculations.

Configuration

indicator: Standard_Error
period: 20

Interpretation

  • Lower values: More reliable trend
  • Higher values: Less reliable trend
  • Statistical significance: Assessment measure

Standard Error Bands

Creates upper and lower bands around a linear regression line using standard error calculations.

Configuration

indicator: Standard_Error_Bands
period: 20
deviations: 2

Interpretation

  • Price at upper band: Potential resistance
  • Price at lower band: Potential support
  • Inside bands: Normal price range

Donchian Channels

Creates channels by plotting the highest high and lowest low over a specified period.

Configuration

indicator: Donchian_Channels
period: 20

Interpretation

  • Price at upper: Potential breakout/resistance
  • Price at lower: Potential breakdown/support
  • Breakouts: Trend continuation signals

Envelopes

Creates upper and lower bands around a moving average using fixed percentage values.

Configuration

indicator: Envelopes
period: 20
percentage: 2.5
ma_type: SMA

Interpretation

  • Price at upper: Potential overbought
  • Price at lower: Potential oversold
  • Envelope breaks: Strong price movements

Moving Average Channel

Creates a channel using moving averages of the high and low prices over a specified period.

Configuration

indicator: MA_Channel
period: 20
ma_type: SMA

Interpretation

  • Price above channel: Bullish breakout
  • Price below channel: Bearish breakdown
  • Inside channel: Range-bound market

Price Channel

Creates a channel by connecting the highest and lowest prices over a lookback period.

Configuration

indicator: Price_Channel
period: 20

Interpretation

  • Channel slope: Trend direction
  • Channel width: Volatility measure
  • Breakouts: Potential trend changes

Volatility Close-to-Close

Measures volatility based solely on closing price changes, excluding overnight gaps.

Configuration

indicator: Volatility_Close_to_Close
period: 20

Interpretation

  • Higher values: More volatile closes
  • Lower values: Stable closes
  • Overnight gap risk: Excluded from calculation

Volatility Index

Composite measure that combines multiple volatility inputs to provide a comprehensive volatility ranking.

Configuration

indicator: Volatility_Index
period: 14

Interpretation

  • Higher values: Higher volatility
  • Lower values: Lower volatility
  • Relative ranking: Compare across periods

Volatility OHLC

Calculates volatility using the full Open-High-Low-Close price data for more comprehensive analysis.

Configuration

indicator: Volatility_OHLC
period: 20

Interpretation

  • Incorporates intraday range: More comprehensive than close-only
  • Better volatility estimation: Uses all price information

Volatility Zero Trend Close-to-Close

Volatility measure that removes the trend component to provide pure volatility measurement.

Configuration

indicator: Volatility_Zero_Trend
period: 20

Interpretation

  • Removes trend component: Pure volatility measure
  • Better for option pricing: Risk-neutral measurement