Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2011.10.07 18:27

X2MA - indicator for MetaTrader 5

| English Deutsch Русский 中文 Español 日本語 Português

votes: 12
x2ma.mq5 (8.25 KB)view
colorx2ma.mq5 (9.17 KB)view


The universal moving average with double smoothing and possibility to select each of this smoothings from the dozen of possible variants:

  1. SMA - Simple moving average
  2. EMA - Exponential moving average
  3. SMMA - Smoothed moving average
  4. LWMA - Linear weighted moving average
  5. JJMA - JMA adaptive average
  6. JurX - Ultralinear smoothing
  7. ParMA - Parabolic smoothing
  8. T3 - Tillson's multiple exponential smoothing
  9. VIDYA - Smoothing with the use of Tushar Chande's algorithm
  10. AMA - Smoothing with the use of Perry Kaufman's algorithm

It should be noted that Phase1 and Phase2 parameters have completely different meaning for different smoothing algorithms. For JMA it is an external Phase variable changing from -100 to +100. For T3 it is a smoothing ratio multiplied by 100 for better visualization, for VIDYA it is a CMO oscillator period and for AMA it is a slow EMA period. In other algorithms these parameters do not affect smoothing. For AMA fast EMA period is a fixed value and is equal to 2 by default. The ratio of raising to the power is also equal to 2 for AMA.



Translated from Russian by MetaQuotes Software Corp.
Original code:

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

Average Directional Movement Index (ADX) Average Directional Movement Index (ADX)

The Average Directional Movement Index Indicator (ADX) helps to determine if there is a price trend.

TP-SL_Removing TP-SL_Removing

Immediately deletes the SL/TP of all positions.

Closed_TOTAL Closed_TOTAL

Total closure of all positions (winners/losers). You can also select which are of a single instrument.