OPEN-SOURCE SCRIPT
Global Liquidity – Impulse (ROC & Z-score) [GMI-style]

What it is:
Liquidity is a faucet. When central banks add money, the faucet opens (risk-on). When they pull money out, it closes (risk-off). This indicator builds a global net-liquidity proxy and shows its impulse:
- ROC (green/red histogram): % change vs N weeks ago.
- Z-score (cyan line): how unusually strong the latest weekly move is.
Why it matters:
Liquidity impulse often leads risk assets (equities/crypto) by weeks to a few months.
- Green bars > 0 + positive Z → friendlier risk-on backdrop.
- Red bars < 0 + negative Z → tightening conditions; caution.
Data used (TV Economics / FRED):
USA (FRED, millions USD):
- FRED:WALCL (Fed assets)
- FRED:RRPONTSYD (Reverse Repo – subtract)
- FRED:WTREGEN (Treasury General Account – subtract)
Other CBs (Economics, units vary):
- ECONOMICS:EUCBBS (ECB)
- ECONOMICS:JPCBBS (BoJ)
- ECONOMICS:CNCBBS (PBoC)
Optional:
- ECONOMICS:GBCBBS (BoE, UK)
- ECONOMICS:CACBBS (BoC, Canada)
- ECONOMICS:CHCBBS (SNB, Switzerland)
- ECONOMICS:AUCBBS (RBA, Australia)
Proxy (scaled to billions):
(Fed − RRP − TGA) + ECB + BoJ + PBoC + [optional BoE/BoC/SNB/RBA]
How to read:
- Green bars above 0 = faucet opening → money in → risk-on.
- Red bars below 0 = faucet closing → money out → risk-off.
- Taller bar = stronger push.
- Cyan Z > +1 = unusually strong positive impulse; Z < −1 = unusually strong negative impulse.
- Background: green when ROC>0 & Z>0, red when ROC<0 & Z<0.
Quick reading guide (TL;DR):
- Early risk-on: ROC crosses > 0 and Z > 0 (ideally Z ≥ +1).
- Early risk-off: ROC crosses < 0 and Z < 0 (ideally Z ≤ −1).
- Use weekly timeframe; price often reacts with a 0–12 week lag.
- Combine with PMIs/New Orders, real yields (down), and credit spreads (narrowing).
Notes:
Symbols may differ by provider; leave optional banks OFF if missing. Currencies/units differ across CBs; this is a pragmatic proxy, not a perfect macro model. Educational use only; not financial advice.
Liquidity is a faucet. When central banks add money, the faucet opens (risk-on). When they pull money out, it closes (risk-off). This indicator builds a global net-liquidity proxy and shows its impulse:
- ROC (green/red histogram): % change vs N weeks ago.
- Z-score (cyan line): how unusually strong the latest weekly move is.
Why it matters:
Liquidity impulse often leads risk assets (equities/crypto) by weeks to a few months.
- Green bars > 0 + positive Z → friendlier risk-on backdrop.
- Red bars < 0 + negative Z → tightening conditions; caution.
Data used (TV Economics / FRED):
USA (FRED, millions USD):
- FRED:WALCL (Fed assets)
- FRED:RRPONTSYD (Reverse Repo – subtract)
- FRED:WTREGEN (Treasury General Account – subtract)
Other CBs (Economics, units vary):
- ECONOMICS:EUCBBS (ECB)
- ECONOMICS:JPCBBS (BoJ)
- ECONOMICS:CNCBBS (PBoC)
Optional:
- ECONOMICS:GBCBBS (BoE, UK)
- ECONOMICS:CACBBS (BoC, Canada)
- ECONOMICS:CHCBBS (SNB, Switzerland)
- ECONOMICS:AUCBBS (RBA, Australia)
Proxy (scaled to billions):
(Fed − RRP − TGA) + ECB + BoJ + PBoC + [optional BoE/BoC/SNB/RBA]
How to read:
- Green bars above 0 = faucet opening → money in → risk-on.
- Red bars below 0 = faucet closing → money out → risk-off.
- Taller bar = stronger push.
- Cyan Z > +1 = unusually strong positive impulse; Z < −1 = unusually strong negative impulse.
- Background: green when ROC>0 & Z>0, red when ROC<0 & Z<0.
Quick reading guide (TL;DR):
- Early risk-on: ROC crosses > 0 and Z > 0 (ideally Z ≥ +1).
- Early risk-off: ROC crosses < 0 and Z < 0 (ideally Z ≤ −1).
- Use weekly timeframe; price often reacts with a 0–12 week lag.
- Combine with PMIs/New Orders, real yields (down), and credit spreads (narrowing).
Notes:
Symbols may differ by provider; leave optional banks OFF if missing. Currencies/units differ across CBs; this is a pragmatic proxy, not a perfect macro model. Educational use only; not financial advice.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội Quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội Quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.