product
triggerlines1.mq4
Category : Forex-Indicators Subategory : MT4-Indicators (310) 2

The indicator in the provided MetaTrader 4 (MT4) code is called "Trigger Line". It is designed to help traders identify potential trend changes by comparing a weighted moving average (WMA) with a Least Squares Moving Average (LSMA). Here's a breakdown of its functionality:


Indicator Overview:


  • Name: Trigger Line
  • MetaTrader: MT4 (MetaTrader 4)
  • Purpose: It uses two moving averages, the Weighted Moving Average (WMA) and the LSMA, to help traders determine potential buy or sell signals based on the crossing of these lines.
  • Used in Forex Trading: The indicator is likely designed to aid in Forex trading by providing insights into market trends and reversals.

Indicator Settings:


  • Indicator Type: This indicator is drawn in the main chart window of MT4.
  • Buffers: The indicator uses four buffers to draw lines on the chart.
  • Colors: The colors for the lines are set as:
    • Yellow for one line (buffer 1)
    • Orange for the second line (buffer 2)
    • Aqua for the third line (buffer 3)
    • Blue for the fourth line (buffer 4)

Functionality:


  1. Calculating Weighted Moving Average (WMA):

    • The indicator computes a weighted moving average (wt) based on closing prices over a specified period (Rperiod).
    • The WMA is computed using a formula where the weights of past price data are adjusted, with more weight given to more recent data points.
    • This helps smooth out price movements and identify trends more accurately.

  2. Least Squares Moving Average (LSMA):

    • The indicator then computes a Least Squares Moving Average (LSMA), which is a trend-following indicator that aims to minimize the squared deviations of a line from the actual price data.
    • The LSMA is used to get a better view of the underlying trend and often lags the price compared to other moving averages.

  3. Line Creation:

    • ExtMapBuffer1 and ExtMapBuffer3 display the WMA (wt).
    • ExtMapBuffer2 and ExtMapBuffer4 display the LSMA (lsma_ma).
    • The lines are drawn in solid styles with thickness of 2 for clarity.
    • Color coding: The indicator color coding is significant. When the WMA (wt) is less than the LSMA, the lines for the WMA (wt) and LSMA (lsma_ma) are removed (set to EMPTY_VALUE).

How It Works on the Chart:

  • The WMA (wt) and LSMA (lsma_ma) are plotted as two main lines.
    • When the WMA is below the LSMA, the indicator essentially "removes" the lines for visual clarity, which could signal a potential downtrend or bearish market.
    • When the WMA crosses above the LSMA, the indicator shows both lines, which could signal a potential uptrend or bullish market.

Conclusion:

The Trigger Line indicator provides a simple visual representation of two key moving averages: the WMA and the LSMA. It is designed to highlight trend shifts and offer insights into potential reversals or continuation in the Forex market. The color coding and line disappearance help traders easily spot critical points where the market may change direction, making it a valuable tool for trend-following strategies.

Total Download (310)

We may use cookies or any other tracking technologies when you visit our website, including any other media form, mobile website, or mobile application related or connected to help customize the Site and improve your experience. learn more

Allow