Fed Liquidity
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Forklift5909

//@version=5
indicator("Fed Liquidity")
BalanceSheet = request.security("FRED:WALCL", "W", close)
RRP = request.security("FRED:RRPONTSYD", "W", close) 
TGA = request.security("FRED:WTREGEN", "W", close) 

Liquidity = (BalanceSheet)-(TGA + RRP)


plot(Liquidity + RRP + TGA, color=color.red, offset=2, style=plot.style_columns)
plot(Liquidity + RRP, color=color.yellow, offset=2, style=plot.style_columns)
plot(Liquidity, color=color.green, offset=2, style=plot.style_columns)
plot(BalanceSheet, color=color.purple, offset=2, linewidth=3)