The Original Gann Swing Chart Rules script, developed by AlgoFuego, is a sophisticated trend and swing-point detection indicator built for TradingView. It follows the foundational rules of W.D. Gann’s swing chart methodology, enhanced with modern algorithmic logic to provide clearer insights into market direction changes and trend dynamics.
Unlike standard indicators that react to every price movement, this tool focuses on significant trend bars—those that establish new highs or lows—while filtering out non-trend bars that do not contribute to meaningful market direction. This approach reflects Gann’s philosophy of prioritizing swings and wave behavior over minor price noise.
At its core, the indicator applies the “Golden Rule”:
Compare each new bar only with the last trend bar, and ignore all non-trend bars.
This helps highlight true turning points (swing highs and lows) and accurately tracks market momentum.
The indicator uses several rules to detect trends:
Upward Trend
A bullish trend is confirmed when price breaks above the most recent peak after a downtrend. Different reversal models are identified, such as rising valley or equal valley reversals.
Downward Trend
Similarly, a bearish trend is signaled when price breaks below the last valley after an upward trend. Models like rising peak or equal peak breakdown are used.
Peaks and Valleys
These are identified using fractal logic: the highest or lowest price of a trend bar before the slope changes direction.
The indicator incorporates additional rules for outside bars—significant bars with both higher highs and lower lows—and uses closing prices to confirm movement direction.
Strict Rule-Based Logic
Follows Gann’s original rules strictly to pinpoint true swing points.
Fractal, Multi-Wave Analysis
Markets are treated as fractal structures composed of rising and dropping waves, enabling better visualization of the trend cycle.
Custom Alerts
Users can set alerts for important events such as swing completion, trend reversal, and breakout signals.
Visualization Options
Fully customizable visual elements include trend lines, peak/valley markers, and dynamic color schemes.
Advanced Activators
Includes a Moving Average Activator and an ATR Activator that base their calculations only on trend bars, reducing false signals in ranging markets.
To maximize the effectiveness of the indicator:
Sign up today and start using our premium tools risk-free for 30 days. Get the insights you need to make better trading decisions.