This script visualizes the difference or "Basis", via %, in price between the SPX and The CME ES Mini Futures.
Understandably, if the ES is significant higher than it underlying index, correlated assets (like crypto) may be prone to revert to the downside, and vice versa if the ES is significantly under the SPX.
This indicator is to be taken in confluence with other factors and shouldn't be used on its own.
I've also included a resolution setting that will change the referenced candles of the SPX/ES. The default setting will have the time frame adjust with the observed resolution.