• Overview
  • Reviews
  • Comments

ZigZagLW4 Addition

This is a functional extension of the ZigZagLW4 indicator. It detects the beginning of a new trend signaling of a new indicator line shoulder of a specified level. This is a stand-alone indicator, which means you do not need the activated ZigZagLW4 indicator for correct operation.

Algorithm logic

To understand the logic of the indicator, let's take a look at the screenshots consistently displaying the conditions for the signals formation. The chart has ZigZagLW4 indicator with the Short_term and Medium_term lines. Besides, the chart also has the present indicator with term = Medium_term and SoundSignal = false. This means the Medium_term line is tracked.

The first screenshot displays the А price level. When it is crossed by the current price, a new Medium_term shoulder of the ZigZagLW4 indicator is formed and the addition provides a buy signal.

The second screenshot shows the condition described above but the signal is not activated. The reason lies in ZigZagLW4 which is calculated based on formed bars, while the last bar has not been formed yet.

On the third screenshot, the bar and the new Medium_term shoulder of the ZigZagLW4 indicator have formed and the addition activates the buy signal near the current price.

The fourth screenshot reflects the natural movement of the price.

The following screenshots show the formation of a sell signal.

Input parameters

The inputs are displayed on the last screenshot:

  • Term – select the ZigZagLW4 indicator line for tracking. It can accept the following values:
    • Short_term
    • Medium_term
    • Long_term1
  • SignalSound – enable/disable a sound when a buy/sell signal is activated.

The page https://www.mql5.com/en/code/19646 provides a link to a sample Expert Advisor which demonstrates the use of a similar MetaTrader 5 indicator for building a mechanical trading system.

Note: The similar MQL5 indicator is also available.

No reviews