OPEN-SOURCE SCRIPT
USD Liquidity / FX Swap + Money Market Stress

This indicator shows, in a simple way, how tight or loose USD liquidity is. It combines two things: signs of stress in the FX market (Fed swap lines + dollar strength) and signs from the money market (the difference between repo rates like SOFR/TGCR and the Fed’s IORB rate). All of this is merged into a single blue line: when it rises, liquidity tends to be more abundant; when it falls, there is more stress and the dollar becomes “expensive” to obtain.
You read it like a traffic light:
If the background is red, the indicator is below the lower threshold → liquidity stress, an environment that is more prone to sell-offs and violent moves in risk assets (including crypto).
If the background is green, the indicator is above the upper threshold → more relaxed liquidity, a backdrop that is more favorable for risk rallies to be sustained.
No background color → neutral zone, neither very good nor very bad: you trade according to your usual system.
It is designed as a macro context filter, not as a buy/sell signal. In red, it makes sense to be more defensive with risk and leverage; in green, if your technical system gives a long signal, you have a somewhat more favorable tailwind. It should always be used together with other tools and strict risk management.
You read it like a traffic light:
If the background is red, the indicator is below the lower threshold → liquidity stress, an environment that is more prone to sell-offs and violent moves in risk assets (including crypto).
If the background is green, the indicator is above the upper threshold → more relaxed liquidity, a backdrop that is more favorable for risk rallies to be sustained.
No background color → neutral zone, neither very good nor very bad: you trade according to your usual system.
It is designed as a macro context filter, not as a buy/sell signal. In red, it makes sense to be more defensive with risk and leverage; in green, if your technical system gives a long signal, you have a somewhat more favorable tailwind. It should always be used together with other tools and strict risk management.
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.