OPEN-SOURCE SCRIPT

Liquidity Squeeze Indicator 1

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.
forecasting

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明