PROTECTED SOURCE SCRIPT
Time-Weighted Fractality (TWF)

The Time-Weighted Fractality (TWF) indicator is your secret weapon to measure how stable or volatile a market truly is — by tracking how long trends persist, and weighting that against recent history.
Why you need TWF in your toolkit:
Markets aren’t always trending or choppy in a simple on/off way. TWF quantifies trend duration dynamics — revealing when the market is locked into a strong, stable trend or stuck in erratic, unpredictable moves.
How it works — sharp and simple:
Trend Duration Tracking:
Measures how many bars since the last highest high changed within a specified lookback. This tells you how long the current trend has been running.
Smoothed Average Duration:
Uses an EMA to smooth trend duration, providing a reliable baseline of recent trend behavior.
Ratio Calculation (TWF):
The core metric — current trend duration divided by average trend duration.
TWF > 1.2 means the current trend is stronger and more persistent than usual.
TWF < 0.8 signals a volatile, choppy market struggling to hold any trend.
What you see on the chart:
A clean TWF line plotted with clear zones:
Green zone = Strong, stable trend environment
Red zone = Choppy, volatile conditions to avoid or trade cautiously
Background shading highlights these zones for instant clarity
Markers appear at critical points for quick visual cues
Why traders swear by it:
✅ Reliable trend confirmation: Avoid false signals by only acting when TWF confirms sustained market momentum.
✅ Timing tool: Perfect for spotting when a trend is building strength or losing grip — invaluable for entries and exits.
✅ Versatile: Works on all timeframes and instruments, from forex to stocks to crypto.
✅ Simple but powerful: Combines fractal concept with time weighting and smoothing — giving you a next-level understanding of market rhythm.
Pro tip:
Use TWF alongside your favorite price or volume-based indicators for unmatched precision. For example, confirm breakouts only when TWF signals a stable trend zone to increase your win rate.
In a sea of noise, TWF cuts through to give you real, actionable insight. Trust it, build your strategy around it — it’s that good.
Why you need TWF in your toolkit:
Markets aren’t always trending or choppy in a simple on/off way. TWF quantifies trend duration dynamics — revealing when the market is locked into a strong, stable trend or stuck in erratic, unpredictable moves.
How it works — sharp and simple:
Trend Duration Tracking:
Measures how many bars since the last highest high changed within a specified lookback. This tells you how long the current trend has been running.
Smoothed Average Duration:
Uses an EMA to smooth trend duration, providing a reliable baseline of recent trend behavior.
Ratio Calculation (TWF):
The core metric — current trend duration divided by average trend duration.
TWF > 1.2 means the current trend is stronger and more persistent than usual.
TWF < 0.8 signals a volatile, choppy market struggling to hold any trend.
What you see on the chart:
A clean TWF line plotted with clear zones:
Green zone = Strong, stable trend environment
Red zone = Choppy, volatile conditions to avoid or trade cautiously
Background shading highlights these zones for instant clarity
Markers appear at critical points for quick visual cues
Why traders swear by it:
✅ Reliable trend confirmation: Avoid false signals by only acting when TWF confirms sustained market momentum.
✅ Timing tool: Perfect for spotting when a trend is building strength or losing grip — invaluable for entries and exits.
✅ Versatile: Works on all timeframes and instruments, from forex to stocks to crypto.
✅ Simple but powerful: Combines fractal concept with time weighting and smoothing — giving you a next-level understanding of market rhythm.
Pro tip:
Use TWF alongside your favorite price or volume-based indicators for unmatched precision. For example, confirm breakouts only when TWF signals a stable trend zone to increase your win rate.
In a sea of noise, TWF cuts through to give you real, actionable insight. Trust it, build your strategy around it — it’s that good.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.