Volatility Signals

20 signals in this category. See the full Signal Catalog for the cross-category index, or the Signals Overview for an introduction. Click a signal to expand parameters and examples.
Check if ATR indicates high volatility relative to price. High volatility (ATR as % of close > threshold) can indicate potential trading opportunities or increased risk.Parameters
NameTypeRangeDefaultDescription
windowint5 — 5014ATR period
threshold_pctfloat0.5 — 10.03.0ATR as percentage of close threshold
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "atr_high_volatility",
    "parameters": {
        "window": 14,
        "threshold_pct": 3.0
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False
Detect ATR Trailing Stop flipping from long (+1) to short (-1). Bearish trend-following entry signal.Parameters
NameTypeRangeDefaultDescription
windowint5 — 10014ATR window
multiplierfloat0.5 — 10.03.0ATR multiplier
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "atr_trailing_stop_flip_down",
    "parameters": {
        "window": 14,
        "multiplier": 3.0
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False
Detect ATR Trailing Stop flipping from short (-1) to long (+1). Bullish trend-following entry signal.Parameters
NameTypeRangeDefaultDescription
windowint5 — 10014ATR window
multiplierfloat0.5 — 10.03.0ATR multiplier
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "atr_trailing_stop_flip_up",
    "parameters": {
        "window": 14,
        "multiplier": 3.0
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False
Check if ATR Trailing Stop is in the long regime (+1 direction).Parameters
NameTypeRangeDefaultDescription
windowint5 — 10014ATR window
multiplierfloat0.5 — 10.03.0ATR multiplier for stop distance
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "atr_trailing_stop_long",
    "parameters": {
        "window": 14,
        "multiplier": 3.0
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False
Check if ATR Trailing Stop is in the short regime (-1 direction).Parameters
NameTypeRangeDefaultDescription
windowint5 — 10014ATR window
multiplierfloat0.5 — 10.03.0ATR multiplier for stop distance
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "atr_trailing_stop_short",
    "parameters": {
        "window": 14,
        "multiplier": 3.0
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False
Detect price breaking below the lower Bollinger Band. Fires on the bar where price crosses below the lower band, not while price remains below it. Crypto assets frequently test bands during high volatility; use with volume confirmation.Parameters
NameTypeRangeDefaultDescription
windowint5 — 10020MA period for center band
window_devint1 — 52Standard deviation multiplier
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "bb_lower_breakout",
    "parameters": {
        "window": 20,
        "window_dev": 2
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False
Detect Bollinger Band squeeze onset (low volatility, potential breakout). Fires on the bar where band width drops below the threshold, not while it remains below.Parameters
NameTypeRangeDefaultDescription
windowint5 — 10020MA period for center band
window_devint1 — 52Standard deviation multiplier
thresholdfloat1.0 — 20.05.0Band width percentage threshold
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "bb_squeeze",
    "parameters": {
        "window": 20,
        "window_dev": 2,
        "threshold": 5.0
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False
Detect price breaking above the upper Bollinger Band. Fires on the bar where price crosses above the upper band, not while price remains above it. Crypto assets frequently test bands during high volatility; use with volume confirmation.Parameters
NameTypeRangeDefaultDescription
windowint5 — 10020MA period for center band
window_devint1 — 52Standard deviation multiplier
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "bb_upper_breakout",
    "parameters": {
        "window": 20,
        "window_dev": 2
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False
Detect price breaking below lower Donchian Channel (new low). Fires on the bar where close drops below the prior period’s lower band. The channel is computed from the N bars BEFORE the current bar (offset=1) so the current bar’s low doesn’t deflate the band it’s compared against.Parameters
NameTypeRangeDefaultDescription
windowint5 — 10020Lookback period
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "dc_lower_breakout",
    "parameters": {
        "window": 20
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False
Detect price breaking above upper Donchian Channel (new high). Fires on the bar where close exceeds the prior period’s upper band. The channel is computed from the N bars BEFORE the current bar (offset=1) so the current bar’s high doesn’t inflate the band it’s compared against.Parameters
NameTypeRangeDefaultDescription
windowint5 — 10020Lookback period
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "dc_upper_breakout",
    "parameters": {
        "window": 20
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False
Detect price breaking below lower Keltner Channel band. Fires on the bar where price crosses below the lower band.Parameters
NameTypeRangeDefaultDescription
windowint10 — 5020EMA period
window_atrint5 — 3010ATR period
multiplierfloat0.5 — 5.02.0ATR multiplier for band width
original_versionbool-FalseUse original Keltner Channel formula instead of EMA+ATR
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "kc_lower_breakout",
    "parameters": {
        "window": 20,
        "window_atr": 10,
        "multiplier": 2.0,
        "original_version": false
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False
Detect price breaking above upper Keltner Channel band. Fires on the bar where price crosses above the upper band.Parameters
NameTypeRangeDefaultDescription
windowint10 — 5020EMA period
window_atrint5 — 3010ATR period
multiplierfloat0.5 — 5.02.0ATR multiplier for band width
original_versionbool-FalseUse original Keltner Channel formula instead of EMA+ATR
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "kc_upper_breakout",
    "parameters": {
        "window": 20,
        "window_atr": 10,
        "multiplier": 2.0,
        "original_version": false
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False
Check if normalized ATR is above a high-volatility threshold. NATR = 100 * ATR / close, so the threshold is a percentage. Values above ~2-3% typically indicate elevated volatility in equities; crypto markets can run 4-6%+ routinely.Parameters
NameTypeRangeDefaultDescription
windowint5 — 10014NATR window
thresholdfloat0.5 — 20.02.0High volatility threshold as percentage
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "natr_high_volatility",
    "parameters": {
        "window": 14,
        "threshold": 2.0
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False
Check if normalized ATR is below a low-volatility threshold. Useful as a squeeze / consolidation filter.Parameters
NameTypeRangeDefaultDescription
windowint5 — 10014NATR window
thresholdfloat0.1 — 5.01.0Low volatility threshold as percentage
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "natr_low_volatility",
    "parameters": {
        "window": 14,
        "threshold": 1.0
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False
Check if close is below the STARC lower band (breakdown).Parameters
NameTypeRangeDefaultDescription
windowint5 — 10020SMA window
window_atrint5 — 10015ATR window
multiplierfloat0.5 — 5.02.0ATR multiplier for band width
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "starc_lower_breakout",
    "parameters": {
        "window": 20,
        "window_atr": 15,
        "multiplier": 2.0
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False
Check if close is above the STARC upper band (breakout).Parameters
NameTypeRangeDefaultDescription
windowint5 — 10020SMA window
window_atrint5 — 10015ATR window
multiplierfloat0.5 — 5.02.0ATR multiplier for band width
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "starc_upper_breakout",
    "parameters": {
        "window": 20,
        "window_atr": 15,
        "multiplier": 2.0
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False
Check if Ulcer Index indicates high downside risk. Higher Ulcer Index values indicate greater downside volatility.Parameters
NameTypeRangeDefaultDescription
windowint5 — 5014Lookback period
thresholdfloat5.0 — 30.010.0High risk threshold
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "ulcer_high_risk",
    "parameters": {
        "window": 14,
        "threshold": 10.0
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False
Check if Ulcer Index indicates low downside risk. Lower Ulcer Index values indicate lower downside volatility.Parameters
NameTypeRangeDefaultDescription
windowint5 — 5014Lookback period
thresholdfloat1.0 — 15.05.0Low risk threshold
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "ulcer_low_risk",
    "parameters": {
        "window": 14,
        "threshold": 5.0
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False
Check if close has reached or fallen below the stdev-based volatility lower stop.Parameters
NameTypeRangeDefaultDescription
windowint5 — 10020Rolling stdev window
multiplierfloat0.5 — 5.02.0Stdev multiplier for stop distance
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "volatility_stop_lower",
    "parameters": {
        "window": 20,
        "multiplier": 2.0
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False
Check if close has reached or exceeded the stdev-based volatility upper stop. Indicates the price has moved multiplier standard deviations above the current bar — a potential exhaustion / mean-reversion signal.Parameters
NameTypeRangeDefaultDescription
windowint5 — 10020Rolling stdev window
multiplierfloat0.5 — 5.02.0Stdev multiplier for stop distance
Example
from mangrove_kb import RuleRegistry

rule = {
    "name": "volatility_stop_upper",
    "parameters": {
        "window": 20,
        "multiplier": 2.0
    }
}
result = RuleRegistry.evaluate(rule, df)
print(result)  # True or False