The Silver Bullet is an ICT setup for one hour of the trading day: price first runs the stops beyond a recent swing, then turns and leaves a fair value gap, and the trade is taken when price comes back into that gap. This template builds it from the market structure group of the indicator catalogue, each rule an element a strategy reads with ctx.ind:
killzones is the window. One kill zone on the New York clock is traded; the default, the London close from 10:00 to 12:00, holds ICT's AM Silver Bullet hour, 10:00 to 11:00.
liquidity_sweep is the setup. A wick below a swing low that closes back above it takes the sell side liquidity and makes the window bullish; a sweep of a swing high makes it bearish.
fvg is the trigger. The first fair value gap in the direction of the bias, formed after the sweep, gets a buy limit at its top (a sell limit at the bottom of a bearish gap).
liquidity is the target when targetR is 0: the nearest swing high no price has traded above yet, for a long.
The stop sits a buffer beyond the most extreme price since the sweep. At most one order per window; an order still unfilled when the window ends is cancelled, and a position runs to its stop or target.
The same rules in a strategy of your own read the same streams:
This template has not been measured on market data and makes no claim about results.
Parameters
Name
Type
Default
Range or options
Description
killzone
int
3
min 0, max 3
The kill zone traded: 0 Asia (20:00 to 24:00), 1 London open (02:00 to 05:00), 2 New York open (07:00 to 10:00), 3 London close (10:00 to 12:00), all New York time.
swingBars
int
3
min 1, max 20
Bars on each side of a swing for the sweep and the liquidity target; a swing counts this many bars after its extreme.
minGapAtr
float
0.25
min 0, max 5
The smallest fair value gap that triggers, in multiples of the ATR.
stopBufferPips
float
1
min 0, max 100
Pips beyond the most extreme price since the sweep where the stop sits.
targetR
float
2
min 0, max 10
The target as a multiple of the stop distance; 0 aims at the nearest untaken liquidity instead.
riskPercent
float
1
min 0, max 10
Per cent of the balance lost if the stop is hit. 0 trades the run's lot size.
allowShort
int
1
min 0, max 1
1 trades both directions, 0 long only.
Use it in a strategy
python# The trigger in your own strategy: after a sell side sweep in the window,
# a bullish gap gets a buy limit at its top.
k = ctx.ind("killzones")
sweep = ctx.ind("liquidity_sweep", length=3)
gap = ctx.ind("fvg", min_size=0.25)
if k.london_close == 1 and sweep.down == 1:
self.bias = 1
elif k.london_close == 1 and getattr(self, "bias", 0) == 1 and gap.bull_new == 1:
bars = ctx.bars(3)
ctx.order("LONG", limit=bars[-1].low, sl_pips=20, tp_pips=40)
self.bias = 0
To run the whole template, install it, switch it on and pick Silver Bullet under Plugins in the strategy list. Run it on M1, M5 or M15 bars of a market that trades in New York hours.
What it provides
silver_bullet/silver_bulletStrategy
The strategy, with its parameters: the kill zone, the swing bars, the smallest gap, the stop buffer, the target, the risk per trade and the short side.
When values are known
Every element is known at the close of its bar: a sweep needs its swing confirmed swingBars bars after the extreme, a gap shows on its third candle. The order rests from the next bar on, so no decision uses a later bar.
Limits
A template to start from, not a tested edge: it has not been measured on market data, so no result is promised. Backtest it on your markets before you trust it.
The kill zones of the catalogue are wider than ICT's one hour windows; for the 10:00 to 11:00 hour alone, change the window test in the code.
A limit order fills only when price returns into the gap; on a fast day it never does and the window passes without a trade.
Bank holidays and news are not known to the template. Spreads widen around the New York open.