Gann Fan v15 [Phases + Signals] — Strategy by TagsTrading

By TagsTrading

Performance Metrics

Description

Gann Fan v15 [Phases + Signals] is a strategy inspired by the classic Gann Fan and Gann Angles methodology attributed to W.D. Gann. Gann’s original approach studied the relationship between price, time, geometry, and market angles to identify trend strength, diagonal support and resistance, and potential changes in market behavior.Credit:The base concept of the fan angles comes from the Gann Fan / Gann Angles method attributed to W.D. Gann. This script does not claim to reproduce Gann’s original work exactly. It is an independent strategy built around that historical concept, with additional logic for phase detection, signal confirmation, visual analysis, and risk management.What makes this strategy different:This script is not only a traditional Gann Fan drawing tool. A classic Gann Fan usually plots diagonal angle levels from a selected high or low. This strategy adds a complete decision framework on top of the Gann Fan concept.The main differences are:1. Automatic pivot detectionThe script automatically detects recent pivot highs and pivot lows instead of requiring the user to manually anchor the fan.2. ATR-normalized angle calculationInstead of using only fixed visual chart angles, the script calculates movement angles using ATR normalization. This helps adapt the angle reading to the volatility of the current symbol.3. Market phase classificationThe script classifies the market into four phases based on the calculated angle:ACCUM: weak angle or low momentum.MODER: moderate directional movement.EXPAN: stronger directional expansion.ACCEL: extreme acceleration.4. Visual phase backgroundThe chart background changes according to the detected phase and direction. This helps the user quickly identify whether the market is in accumulation, moderate movement, expansion, or acceleration.5. LONG and SHORT signal logicThe strategy generates LONG and SHORT signals using Gann-inspired angle behavior, swing direction, EMA confirmation, and candle confirmation depending on the selected entry mode.6. Multiple entry modesThe user can choose between three signal modes:Strict, Medium, and Easy.Each mode changes how much confirmation is required before a signal appears.7. Built-in risk managementThe strategy includes configurable Stop Loss, Take Profit, optional Trailing Stop, and visual TP/SL guide lines.8. DashboardA table shows the current swing direction, live angle, current phase, bullish fan angle, bearish fan angle, active mode, and phase thresholds.How the strategy enters LONG:A LONG signal appears when the market structure is bullish and the selected entry mode confirms that the bullish movement has enough strength.Mode 1 - Strict:A LONG entry requires the market phase to transition from ACCUM or MODER into EXPAN or ACCEL. The swing must be bullish, EMA 8 must be above EMA 21, and the candle must close bullish.Mode 2 - Medium:A LONG entry can appear when the current phase is MODER, EXPAN, or ACCEL. The swing must be bullish, EMA 8 must be above EMA 21, and the candle must close bullish.Mode 3 - Easy:A LONG entry can appear when the current angle is above the weak angle threshold, the swing is bullish, price closes above EMA 8, and the candle is bullish.How the strategy enters SHORT:A SHORT signal appears when the market structure is bearish and the selected entry mode confirms that the bearish movement has enough strength.Mode 1 - Strict:A SHORT entry requires the market phase to transition from ACCUM or MODER into EXPAN or ACCEL. The swing must be bearish, EMA 8 must be below EMA 21, and the candle must close bearish.Mode 2 - Medium:A SHORT entry can appear when the current phase is MODER, EXPAN, or ACCEL. The swing must be bearish, EMA 8 must be below EMA 21, and the candle must close bearish.Mode 3 - Easy:A SHORT entry can appear when the current angle is above the weak angle threshold, the swing is bearish, price closes below EMA 8, and the candle is bearish.Risk management:The strategy includes a configurable Stop Loss percentage and Take Profit percentage.When Trailing Stop is enabled, the Take Profit level is used as the trail activation price.The strategy also includes an optional open-profit protection feature that can close the position after a minimum open profit condition is reached.TP and SL levels are displayed on the chart while a position is active.Visual elements:Dynamic bullish and bearish Gann Fan levels.Phase-colored background.EMA 8 and EMA 21.LONG and SHORT labels.Live angle label.Dashboard with current market state.TP and SL lines.Important usage notes:Gann Fan and angle-based analysis can be sensitive to chart scaling, timeframe, volatility, and market conditions.This strategy should be tested on each symbol and timeframe before use.The default parameters are only a starting point.Users should adjust the angle thresholds, pivot periods, Stop Loss, Take Profit, and Trailing Stop according to their own testing.Disclaimer:This script is for educational and analytical purposes only.It does not provide financial advice.It does not guarantee profits.Past performance does not guarantee future results.Always use proper risk management.Release Notesonly the name

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView