OPEN-SOURCE SCRIPT
Updated ES Magic Levels

This indicator projects key SPX price levels onto the ES or MES futures chart, automatically calculating the real-time basis offset between SPX and ES so that every level is drawn at the exact corresponding ES price.
Levels included:
Each level is drawn as a horizontal line extending to the left with a label showing the original SPX value it corresponds to. Colors are fully customizable per level type. A small table in the bottom-right corner displays the current ES−SPX basis in real time.
How to use:
Apply to any ES or MES chart on any timeframe. All levels update automatically at each tick. The dynamic offset ensures that even during roll periods the levels remain accurate.
Levels included:
- Round numbers every 50 points (100pt levels are thicker and more prominent)
- Previous Day High / Low
- Previous Week High / Low
- Previous Month High / Low
- Previous Year High / Low
Each level is drawn as a horizontal line extending to the left with a label showing the original SPX value it corresponds to. Colors are fully customizable per level type. A small table in the bottom-right corner displays the current ES−SPX basis in real time.
How to use:
Apply to any ES or MES chart on any timeframe. All levels update automatically at each tick. The dynamic offset ensures that even during roll periods the levels remain accurate.
Release Notes
This indicator projects key SPX price levels onto the ES or MES futures chart, automatically calculating the real-time basis offset between SPX and ES so that every level is drawn at the exact corresponding ES price.Levels included:
- Round numbers every 50 points (100pt levels are thicker and more prominent)
- Previous Day High / Low
- Previous Week High / Low
- Previous Month High / Low
- Previous Year High / Low
Each level is drawn as a horizontal line extending to the left with a label showing the original SPX value it corresponds to. Colors are fully customizable per level type. A small table in the bottom-right corner displays the current ES−SPX basis in real time.
How to use:
Apply to any ES or MES chart on any timeframe. All levels update automatically at each tick. The dynamic offset ensures that even during roll periods the levels remain accurate.
Release Notes
- minor fixRelease Notes
+ minor fixRelease Notes
+ chart updateRelease Notes
+ Fix non RH timeRelease Notes
+ add PDO e PDCRelease Notes
+ fix out RH Release Notes
+ out rth fixRelease Notes
ML MH e WL WH addedRelease Notes
+ multiple fixRelease Notes
+ update graphRelease Notes
- fix rolling contractOpen-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.