OPEN-SOURCE SCRIPT
ICT Silver Bullet & 2022 Entry Model

This script is a fully automated algorithmic scanner and trade visualizer for the ICT 2022 Mentorship Entry Model, specifically programmed to only look for setups during the Silver Bullet time windows.
Here is a breakdown of how the engine works from top to bottom:
1. Time & Sessions Engine
The script begins by shading your chart background for the three specific "Silver Bullet" execution hours (EST):
London: 03:00 - 04:00 (Silver)
New York AM: 10:00 - 11:00 (Orange)
New York PM: 14:00 - 15:00 (Teal) The script will strictly ignore any price action outside of these three windows.
2. The 5-Phase State Machine
Inside those sessions, the script runs a rigid 5-step sequence to validate the 2022 Model. It will cancel the setup if the sequence is broken.
Phase 1: Liquidity Raid (The Stop Run) The script tracks historical Swing Highs (Buy-Side Liquidity) and Swing Lows (Sell-Side Liquidity). If price sweeps one of these levels, it prints a "BSL Raid" or "SSL Raid" label. Crucially, it nullifies that specific liquidity level immediately after it's swept so you don't get duplicate labels on every single candle.
Phase 2: Market Structure Shift (ChoCh) Upon sweeping liquidity, the script identifies the exact minor swing point that formed just prior to the sweep. It waits for price to aggressively reverse and close past that level. When it does, it plots a line and a "ChoCh" (Change of Character / MSS) label.
Phase 3: Displacement FVG Detection The leg that breaks structure must show institutional displacement. The script scans the exact 3-5 candles that broke the ChoCh level to find a Fair Value Gap (SIBI for shorts, BISI for longs). If it finds one, it draws the gap box on your chart.
Phase 4: Trade Execution The script waits for price to retrace and tap the open boundary of the FVG. The moment price touches it, the script prints a "2022 SHORT ENTRY" or "2022 LONG ENTRY" label.
Phase 5: Trade Management & Visualizer (The code block you highlighted) Upon entry, the script transitions into a live trade manager:
Stop Loss (SL): It calculates an SL exactly 1 tick above the absolute peak of the Liquidity Raid. It draws a solid red line and a red risk box.
Take Profit (TP): By default, it targets the opposing major liquidity pool on the chart. If you toggle it off in settings, it defaults to a strict 1:2 Risk-to-Reward ratio. It draws a solid green line and a green reward box.
Live Tracking: The script physically extends these red and green boxes forward bar-by-bar until price hits either the SL line or the TP line. Once hit, it closes the trade, prints "SL HIT" or "TP HIT", and resets the engine to look for the next setup.
Here is a breakdown of how the engine works from top to bottom:
1. Time & Sessions Engine
The script begins by shading your chart background for the three specific "Silver Bullet" execution hours (EST):
London: 03:00 - 04:00 (Silver)
New York AM: 10:00 - 11:00 (Orange)
New York PM: 14:00 - 15:00 (Teal) The script will strictly ignore any price action outside of these three windows.
2. The 5-Phase State Machine
Inside those sessions, the script runs a rigid 5-step sequence to validate the 2022 Model. It will cancel the setup if the sequence is broken.
Phase 1: Liquidity Raid (The Stop Run) The script tracks historical Swing Highs (Buy-Side Liquidity) and Swing Lows (Sell-Side Liquidity). If price sweeps one of these levels, it prints a "BSL Raid" or "SSL Raid" label. Crucially, it nullifies that specific liquidity level immediately after it's swept so you don't get duplicate labels on every single candle.
Phase 2: Market Structure Shift (ChoCh) Upon sweeping liquidity, the script identifies the exact minor swing point that formed just prior to the sweep. It waits for price to aggressively reverse and close past that level. When it does, it plots a line and a "ChoCh" (Change of Character / MSS) label.
Phase 3: Displacement FVG Detection The leg that breaks structure must show institutional displacement. The script scans the exact 3-5 candles that broke the ChoCh level to find a Fair Value Gap (SIBI for shorts, BISI for longs). If it finds one, it draws the gap box on your chart.
Phase 4: Trade Execution The script waits for price to retrace and tap the open boundary of the FVG. The moment price touches it, the script prints a "2022 SHORT ENTRY" or "2022 LONG ENTRY" label.
Phase 5: Trade Management & Visualizer (The code block you highlighted) Upon entry, the script transitions into a live trade manager:
Stop Loss (SL): It calculates an SL exactly 1 tick above the absolute peak of the Liquidity Raid. It draws a solid red line and a red risk box.
Take Profit (TP): By default, it targets the opposing major liquidity pool on the chart. If you toggle it off in settings, it defaults to a strict 1:2 Risk-to-Reward ratio. It draws a solid green line and a green reward box.
Live Tracking: The script physically extends these red and green boxes forward bar-by-bar until price hits either the SL line or the TP line. Once hit, it closes the trade, prints "SL HIT" or "TP HIT", and resets the engine to look for the next setup.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.