OPEN-SOURCE SCRIPT
已更新

Altcoin Liquidity Flow Score - Big Moves Only

40
//version=6
indicator("Altcoin Liquidity Flow Score - Big Moves Only", overlay=false)

// Pull weekly macro data
walcl = request.security("FRED:WALCL", "W", close)
rrp = request.security("FRED:RRPONTSYD", "W", close)
tga = request.security("FRED:WDTGAL", "W", close)
hyg = request.security("AMEX:HYG", "W", close)
total3 = request.security("CRYPTOCAP:TOTAL3", "W", close)
usdt_d = request.security("CRYPTOCAP:USDT.D", "W", close)

// Calculate week-over-week change
delta_liquidity = ta.change(walcl + rrp - tga)
delta_rrp = ta.change(rrp)
delta_hyg = ta.change(hyg)
delta_total3 = ta.change(total3)
delta_usdt_d = ta.change(usdt_d)

// Compute raw score
raw_score = delta_liquidity - delta_rrp + delta_hyg + delta_total3 - delta_usdt_d

// Apply 3-week smoothing
score = ta.ema(raw_score, 3)

// Define threshold for major liquidity shift
threshold = 2.0

// Plot score + background for only strong signals
plot(score, title="Liquidity Flow Score (Smoothed)", color=color.teal, linewidth=2)
hline(0, "Zero Line", color=color.gray)

bgcolor(score > threshold ? color.new(color.green, 85) : score < -threshold ? color.new(color.red, 85) : na)
發行說明
more changes

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。