OPEN-SOURCE SCRIPT
FVG Pilot

What it does
Automatically detects and draws Fair Value Gaps (FVGs) on the chart.
Removes an FVG as soon as it’s invalidated (bullish FVG invalid if price closes below its lower bound; bearish FVG invalid if price closes above its upper bound).
Triggers alerts only during Silver Bullet (SB) sessions in Europe/Berlin time when a new FVG is created.
Optionally draws two thin vertical lines at the start and end of each SB session so you can see the windows at a glance.
Runs on confirmed bars to avoid repainting.
How FVGs are detected
Wick mode (default):
Bullish FVG when low > high[2] → gap [high[2], low]
Bearish FVG when high < low[2] → gap [high, low[2]]
Body mode (optional): uses candle bodies instead of wicks:
Bullish FVG when current body low > prior body high
Bearish FVG when current body high < prior body low
Silver Bullet sessions (Europe/Berlin)
Three configurable session windows (default examples):
SB1: 10:00–11:00
SB2: 02:00–03:00
SB3: 07:00–08:00
Alerts for new FVGs fire only inside these windows.
Session lines: a thin vertical line is drawn on the first bar inside a session (start) and on the first bar after a session (end).
Inputs
Show Bullish / Bearish FVGs
Use Bodies (instead of wicks)
Minimum FVG size (in ticks)
Box opacity
SB sessions: enable/disable each window and set times (Europe/Berlin)
Session line toggle + color/width
Alerts included
SB (Berlin): Bullish FVG created – fires only during SB sessions
SB (Berlin): Bearish FVG created – fires only during SB sessions
Bullish FVG invalidated – fires when a bullish FVG is invalidated (no time filter)
Bearish FVG invalidated – fires when a bearish FVG is invalidated (no time filter)
How to set alerts (TradingView)
Click Create Alert.
Condition: choose this indicator, then pick one of the alert conditions above.
Select your alert options (once per bar close is recommended), then Create.
Tips
If you don’t see boxes, reduce Minimum FVG size or lower opacity (e.g., 70–85).
Body mode is stricter; start with wicks if you want more signals.
SB windows use Europe/Berlin and automatically account for DST.
The script respects platform limits for drawings; if your chart is cluttered, zoom in or reduce active sessions.
Automatically detects and draws Fair Value Gaps (FVGs) on the chart.
Removes an FVG as soon as it’s invalidated (bullish FVG invalid if price closes below its lower bound; bearish FVG invalid if price closes above its upper bound).
Triggers alerts only during Silver Bullet (SB) sessions in Europe/Berlin time when a new FVG is created.
Optionally draws two thin vertical lines at the start and end of each SB session so you can see the windows at a glance.
Runs on confirmed bars to avoid repainting.
How FVGs are detected
Wick mode (default):
Bullish FVG when low > high[2] → gap [high[2], low]
Bearish FVG when high < low[2] → gap [high, low[2]]
Body mode (optional): uses candle bodies instead of wicks:
Bullish FVG when current body low > prior body high
Bearish FVG when current body high < prior body low
Silver Bullet sessions (Europe/Berlin)
Three configurable session windows (default examples):
SB1: 10:00–11:00
SB2: 02:00–03:00
SB3: 07:00–08:00
Alerts for new FVGs fire only inside these windows.
Session lines: a thin vertical line is drawn on the first bar inside a session (start) and on the first bar after a session (end).
Inputs
Show Bullish / Bearish FVGs
Use Bodies (instead of wicks)
Minimum FVG size (in ticks)
Box opacity
SB sessions: enable/disable each window and set times (Europe/Berlin)
Session line toggle + color/width
Alerts included
SB (Berlin): Bullish FVG created – fires only during SB sessions
SB (Berlin): Bearish FVG created – fires only during SB sessions
Bullish FVG invalidated – fires when a bullish FVG is invalidated (no time filter)
Bearish FVG invalidated – fires when a bearish FVG is invalidated (no time filter)
How to set alerts (TradingView)
Click Create Alert.
Condition: choose this indicator, then pick one of the alert conditions above.
Select your alert options (once per bar close is recommended), then Create.
Tips
If you don’t see boxes, reduce Minimum FVG size or lower opacity (e.g., 70–85).
Body mode is stricter; start with wicks if you want more signals.
SB windows use Europe/Berlin and automatically account for DST.
The script respects platform limits for drawings; if your chart is cluttered, zoom in or reduce active sessions.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.