OPEN-SOURCE SCRIPT
1 HR Fair Value Gap

It draws 1-hour fair value gaps on your chart, no matter what timeframe you're looking at.
A fair value gap is a 3-candle imbalance: price moves so fast that the first and third candles don't overlap, leaving a gap. The code checks confirmed 1-hour candles and finds two kinds — bullish (gap up, `h3 < l1`) and bearish (gap down, `l3 > h1`).
When it finds one, it does two things: draws a colored box marking the gap, and draws a line at the 50% midpoint of that gap extended 24 hours to the right. The midline is the part you actually trade off of — where price is likely to return and react.
The `bars24h` piece just makes "24 hours" translate correctly to any chart, since 24 hours is 288 bars on a 5-minute chart but only 24 bars on a 1-hour chart. And the age-out at the bottom stops tracking each midline once it's 24 hours old, so old levels drop off.
That's the whole thing — pure levels, no signals, no bias, no alerts.
A fair value gap is a 3-candle imbalance: price moves so fast that the first and third candles don't overlap, leaving a gap. The code checks confirmed 1-hour candles and finds two kinds — bullish (gap up, `h3 < l1`) and bearish (gap down, `l3 > h1`).
When it finds one, it does two things: draws a colored box marking the gap, and draws a line at the 50% midpoint of that gap extended 24 hours to the right. The midline is the part you actually trade off of — where price is likely to return and react.
The `bars24h` piece just makes "24 hours" translate correctly to any chart, since 24 hours is 288 bars on a 5-minute chart but only 24 bars on a 1-hour chart. And the age-out at the bottom stops tracking each midline once it's 24 hours old, so old levels drop off.
That's the whole thing — pure levels, no signals, no bias, no alerts.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.