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.09.19 15:37

J2JMA - indicator for MetaTrader 5

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

votes: 10
j2jma.mq5 (7.14 KB)view
colorj2jma.mq5 (7.97 KB)view


Moving average with the double adaptive JMA smoothing of a price range.

The average is calculated the following way:

J2JMA[bar] = JMA(JMA(PRICE[bar]))


  • JMA() - adaptive smoothing algorithm;
  • PRICE[] - price series value;
  • bar - current bar.

The average shows good results on short- and long-term trends. It is not recommended to use big values of the Length2 second smoothing depth. In the latter case the indicator starts working as a standard JMA average having the Length parameter equal to the sum of Length1 and Length2.

ColorJ2JMA and J2JMA indicators use the CJJMA class of the SmoothAlgorithms.mqh library (must be placed to the terminal_data_folder\MQL5\Include). The use of the class was thoroughly described in the article "Averaging Price Series for Intermediate Calculations Without Using Additional Buffers".



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.