Kazo_

Liquidity weighted Supertrend

Indicator Description
The Supertrend Indicator is a versatile and adaptive tool designed to help traders identify trends and potential reversal points in the market. This indicator offers two modes: Aggressive and Smoothed, allowing users to customize the trend detection according to their trading style and market conditions.

Key Features
Two Supertrend Modes:

Aggressive Mode: Provides more responsive signals for short-term trading. It uses an Exponential Moving Average (EMA) to smooth the price data.
Smoothed Mode: Offers smoother signals for longer-term trading by using a Simple Moving Average (SMA). Note that when "Smoothed" mode is selected, the "Fast MA length" input is not utilized.

LWMA Calculation:

Liquidity Weighted Moving Average (LWMA): This unique calculation integrates volume and price action to filter out market noise and identify significant price movements. The liquidity factor is calculated using volume and the absolute price change, and then smoothed with an EMA.

Customizable Parameters:

Factor: Adjusts the sensitivity of the Supertrend line to price movements.
Supertrend Length: Determines the lookback period for the Average True Range (ATR) calculation, affecting the width of the Supertrend channel.
Fast and Slow MA Lengths: Customize the lengths of the fast and slow moving averages used in the LWMA calculation.

How the Indicator Works
LWMA Smoothing:

The liquidity factor is calculated by dividing the volume by the absolute difference between the close and open prices. This liquidity value is then smoothed using an EMA and compared to its standard deviation to identify significant price movements.
Based on user selection, the price data (hl2) is smoothed using either an EMA (Aggressive Mode) or an SMA (Smoothed Mode). When "Smoothed" mode is selected, the "Fast MA length" input is irrelevant.

Supertrend Calculation:

The Supertrend lines (Up2 and Dn2) are calculated using the smoothed price data and the ATR. The Up2 line is derived by subtracting a multiple of the ATR from the smoothed price, while the Dn2 line is derived by adding a multiple of the ATR to the smoothed price.
TrendUp2 and TrendDown2 are then adjusted to ensure they only move in the direction of the current trend.
The trend direction (Trend2) is determined by comparing the current close price with the adjusted Supertrend lines. If the close is below the TrendDown2 line, the trend is considered bearish; if it is above the TrendUp2 line, the trend is considered bullish.

Visual Signals:

The Supertrend line (Tsl2) is plotted on the chart with different colors indicating bullish (lime) and bearish (red) trends.
Buy and sell signals are marked with arrows: green triangles for buy signals (when price crosses above the Supertrend line) and red triangles for sell signals (when price crosses below the Supertrend line).
Additional entry arrows indicate trend reversals.

How to Use the Indicator
Configuring the Indicator:

Supertrend Type: Choose between Aggressive and Smoothed modes based on your trading strategy and market conditions.

Factor and Length Settings: Adjust the Factor, Supertrend Length, and Moving Average lengths to fine-tune the sensitivity and responsiveness of the Supertrend line.

Interpreting the Signals:

Trend Identification: The Supertrend line provides a clear indication of the current market trend. A green line suggests a bullish trend, while a red line indicates a bearish trend.

Entry and Exit Points: Use the plotted arrows to identify potential entry and exit points. Green arrows suggest buying opportunities, while red arrows indicate selling opportunities.
开源脚本

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

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?