OPEN-SOURCE SCRIPT
Optimal Trade Entry + Silver Bullet [Quantum Algo]

Optimal Trade Entry + Silver Bullet [Quantum Algo]
====================================================
🔶 OVERVIEW
Optimal Trade Entry + Silver Bullet is an automated ICT-style Fibonacci retracement engine that combines the Optimal Trade Entry (OTE) concept with the three Silver Bullet time windows. The indicator confirms market structure through swing highs and swing lows, detects a break of structure, automatically anchors a Fibonacci grid to the impulse leg, and highlights the 61.8% to 79% retracement zone — the Optimal Trade Entry zone — as a gradient that intensifies toward the 70.5% sweet spot. Every zone tap is graded with a transparent confluence score built from time-of-day windows, fair value gaps, and liquidity sweeps.
The goal is simple: remove the two biggest sources of error in discretionary Optimal Trade Entry trading — anchoring the Fibonacci retracement to the wrong leg, and taking entries outside the hours when the model statistically performs.
🔶 WHAT IS THE OPTIMAL TRADE ENTRY ZONE?
The Optimal Trade Entry is a smart money concept describing the discount (in an uptrend) or premium (in a downtrend) portion of an impulse leg where institutional participants typically complete their entries after a trend has been confirmed. It is defined as the area between the 61.8% and 79% Fibonacci retracement of the most recent impulse, with the 70.5% level acting as the statistical sweet spot. Price retracing into this zone after a break of structure offers a defined-risk entry: the stop belongs beyond the origin of the leg, and the targets project into the extension levels beyond the impulse extreme.
🔶 WHAT ARE THE SILVER BULLET WINDOWS?
The Silver Bullet model restricts trading to three specific one-hour windows in New York time, when algorithmic price delivery is most likely to seek liquidity and fill fair value gaps:
- London Open window — 03:00 to 04:00
- New York Morning window — 10:00 to 11:00
- New York Afternoon window — 14:00 to 15:00
This indicator shades each window on intraday charts, labels the window open, and treats window activity as a scoring input: an Optimal Trade Entry tap that occurs inside an active window grades higher than one that occurs outside it.
🔶 WHY THIS SCRIPT IS ORIGINAL
1. Pivot-and-shift automatic anchoring. The Fibonacci grid is never drawn from arbitrary pivots and never requires manual anchoring. It appears only after price closes through a confirmed swing point — a genuine break of structure — and anchors to the true origin of the impulse leg.
2. Dynamic leg stretching. While the trend continues printing new highs or new lows, the grid stretches with the market in real time, so the retracement zone is always measured against the current, mathematically complete leg — not a stale one.
3. Time-based signal qualification. The Silver Bullet windows are not decorative background shading. They are wired directly into the signal engine and the grading model, which is what separates this tool from a standard Fibonacci retracement indicator.
4. Transparent confluence grading. Every signal receives a grade of A+, A, B, or C based on four observable, verifiable conditions: entry zone tap, active Silver Bullet window, directional fair value gap formed inside a window on the current leg, and a liquidity sweep at the leg origin (the anchor pivot running the stops beyond the pivot before it). Nothing is hidden, nothing is repainted, and nothing is curve-fit.
🔶 HOW IT WORKS
Market structure engine: Swing highs and swing lows are confirmed with a symmetric pivot lookback. A candle close above the last confirmed swing high shifts the engine bullish; a close below the last confirmed swing low shifts it bearish. All signals are evaluated on closed bars only, so entries do not repaint.
Fibonacci retracement grid: On each break of structure the impulse leg is measured from the anchor pivot to the running extreme. The script plots the origin (1.0), equilibrium (0.5), the entry zone borders (0.618 and 0.79), the sweet spot (0.705, dotted), the impulse extreme (0.0), and two target extensions (default -0.27 and -0.62).
Entry zone gradient: The zone between 0.618 and 0.79 renders as four stacked slices whose opacity increases toward the 0.705 sweet spot, giving an immediate visual read of where the highest-probability fill sits.
Fair value gap engine: Three-candle imbalances that clear a minimum size threshold (measured against average true range) are boxed on the chart. By default only gaps forming inside an active Silver Bullet window are drawn, and every gap grays out automatically once price mitigates it, keeping the chart clean.
Liquidity sweep detection: When the anchor pivot of a new leg trades through the pivot before it — sell-side liquidity taken before a bullish leg, or buy-side liquidity taken before a bearish leg — the setup is flagged as a sweep and grades higher.
Trade plan projection: When price taps the entry zone and passes the active filters, the script prints a graded signal marker plus Entry, Stop (beyond the leg origin with an average-true-range buffer), Target One, and Target Two, each labeled with its exact price.
Dashboard: A compact panel tracks directional bias, live retracement percentage, entry zone status, sweet spot price, the active Silver Bullet window, fair value gap confluence count, and liquidity sweep status at a glance.
🔶 HOW TO USE IT
1. Apply the indicator to an intraday chart. One-minute to fifteen-minute timeframes suit the Silver Bullet windows best; the Fibonacci engine itself works on any timeframe.
2. Wait for the dashboard bias to flip after a break of structure.
3. Let price retrace. The dashboard shows the live retracement percentage as price approaches the Optimal Trade Entry zone.
4. The strongest setups tap the gradient inside an active Silver Bullet window after a liquidity sweep, with a fair value gap in the direction of the leg — that is the A+ profile.
5. Use the printed Entry, Stop, and Target levels as reference geometry, then apply your own position sizing and risk management.
6. Tighten or relax the engine with the two signal filters: Require Active Silver Bullet Window and Require Fair Value Gap Confluence.
🔶 SETTINGS
- Swing Detection Length — pivot lookback controlling structure size; higher values track larger legs.
- Completed Setups To Keep, Fair Value Gaps To Keep, Trade Plans To Keep — cap how many historical drawings remain, so the chart stays clean and the auto-scale stays anchored to current price.
- Independent toggles for each Silver Bullet window, the Fibonacci grid, the zone gradient, equilibrium, targets, and the dashboard.
- Fully customizable colors and dashboard position.
🔶 ALERTS
- Bullish Optimal Trade Entry — price tapped the bullish zone and passed the active filters.
- Bearish Optimal Trade Entry — price tapped the bearish zone and passed the active filters.
- Silver Bullet Window Opened — one of the three windows just began.
🔶 FREQUENTLY ASKED QUESTIONS
Does the indicator repaint? Entries are evaluated on closed bars only. Swing pivots require confirmation by design, which introduces intentional lag but keeps historical signals fixed.
Which markets does it work on? Any symbol with candle data — cryptocurrency, forex, gold, indices, stocks, and futures. The Silver Bullet windows reference New York time regardless of your chart timezone.
Which timeframe is best? The Silver Bullet windows require an intraday chart (sixty minutes or below). The one-minute to fifteen-minute range is the classic application; the Optimal Trade Entry engine alone also functions on higher timeframes.
What does the grade mean? It is a count of observable confluences (zone tap, window, gap, sweep) — a transparency tool, not a win-rate prediction.
🔶 LIMITATIONS
Pivot confirmation is intentionally delayed by the swing length, so the engine describes confirmed structure rather than predicting it. Retracements can exceed the zone and invalidate the leg during strong counter-moves. Grades measure confluence, not probability of profit. No indicator replaces independent analysis.
🔶 DISCLAIMER
This script is provided strictly for educational and informational purposes. It is not financial advice, an investment recommendation, or a solicitation to buy or sell any financial instrument. Past behavior of any level, time window, or signal does not guarantee future results. Trading involves substantial risk. Always do your own research and manage risk independently.
====================================================
🔶 OVERVIEW
Optimal Trade Entry + Silver Bullet is an automated ICT-style Fibonacci retracement engine that combines the Optimal Trade Entry (OTE) concept with the three Silver Bullet time windows. The indicator confirms market structure through swing highs and swing lows, detects a break of structure, automatically anchors a Fibonacci grid to the impulse leg, and highlights the 61.8% to 79% retracement zone — the Optimal Trade Entry zone — as a gradient that intensifies toward the 70.5% sweet spot. Every zone tap is graded with a transparent confluence score built from time-of-day windows, fair value gaps, and liquidity sweeps.
The goal is simple: remove the two biggest sources of error in discretionary Optimal Trade Entry trading — anchoring the Fibonacci retracement to the wrong leg, and taking entries outside the hours when the model statistically performs.
🔶 WHAT IS THE OPTIMAL TRADE ENTRY ZONE?
The Optimal Trade Entry is a smart money concept describing the discount (in an uptrend) or premium (in a downtrend) portion of an impulse leg where institutional participants typically complete their entries after a trend has been confirmed. It is defined as the area between the 61.8% and 79% Fibonacci retracement of the most recent impulse, with the 70.5% level acting as the statistical sweet spot. Price retracing into this zone after a break of structure offers a defined-risk entry: the stop belongs beyond the origin of the leg, and the targets project into the extension levels beyond the impulse extreme.
🔶 WHAT ARE THE SILVER BULLET WINDOWS?
The Silver Bullet model restricts trading to three specific one-hour windows in New York time, when algorithmic price delivery is most likely to seek liquidity and fill fair value gaps:
- London Open window — 03:00 to 04:00
- New York Morning window — 10:00 to 11:00
- New York Afternoon window — 14:00 to 15:00
This indicator shades each window on intraday charts, labels the window open, and treats window activity as a scoring input: an Optimal Trade Entry tap that occurs inside an active window grades higher than one that occurs outside it.
🔶 WHY THIS SCRIPT IS ORIGINAL
1. Pivot-and-shift automatic anchoring. The Fibonacci grid is never drawn from arbitrary pivots and never requires manual anchoring. It appears only after price closes through a confirmed swing point — a genuine break of structure — and anchors to the true origin of the impulse leg.
2. Dynamic leg stretching. While the trend continues printing new highs or new lows, the grid stretches with the market in real time, so the retracement zone is always measured against the current, mathematically complete leg — not a stale one.
3. Time-based signal qualification. The Silver Bullet windows are not decorative background shading. They are wired directly into the signal engine and the grading model, which is what separates this tool from a standard Fibonacci retracement indicator.
4. Transparent confluence grading. Every signal receives a grade of A+, A, B, or C based on four observable, verifiable conditions: entry zone tap, active Silver Bullet window, directional fair value gap formed inside a window on the current leg, and a liquidity sweep at the leg origin (the anchor pivot running the stops beyond the pivot before it). Nothing is hidden, nothing is repainted, and nothing is curve-fit.
🔶 HOW IT WORKS
Market structure engine: Swing highs and swing lows are confirmed with a symmetric pivot lookback. A candle close above the last confirmed swing high shifts the engine bullish; a close below the last confirmed swing low shifts it bearish. All signals are evaluated on closed bars only, so entries do not repaint.
Fibonacci retracement grid: On each break of structure the impulse leg is measured from the anchor pivot to the running extreme. The script plots the origin (1.0), equilibrium (0.5), the entry zone borders (0.618 and 0.79), the sweet spot (0.705, dotted), the impulse extreme (0.0), and two target extensions (default -0.27 and -0.62).
Entry zone gradient: The zone between 0.618 and 0.79 renders as four stacked slices whose opacity increases toward the 0.705 sweet spot, giving an immediate visual read of where the highest-probability fill sits.
Fair value gap engine: Three-candle imbalances that clear a minimum size threshold (measured against average true range) are boxed on the chart. By default only gaps forming inside an active Silver Bullet window are drawn, and every gap grays out automatically once price mitigates it, keeping the chart clean.
Liquidity sweep detection: When the anchor pivot of a new leg trades through the pivot before it — sell-side liquidity taken before a bullish leg, or buy-side liquidity taken before a bearish leg — the setup is flagged as a sweep and grades higher.
Trade plan projection: When price taps the entry zone and passes the active filters, the script prints a graded signal marker plus Entry, Stop (beyond the leg origin with an average-true-range buffer), Target One, and Target Two, each labeled with its exact price.
Dashboard: A compact panel tracks directional bias, live retracement percentage, entry zone status, sweet spot price, the active Silver Bullet window, fair value gap confluence count, and liquidity sweep status at a glance.
🔶 HOW TO USE IT
1. Apply the indicator to an intraday chart. One-minute to fifteen-minute timeframes suit the Silver Bullet windows best; the Fibonacci engine itself works on any timeframe.
2. Wait for the dashboard bias to flip after a break of structure.
3. Let price retrace. The dashboard shows the live retracement percentage as price approaches the Optimal Trade Entry zone.
4. The strongest setups tap the gradient inside an active Silver Bullet window after a liquidity sweep, with a fair value gap in the direction of the leg — that is the A+ profile.
5. Use the printed Entry, Stop, and Target levels as reference geometry, then apply your own position sizing and risk management.
6. Tighten or relax the engine with the two signal filters: Require Active Silver Bullet Window and Require Fair Value Gap Confluence.
🔶 SETTINGS
- Swing Detection Length — pivot lookback controlling structure size; higher values track larger legs.
- Completed Setups To Keep, Fair Value Gaps To Keep, Trade Plans To Keep — cap how many historical drawings remain, so the chart stays clean and the auto-scale stays anchored to current price.
- Independent toggles for each Silver Bullet window, the Fibonacci grid, the zone gradient, equilibrium, targets, and the dashboard.
- Fully customizable colors and dashboard position.
🔶 ALERTS
- Bullish Optimal Trade Entry — price tapped the bullish zone and passed the active filters.
- Bearish Optimal Trade Entry — price tapped the bearish zone and passed the active filters.
- Silver Bullet Window Opened — one of the three windows just began.
🔶 FREQUENTLY ASKED QUESTIONS
Does the indicator repaint? Entries are evaluated on closed bars only. Swing pivots require confirmation by design, which introduces intentional lag but keeps historical signals fixed.
Which markets does it work on? Any symbol with candle data — cryptocurrency, forex, gold, indices, stocks, and futures. The Silver Bullet windows reference New York time regardless of your chart timezone.
Which timeframe is best? The Silver Bullet windows require an intraday chart (sixty minutes or below). The one-minute to fifteen-minute range is the classic application; the Optimal Trade Entry engine alone also functions on higher timeframes.
What does the grade mean? It is a count of observable confluences (zone tap, window, gap, sweep) — a transparency tool, not a win-rate prediction.
🔶 LIMITATIONS
Pivot confirmation is intentionally delayed by the swing length, so the engine describes confirmed structure rather than predicting it. Retracements can exceed the zone and invalidate the leg during strong counter-moves. Grades measure confluence, not probability of profit. No indicator replaces independent analysis.
🔶 DISCLAIMER
This script is provided strictly for educational and informational purposes. It is not financial advice, an investment recommendation, or a solicitation to buy or sell any financial instrument. Past behavior of any level, time window, or signal does not guarantee future results. Trading involves substantial risk. Always do your own research and manage risk independently.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
The institutional Edge: Indicators, Strategies & a Free Academy. quantum-algo.com
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
The institutional Edge: Indicators, Strategies & a Free Academy. quantum-algo.com
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.