OPEN-SOURCE SCRIPT
Ale tonkis Swing failure + 5M

Indicator Description: Ale Tonkis Swing Failure (SFP)
This script is an advanced Swing Failure Pattern (SFP) and Change in State of Delivery (CISD) indicator. It is designed to identify liquidity sweeps and market structure shifts across multiple timeframes simultaneously.
Key Features
Pivot Detection: Automatically identifies high and low pivot points based on a user-defined lookback period.
Liquidity Sweep Analysis: Detects when the price "sweeps" (goes beyond) a previous pivot high or low without closing significantly past it, signaling a potential reversal.
CISD (Change in State of Delivery): Tracks internal market structure shifts to confirm the SFP signal.
Multi-Timeframe (MTF) Dashboard: A real-time table in the top-right corner monitors the trend state across four different timeframes: M1, M3, M5, and M15.
Visual Alerts: The script uses dynamic bar coloring and labels (▲/▼) to signal entry points directly on the chart.
Technical Updates (M5 Integration)
The code has been specifically modified to include the 5-minute (M5) timeframe within the Multi-Timeframe logic:
Data Fetching: A new request.security call was added to retrieve the sfp_trend_state from the 5-minute interval.
Table Expansion: The display table was resized from 4 rows to 5 rows to accommodate the new data without overlapping.
UI Alignment: The M5 state is now positioned between M3 and M15, providing a smoother transition for traders analyzing mid-range scalping opportunities.
How to Read the Dashboard
LONG (Green): Indicates a bullish SFP has occurred and the trend remains positive on that timeframe.
SHORT (Red): Indicates a bearish SFP has occurred and the trend remains negative.
Empty/Black: No active SFP trend is currently detected on that specific timeframe.
This script is an advanced Swing Failure Pattern (SFP) and Change in State of Delivery (CISD) indicator. It is designed to identify liquidity sweeps and market structure shifts across multiple timeframes simultaneously.
Key Features
Pivot Detection: Automatically identifies high and low pivot points based on a user-defined lookback period.
Liquidity Sweep Analysis: Detects when the price "sweeps" (goes beyond) a previous pivot high or low without closing significantly past it, signaling a potential reversal.
CISD (Change in State of Delivery): Tracks internal market structure shifts to confirm the SFP signal.
Multi-Timeframe (MTF) Dashboard: A real-time table in the top-right corner monitors the trend state across four different timeframes: M1, M3, M5, and M15.
Visual Alerts: The script uses dynamic bar coloring and labels (▲/▼) to signal entry points directly on the chart.
Technical Updates (M5 Integration)
The code has been specifically modified to include the 5-minute (M5) timeframe within the Multi-Timeframe logic:
Data Fetching: A new request.security call was added to retrieve the sfp_trend_state from the 5-minute interval.
Table Expansion: The display table was resized from 4 rows to 5 rows to accommodate the new data without overlapping.
UI Alignment: The M5 state is now positioned between M3 and M15, providing a smoother transition for traders analyzing mid-range scalping opportunities.
How to Read the Dashboard
LONG (Green): Indicates a bullish SFP has occurred and the trend remains positive on that timeframe.
SHORT (Red): Indicates a bearish SFP has occurred and the trend remains negative.
Empty/Black: No active SFP trend is currently detected on that specific timeframe.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.