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.
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?