TradingView
johnnyszerdi
19 Th12 2023 16:58

Central Bank Liquidity YOY % Change 

WALCL-WTREGEN-RRPONTSYDFRED

Mô tả

This shows the percent change from a year ago (YOY%) in Central Bank Liquidity

It's important to the study rate of change data in this liquidity metric and compare it to the nominal chart.

When this chart is accelerating, liquidity is being added, meaning it's a good time to be in assets.

When this chart is declining, liquidity is being removed, meaning it's a good time to be in cash.

Bottoms in markets coincide with the rate of change of liquidity going from negative (below the zero line) to positive (above zero)

Central Bank Liquidity = Total value of the assets of all Federal Reserve Banks - Overnight Reverse Repurchase Agreements (RRP) - The Treasury General Account (TGA)

Phát hành các Ghi chú

This shows the percent change from a year ago (YOY%) in Central Bank Liquidity

It's important to the study rate of change data in this liquidity metric and compare it to the nominal chart.

When this chart is accelerating, liquidity is being added, meaning it's a good time to be in assets.

When this chart is declining, liquidity is being removed, meaning it's a good time to be in cash.

Bottoms in markets coincide with the rate of change of liquidity going from negative (below the zero line) to positive (above zero).

Central Bank Liquidity = Total value of the assets of all Federal Reserve Banks - Overnight Reverse Repurchase Agreements (RRP) - The Treasury General Account (TGA).
Bình luận
Ronan67
HOw do I separate it from the main chart?
johnnyszerdi
@Ronan67 1) Hover cursor over indicator in the top right corner of the price chart, 2) Click on the "More" option which is the three dots that's located on the far right, 3) Click on "Move To" and then "New pane below". Hope that helps. When I published the scripted, I accidentally excluded the feature to automatically open it in a new pane.
M0_BTC
Edit version 2. Not to be used as is. Adjust the settings to your own needs. To be clear I only added visual features.
//@version=5 indicator("Central Bank Liquidity YOY % Change", overlay=false) cblSymbol = "FRED:WALCL-FRED:WTREGEN-FRED:RRPONTSYD" cblTimeframe = "D" barsToGoBack = 252 cblOneYearAgo = request.security(cblSymbol, cblTimeframe, close[barsToGoBack], gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_on) cblData = request.security("FRED:WALCL-FRED:WTREGEN-FRED:RRPONTSYD", "D", close) cblYOY = (((cblData - cblOneYearAgo) / cblOneYearAgo) * 100) white = color.rgb(237, 237, 237) smalen = input(50, "SMA Length") smalen2 = input(50, "SMA Length 2") sma = ta.sma(cblYOY, smalen) sma2 = ta.sma(cblYOY, smalen2) sma14 = ta.sma(cblYOY, 14) upperBB = sma14 + 2.0 * ta.stdev(cblYOY, 20) lowerBB = sma14 - 2.0 * ta.stdev(cblYOY, 20) plotcolor = cblYOY > 0 ? color.rgb(23, 161, 28) : color.rgb(204, 50, 50) mainplot = plot(cblYOY, title="Central Bank Liquidity YOY % Change", color=plotcolor, linewidth=1) mainplot2 = plot(cblYOY, title="Central Bank Liquidity YOY % Change", color=color.black, linewidth=1) smaplot = plot(sma, title="SMA", color=color.rgb(33, 128, 243), linewidth=1) plot(sma2, title="SMA 2", color=color.rgb(33, 128, 243), linewidth=1) plot(upperBB, title="Upper BB", color=color.rgb(33, 149, 243, 50)) plot(lowerBB, title="Lower BB", color=color.rgb(33, 149, 243, 50)) zeroline = hline(0, title="Zero", color=color.rgb(0, 0, 0, 65), linestyle=hline.style_solid, linewidth = 2) changeD = cblYOY[0] - cblYOY[1] bgcolor(cblYOY > 0 ? color.rgb(76, 175, 79, 80) : color.rgb(255, 82, 82, 80), na, na, na, "Above zeroline?") smacond = (cblYOY >= sma) bgcolor(smacond ? color.rgb(76, 175, 79, 80) : color.rgb(255, 82, 82, 80), na, na, na, "Above SMA?") bgcolor(changeD > 0 ? color.rgb(76, 175, 79, 80) : color.rgb(255, 82, 82, 80), na, na, na, "Daily change color coded") bgcolor(changeD == 0 ? white : na, na, na, na, "Daily change == 0") fill(mainplot, smaplot, 30, 0, white, white)
M0_BTC
I added some features for my own use, thought I'd share:
//@version=5 indicator("Central Bank Liquidity YOY % Change", overlay=false) cblSymbol = "FRED:WALCL-FRED:WTREGEN-FRED:RRPONTSYD" cblTimeframe = "D" barsToGoBack = 252 cblOneYearAgo = request.security(cblSymbol, cblTimeframe, close[barsToGoBack], gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_on) cblData = request.security("FRED:WALCL-FRED:WTREGEN-FRED:RRPONTSYD", "D", close) cblYOY = (((cblData - cblOneYearAgo) / cblOneYearAgo) * 100) white = color.rgb(237, 237, 237) sma = ta.sma(cblYOY, 50) sma14 = ta.sma(cblYOY, 14) upperBB = sma14 + 2.0 * ta.stdev(cblYOY, 20) lowerBB = sma14 - 2.0 * ta.stdev(cblYOY, 20) plotcolor = cblYOY > 0 ? color.rgb(23, 161, 28) : color.rgb(204, 50, 50) mainplot = plot(cblYOY, title="Central Bank Liquidity YOY % Change", color=plotcolor, linewidth=1) smaplot = plot(sma, title="SMA", color=color.rgb(0, 0, 0, 40), linewidth=1) plot(upperBB, title="Upper BB", color=color.rgb(33, 149, 243, 50)) plot(lowerBB, title="Lower BB", color=color.rgb(33, 149, 243, 50)) zeroline = hline(0, title="Zero", color=color.gray, linestyle=hline.style_solid, linewidth = 1) changeD = cblYOY[0] - cblYOY[1] bgcolor(changeD > 0 ? color.rgb(76, 175, 79, 80) : color.rgb(255, 82, 82, 80)) bgcolor(changeD == 0 ? white : na) fill(mainplot, smaplot, 30, 0, white, white)
johnnyszerdi
@M0_BTC, nice! I’m an investor not a coder so apologies for the sloppy code.
M0_BTC
@johnnyszerdi, no problem. If you need any help in the future just send me a message.
johnnyszerdi
@M0_BTC, I appreciate that.
M0_BTC
Why there's a "overlay=true" on the source code but on the picture it seems to not be overlay mode?
johnnyszerdi
@M0_BTC, I’ll probably redo this indicator.
Thêm nữa