OPEN-SOURCE SCRIPT
Goldilocks Pivot Fractals v3.0

v3.0 UPDATE — Three Signal Modes
This update adds a Signal Mode engine to the classic Williams
Fractals algorithm, giving traders three detection methods
from zero-delay scalping signals to fully confirmed swing
pivots.
WHAT'S NEW
Signal Mode Dropdown (Settings → Signal Mode):
Confirmed — The original Williams Fractals logic. Detects
pivot highs and lows by requiring n bars on each side to
confirm the fractal pattern. Signals are mathematically
confirmed but arrive after the lookback window completes.
Best for swing traders and higher timeframes (15m, 1H, 4H,
Daily) who prefer certainty. Labels display as
C: BUY / C: SELL.
Zero-Lag — Fires on the forming bar using momentum-reversal
detection. No lookforward bars required. When smoothed
momentum crosses zero and the bar closes in the signal
direction, the signal fires at bar close with zero delay.
Built for scalpers on fast instruments and lower timeframes
(1m, 2m, 5m). Labels display as Z: BUY / Z: SELL.
Confirmed + Preview — Runs both engines at the same time.
Alert labels (A: BUY / A: SELL) appear instantly when the
zero-lag engine detects a momentum reversal. Confirmed labels
(C: BUY / C: SELL) stamp later when the Williams Fractal
pattern fully validates. Early signal plus confirmed stamp,
side by side on the same chart.
ADDITIONAL IMPROVEMENTS
• All arrow markers converted to zoom-proof labels — arrows
hold their shape at every zoom level instead of shrinking
to invisible lines
• Independent toggles for Shapes, Alert Labels, and Buy/Sell
Labels — show exactly what you want, hide what you don't
• Arrow size control (tiny through huge)
• Alert label size control (independent sizing)
• Directional alert label colors — green background for
A: BUY, red background for A: SELL with black text for
high contrast on dark charts
• Sensitivity control for Zero-Lag mode
(Low / Normal / High)
• On-chart mode tag displays the active signal mode
• Full alert support across all modes
HOW TO USE
For scalping: Set Signal Mode to Zero-Lag. On a 2-minute MNQ
chart, the move can be 20-40 points in two bars. Waiting for
a confirmed fractal means watching someone else's profit.
Zero-Lag fires when the turn starts.
For swing trading: Set Signal Mode to Confirmed. The
classic Williams Fractal algorithm with n-bar confirmation on
each side. Let the pattern prove itself.
For both perspectives: Set Signal Mode to Confirmed + Preview.
The A: labels give you the real-time alert, the C: labels
confirm or invalidate. Use them together for higher-
conviction entries.
Adjust the Periods (n) setting to control the confirmation
window in Confirmed mode. Lower values detect smaller pivots
more frequently. Higher values filter for larger, more
significant swing points.
Works on any liquid market — futures, forex, crypto,
equities, indices. Use with trend confluence tools for best
results.
— NPR21
This update adds a Signal Mode engine to the classic Williams
Fractals algorithm, giving traders three detection methods
from zero-delay scalping signals to fully confirmed swing
pivots.
WHAT'S NEW
Signal Mode Dropdown (Settings → Signal Mode):
Confirmed — The original Williams Fractals logic. Detects
pivot highs and lows by requiring n bars on each side to
confirm the fractal pattern. Signals are mathematically
confirmed but arrive after the lookback window completes.
Best for swing traders and higher timeframes (15m, 1H, 4H,
Daily) who prefer certainty. Labels display as
C: BUY / C: SELL.
Zero-Lag — Fires on the forming bar using momentum-reversal
detection. No lookforward bars required. When smoothed
momentum crosses zero and the bar closes in the signal
direction, the signal fires at bar close with zero delay.
Built for scalpers on fast instruments and lower timeframes
(1m, 2m, 5m). Labels display as Z: BUY / Z: SELL.
Confirmed + Preview — Runs both engines at the same time.
Alert labels (A: BUY / A: SELL) appear instantly when the
zero-lag engine detects a momentum reversal. Confirmed labels
(C: BUY / C: SELL) stamp later when the Williams Fractal
pattern fully validates. Early signal plus confirmed stamp,
side by side on the same chart.
ADDITIONAL IMPROVEMENTS
• All arrow markers converted to zoom-proof labels — arrows
hold their shape at every zoom level instead of shrinking
to invisible lines
• Independent toggles for Shapes, Alert Labels, and Buy/Sell
Labels — show exactly what you want, hide what you don't
• Arrow size control (tiny through huge)
• Alert label size control (independent sizing)
• Directional alert label colors — green background for
A: BUY, red background for A: SELL with black text for
high contrast on dark charts
• Sensitivity control for Zero-Lag mode
(Low / Normal / High)
• On-chart mode tag displays the active signal mode
• Full alert support across all modes
HOW TO USE
For scalping: Set Signal Mode to Zero-Lag. On a 2-minute MNQ
chart, the move can be 20-40 points in two bars. Waiting for
a confirmed fractal means watching someone else's profit.
Zero-Lag fires when the turn starts.
For swing trading: Set Signal Mode to Confirmed. The
classic Williams Fractal algorithm with n-bar confirmation on
each side. Let the pattern prove itself.
For both perspectives: Set Signal Mode to Confirmed + Preview.
The A: labels give you the real-time alert, the C: labels
confirm or invalidate. Use them together for higher-
conviction entries.
Adjust the Periods (n) setting to control the confirmation
window in Confirmed mode. Lower values detect smaller pivots
more frequently. Higher values filter for larger, more
significant swing points.
Works on any liquid market — futures, forex, crypto,
equities, indices. Use with trend confluence tools for best
results.
— NPR21
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
NPR21 Premium Indicators | Access all tiers at whop.com/npr21 | DM me on TradingView for questions
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
NPR21 Premium Indicators | Access all tiers at whop.com/npr21 | DM me on TradingView for questions
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.