OPEN-SOURCE SCRIPT
3 day look back

This script is designed to help traders visually compare daily liquidity behavior between two correlated assets — for example, the Nasdaq (NQ) and the S&P500 (ES).
It plots each day’s High and Low, aligned from Midnight to Midnight, with a clean session structure. This makes it easier to identify:
SMT (Smart Money Technique) divergences
liquidity grabs
daily highs/lows sweeps
relative strength/weakness between assets
intraday bias shifts based on daily structure
What the script does
Reconstructs each trading day from 00:00 to 00:00, regardless of session irregularities.
Plots the High and Low of every completed day.
Allows users to display as many past days as they want (custom “look-back” parameter).
Automatically merges the weekend with Friday for assets where Saturday/Sunday sessions are fragmented.
Includes a manual midnight offset (–12h to +12h) to fix timezone inconsistencies on TradingView charts (common on futures).
Optional real-time lines for the current day.
No excessive right-side extensions for clean intraday reading.
Why this is useful
When comparing paired assets (e.g., NQ vs ES), liquidity behavior is often different.
This script makes it easy to spot:
when one asset makes a new daily high while the other doesn’t
asymmetrical liquidity sweeps
SMT-based divergence setups
liquidity grabs at daily levels
intraday directional bias shifts
About the other indicators shown on the chart
In the example chart, two additional indicators are used only for clarity and structure:
Day of the Week — displays the weekday on each session for easier orientation.
Vertical Line Timeline — draws a clean separator line between days.
These indicators are not required for this High/Low script to work.
They simply help visually organize sessions and make daily structure easier to read when comparing two assets side by side.
How to use
Open two assets (e.g., NQ1! and ES1!) side by side.
Apply this script on both charts.
Set the same timeframe.
Choose how many days back you want to visualize (look-back parameter).
Observe how each asset interacts with its daily High/Low.
Look for SMT divergences and liquidity-based setups.
Main features
Midnight-to-Midnight alignment
Weekend fusion
Manual offset for perfect timing
Adjustable daily look-back
Clean daily liquidity
Optional dynamic daily levels
Ideal for SMT/liquidity-based intraday trading
It plots each day’s High and Low, aligned from Midnight to Midnight, with a clean session structure. This makes it easier to identify:
SMT (Smart Money Technique) divergences
liquidity grabs
daily highs/lows sweeps
relative strength/weakness between assets
intraday bias shifts based on daily structure
What the script does
Reconstructs each trading day from 00:00 to 00:00, regardless of session irregularities.
Plots the High and Low of every completed day.
Allows users to display as many past days as they want (custom “look-back” parameter).
Automatically merges the weekend with Friday for assets where Saturday/Sunday sessions are fragmented.
Includes a manual midnight offset (–12h to +12h) to fix timezone inconsistencies on TradingView charts (common on futures).
Optional real-time lines for the current day.
No excessive right-side extensions for clean intraday reading.
Why this is useful
When comparing paired assets (e.g., NQ vs ES), liquidity behavior is often different.
This script makes it easy to spot:
when one asset makes a new daily high while the other doesn’t
asymmetrical liquidity sweeps
SMT-based divergence setups
liquidity grabs at daily levels
intraday directional bias shifts
About the other indicators shown on the chart
In the example chart, two additional indicators are used only for clarity and structure:
Day of the Week — displays the weekday on each session for easier orientation.
Vertical Line Timeline — draws a clean separator line between days.
These indicators are not required for this High/Low script to work.
They simply help visually organize sessions and make daily structure easier to read when comparing two assets side by side.
How to use
Open two assets (e.g., NQ1! and ES1!) side by side.
Apply this script on both charts.
Set the same timeframe.
Choose how many days back you want to visualize (look-back parameter).
Observe how each asset interacts with its daily High/Low.
Look for SMT divergences and liquidity-based setups.
Main features
Midnight-to-Midnight alignment
Weekend fusion
Manual offset for perfect timing
Adjustable daily look-back
Clean daily liquidity
Optional dynamic daily levels
Ideal for SMT/liquidity-based intraday trading
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。