The Fed Net Liquidity indicator is a concept discovered by Max Anderson to calculate the fair value of SPX (S&P 500 Index).
The formula he shared on Twitter uses the Fed Balance Sheet, TGA (Treasury General Account), and Reverse Repo. Net Liquidity = Fed Balance Sheet - (TGA + Reverse Repo)
The data for each component above is accessible on the FRED website.
This script uses net liquidity (NL) fair value calculation for SPX, then estimates entry and next target exit target for both long and short trades on SPY. The script added RSI oversold/overbought signal to the original NL signal from Max... improving the "precision" of the buy/sell signals.
The script also uses RSI to estimate targets based on how overbought or oversold the index/SPY is.