OPEN-SOURCE SCRIPT
ES to SPX Lead (RTH Adaptive)

Very simple script designed especially to trade CFD but also scalping.
Only RTH (you'll understand why)
Not a stand-alone indicator, e.g., an external event may hit the index and /ES leading nature will become meaningless. Same with a sudden crash on a Mag7 stock.
Uses Z Score to evaluate if /Es is leading SPX (or not) and /ES VWAP to establish bullish (+1) or bearish territory (-1). Histogram is the product of Z Score times VWAP status, red or green depending.
Z score goes from -2 to +2.
Zscore reading: 0.4 < |Z| < 1.2 is the trading zone.
|Z| <0.4 is sort of neutral shifting gears zone, a no-trade and may be transition moment.
Middle numbers show max. limits based on actual volatility (i.e. when to exit and when definitely not to enter a trade).
Grey stripes is NO TRADE zone.
Final number is the composite histogram value.
So:
Textbook bullish: /ES above VWAP and Z Score positive
Textbook negative: /ES below VWAP and Z score negative
If Green Histogram & negative Z Score, you may enter bearish pullback trades making sure Z score is in the sweet spot bracket.
If Red histogram & negative Z score, it's a conflict state, signals are not alined. Holds a bullish nature but it may be a warning sign.
Script produced by Chat GPT after several iterations.
Only RTH (you'll understand why)
Not a stand-alone indicator, e.g., an external event may hit the index and /ES leading nature will become meaningless. Same with a sudden crash on a Mag7 stock.
Uses Z Score to evaluate if /Es is leading SPX (or not) and /ES VWAP to establish bullish (+1) or bearish territory (-1). Histogram is the product of Z Score times VWAP status, red or green depending.
Z score goes from -2 to +2.
Zscore reading: 0.4 < |Z| < 1.2 is the trading zone.
|Z| <0.4 is sort of neutral shifting gears zone, a no-trade and may be transition moment.
Middle numbers show max. limits based on actual volatility (i.e. when to exit and when definitely not to enter a trade).
Grey stripes is NO TRADE zone.
Final number is the composite histogram value.
So:
Textbook bullish: /ES above VWAP and Z Score positive
Textbook negative: /ES below VWAP and Z score negative
If Green Histogram & negative Z Score, you may enter bearish pullback trades making sure Z score is in the sweet spot bracket.
If Red histogram & negative Z score, it's a conflict state, signals are not alined. Holds a bullish nature but it may be a warning sign.
Script produced by Chat GPT after several iterations.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.