OPEN-SOURCE SCRIPT

Liquidity Strain Detector [MarkitTick]

530
đź’ˇ This indicator provides a specialized method for detecting market anomalies where price movement becomes disconnected from typical volume profiles, signaling potential exhaustion events. By combining statistical analysis of liquidity (price impact) with a directional trend filter, the tool aims to highlight moments of extreme market stress, such as panic selling or euphoric buying, that often precede mean reversions or trend pauses.

â—Ź Originality and Utility
Standard volume indicators often look at raw volume levels, which can be misleading during different times of the day or across different assets. This script calculates the efficiency of moving price (Illiquidity) and normalizes it statistically. This allows the trader to see when the market is becoming thin or stressed relative to recent history. It is particularly useful for contrarian traders looking for capitulation points within established trends, offering a unique perspective beyond standard RSI or MACD divergence.

â—Ź Methodology
The core mechanism drives a custom Liquidity Engine that performs the following steps:

  1. Price Impact Calculation: It computes the ratio of the True Range to Volume. High values indicate that price is moving significant distances on relatively low volume or that volatility is extreme relative to participation.
  2. Normalization: The raw impact data is smoothed using a logarithmic scale to handle the wide variance in volume data.
  3. Statistical Scoring (Z-Score): The script calculates the Z-Score of this normalized data over a user-defined lookback period. This determines how many standard deviations the current liquidity stress is away from the mean.
  4. Trend Filtering: A standard Exponential Moving Average (EMA) determines the dominant market direction to contextualize the stress signal.


â—Ź How to Use
The indicator plots labels on the chart when specific High Stress conditions are met during a trend:

  • SE (Seller Exhaustion - Green Label): Appears when the market is in a downtrend (price below EMA), the current candle is bearish, and the liquidity stress Z-Score breaches the upper threshold. This suggests panic selling or a liquidity gap down, often marking a temporary bottom or reversal point.
  • BE (Buyer Exhaustion - Red Label): Appears when the market is in an uptrend (price above EMA), the current candle is bullish, and the liquidity stress Z-Score breaches the upper threshold. This suggests a melt-up or buying climax into thin liquidity, often preceding a pullback.


â—Ź Inputs
  • Trend Filter Length: The period for the EMA used to determine the baseline trend direction.
  • Statistical Lookback: The number of bars used to calculate the mean and standard deviation for the Z-Score.
  • Stress Threshold (Sigma): The Z-Score value required to trigger a high-stress signal. Higher values result in fewer, more extreme signals.


â—Ź Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion.

Declinazione di responsabilitĂ 

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.