OPEN-SOURCE SCRIPT

Liquidity Squeeze Indicator 1

1 352
The provided Pine Script code implements a "Liquidity Squeeze Indicator" in TradingView, designed to detect potential bullish or bearish market squeezes based on EMA slopes, candle wicks, and body sizes.

Code Breakdown
EMAs Calculation: Calculates the 21-period (ema_21) and 50-period (ema_50) exponential moving averages (EMAs) on closing prices.

EMA Slope Calculation: Computes the slope of the 21-period EMA over a 21-period lookback to estimate trend direction, with a threshold of 0.45 to approximate a 45-degree angle.

Candle Properties: Measures the size of the candle's body and its upper and lower wicks for comparison to detect wick-to-body ratios.

Trend Identification: Defines a bullish trend when ema_21 is above ema_50 and a bearish trend when ema_21 is below ema_50.

Wick Conditions
Bullish Condition: In a bullish trend with the EMA slope up, checks if the upper wick is at least 3x the body size and the closing price is above the 21 EMA.

Bearish Condition: In a bearish trend with the EMA slope down, checks if the lower wick is at least 3x the body size and the closing price is below the 21 EMA.

Signal Plotting: Plots a green dot above the bar for bullish signals and a red dot below the bar for bearish signals.

Alerts: Defines alert conditions for both bullish and bearish signals, providing specific alert messages when conditions are met.

Summary
This indicator helps identify potential bullish or bearish liquidity squeezes by looking at trends, EMA slopes, and wick-to-body ratios in candlesticks. The primary signals are visualized through dots on the chart and can trigger alerts for notable market conditions.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.