OPEN-SOURCE SCRIPT
Updated

ATR Spike Kienthogo

279
ATR Spike Kienthogo
This indicator, titled "ATR Spike Kienthogo", is designed to visualize volatility spikes in the market by comparing the current Average True Range (ATR) against a dynamic threshold. The threshold is calculated as an EMA-smoothed ATR multiplied by a user-defined factor. When the current ATR exceeds this threshold, the indicator highlights it as a spike event, further classified by price direction (up or down).

The script features:

Configurable ATR smoothing methods: RMA, SMA, EMA, WMA.

Customizable spike detection threshold via spike_multiple.

Conditional color plotting of ATR:

Spike + Price Up → Green

Spike + Price Down → Red

Non-spike → User-defined neutral color, adaptive to candle direction (greenish for bullish candles, reddish for bearish candles).

This script is especially useful for:

Detecting volatility expansions.

Enhancing entry/exit timing during strong directional moves.

Confirming breakout strength or trap signals in low-volatility regimes.

The logic maintains clean separation between spike vs. non-spike conditions and offers full control over color coding for better visual integration in multi-indicator environments.

Release Notes
🔹 Introduction

ATR Spike Kienthogo v2.3 is an advanced volatility-based indicator that identifies and classifies spike events in price action using ATR (Average True Range) dynamics.
This version introduces a structured multi-layer spike system:

Straight Spikes – primary ATR breakouts.

Counter Spikes – responsive spikes that emerge after a previous spike in the opposite direction.

Mega Spikes – extreme volatility expansions beyond a configurable multiple of the long-term ATR reference line.

The indicator is designed for traders who want to track sudden volatility bursts, potential reversal triggers, and market exhaustion points.

🔹 Key Updates in v2.3

Display Mode Control (show_mode)

All → Show all spike types.

Counter Only → Show only counter spikes.

Mega Only → Show only extreme mega spikes.
→ Now plots are fully filtered by display mode.

Counter Spike System

Counter spikes must occur within a user-defined bar window (x_window) after an opposite straight spike.

Independent color settings for Counter Up and Counter Down (default: orange / purple).

Mega Spike Expansion

Mega condition applies to both straight and counter spikes.

Threshold = Line 6 × ratio_mega.

Separate alerts for Mega Up, Mega Down, and Mega Any.

Alerts

Straight Spike Alerts (Up / Down / Any).

Counter Spike Alerts (Up / Down / Any).

Mega Spike Alerts (Up / Down / Any).
→ Alerts are independent from display mode (always triggered when conditions are met).

Neutral Bars

Non-spike ATR values are plotted in faded gray tones for context.

Visual & Structural Improvements

Clear naming convention:
ATR • Straight Spike Up, ATR • Straight Spike Down,
ATR • Counter Spike Up, ATR • Counter Spike Down.

Optimized filters for consistent display across all modes.

🔹 How to Use

Setup

Add the script to your chart.

Adjust ATR lengths (atr_len, atr_len_short, atr_len_long) and ratio thresholds to match your market conditions.

Interpretation

Straight Spike → A primary breakout in ATR volatility.

Counter Spike → A responsive move after an opposite spike, often signaling reversal or correction.

Mega Spike → Extreme volatility burst, potential climax or exhaustion.

Trading Ideas

Use Straight Spikes to identify breakout initiation.

Track Counter Spikes as potential contrarian signals.

Watch for Mega Spikes as exhaustion or climactic moves.

Alerts

Configure alerts for specific spike categories depending on your strategy.

Example: set “Counter Spike (Any)” for reversal trading setups.

🔹 Notes

Plots respect display mode filters.

Alerts do not respect display mode filters (they fire whenever conditions are true). This ensures you don’t miss signals even when a category is hidden on the chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.