OPEN-SOURCE SCRIPT

Harmonic Liquidity Waves [JOAT]

3 067
Harmonic Liquidity Waves [JOAT]

Overview
Harmonic Liquidity Waves is an open-source oscillator indicator that combines multiple volume-based analysis techniques into a unified liquidity flow framework. It integrates VWAP calculations, Chaikin Money Flow (CMF), Money Flow Index (MFI), and Klinger Volume Oscillator (KVO) with custom harmonic wave calculations to provide a comprehensive view of volume dynamics and money flow.

What This Indicator Does
The indicator calculates and displays:

  • Liquidity Flow - Volume-weighted price movement accumulated over a lookback period
  • Harmonic Wave - Multi-depth smoothed oscillator derived from liquidity flow
  • Chaikin Money Flow (CMF) - Classic accumulation/distribution indicator
  • Money Flow Index (MFI) - Volume-weighted RSI showing buying/selling pressure
  • Klinger Volume Oscillator (KVO) - Trend-volume relationship indicator
  • Wave Interference - Combined constructive/destructive wave patterns
  • Volume Profile POC - Point of Control from simplified volume distribution


How It Works

The core liquidity flow calculation tracks volume-weighted price changes:

Pine Script®
calculateLiquidityFlow(series float vol, series float price, simple int period) => float priceChange = ta.change(price) float volumeFlow = vol * math.sign(priceChange) // Accumulated over period using buffer array float avgFlow = flowSum / period avgFlow


The harmonic oscillator applies multi-depth smoothing:

Pine Script®
harmonicOscillator(series float flow, simple int depth, simple int period) => float harmonic = 0.0 for i = 1 to depth float wave = ta.ema(flow, period * i) / i harmonic += wave harmonic / depth


CMF measures accumulation/distribution using the Money Flow Multiplier:

Pine Script®
float mfm = ((close - low) - (high - close)) / (high - low) float mfv = mfm * vol float cmf = ta.sum(mfv, period) / ta.sum(vol, period) * 100


Signal Generation
Liquidity shift signals occur when:
  • Bullish Shift: Smoothed wave crosses above signal line
  • Bearish Shift: Smoothed wave crosses below signal line


Strong signals require volume indicator confirmation:
  • Strong Bull: Bullish shift + CMF > 0 + MFI > 50 + KVO > 0
  • Strong Bear: Bearish shift + CMF < 0 + MFI < 50 + KVO < 0


ảnh chụp nhanh

Divergence detection compares price pivots with liquidity wave pivots to identify potential reversals.

Dashboard Panel (Bottom-Right)
  • Wave Strength - Normalized wave magnitude
  • Volume Pressure - Current volume vs average percentage
  • Flow Direction - BUYING or SELLING based on wave sign
  • Histogram - Wave minus signal line value
  • CMF - Chaikin Money Flow reading
  • MFI - Money Flow Index value (0-100)
  • KVO - Klinger oscillator value
  • Vol Confluence - Combined volume indicator score
  • Signal - Current actionable status


Visual Elements
  • Liquidity Wave - Main oscillator line
  • Wave Signal - Smoothed signal line for crossover detection
  • Wave Histogram - Difference between wave and signal
  • Wave Interference - Area plot showing combined wave patterns
  • CMF/KVO/MFI Lines - Individual volume indicator plots
  • Divergence Labels - BULL DIV / BEAR DIV markers
  • Shift Markers - Triangles for basic shifts, labels for strong shifts


Input Parameters
  • Wave Period (default: 21) - Base period for liquidity calculations
  • Volume Weight (default: 1.5) - Multiplier for volume emphasis
  • Harmonic Depth (default: 3) - Number of smoothing layers
  • Smoothing (default: 3) - Final wave smoothing period


Suggested Use Cases
  • Identify accumulation/distribution phases using CMF and wave direction
  • Confirm momentum with MFI overbought/oversold readings
  • Watch for divergences between price and liquidity flow
  • Use strong signals when multiple volume indicators align


Timeframe Recommendations
Best on 15m to Daily charts. Volume-based indicators require sufficient trading activity for meaningful readings.

Limitations
  • Volume data quality varies by exchange and instrument
  • Divergence detection uses pivot-based lookback and may lag
  • Volume Profile POC is simplified and not a full profile analysis


Open-Source and Disclaimer
This script is published as open-source under the Mozilla Public License 2.0 for educational purposes. It does not constitute financial advice. Past performance does not guarantee future results. Always use proper risk management.

- Made with passion by officialjackofalltrades

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.