OPEN-SOURCE SCRIPT
Super trend Fractal by Santiago Rebello

Mathematical Specifications & Signal Mechanics1. Volatility & Dynamic Trailing EngineThe volatility tracking engine is established using a modified True Range algorithm, filtered through a Wilder's Moving Average. The default values are tuned to ATRPeriod = 10 and ATRFactor = 14.True Range Modification:To account for extreme market gaps, the engine compares the standard high-to-low spread against an expanded average calculation, selecting the higher boundary to build a clean tracking cushion:$$\text{HiLo} = \min\left(\text{High} - \text{Low}, 1.5 \times \text{SMA}(\text{High} - \text{Low}, \text{Period})\right)$$Trailing Stop Line (trail):The calculated loss factor is projected as an offset band relative to the closing price ($14 \times \text{ATR}$). When the asset closes beyond the previous boundary, the system identifies a structural trend shift, flipping the thick trailing line (linewidth = 3) from Green (Bullish) to Red (Bearish).Dynamic Retracements:The script measures the vertical distance between the absolute trend extremum (ex) and the active trailing stop (trail). It marks three critical Fibonacci expansion nodes directly on the chart profile:Retracement 1: $61.8\%$Retracement 2: $78.6\%$Retracement 3: $88.6\%$2. Statistical Percentile ChannelThe breakout engine completely bypasses standard price-averaging formulas, relying instead on a historical ranking distribution across a 45-bar rolling lookback window.Envelope Thresholds:The channel uses nearest-rank percentiles to plot strict multi-period boundaries (Upper Line = 45.0%, Lower Line = 36.0%).Pattern Validation:The system identifies internal expansion setups based on strict multi-candle body definitions. Signals trigger only when candlestick body expansions meet or exceed a specific proportional weight ($0.66 \times \text{Total Candle Range}$).Signal Placement:Structural Buy Points (Olive/Green Shapes): Print when a valid bullish pattern establishes itself entirely below the statistical lower percentile line.Structural Sell Points (Maroon/Red Shapes): Print when a valid bearish pattern establishes itself entirely above the statistical upper percentile line.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.