MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal

Source code library - Expert Advisors, Indicators and Scripts

Документация - это исчерпывающая справка по языку MQL5
To post a new code, please log in or register

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

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

2012.09.17 09:57

MARSICD - indicator for MetaTrader 5

| English Russian Chinese Spanish Portuguese

votes: 10
marsicd.mq5 (12.72 KB)view

Real author:

John Q. Aimsson


Trend indicator based on two RSI oscillators. In most cases the periods of the oscillators can vary. The final indicator strongly resembles ADX and MACD technical indicators combined on one chart. The indicator should be interpreted in the same way as the two mentioned ones. 

Input parameters: 

//|  Indicator input parameters                  |
input Smooth_Method MAMethod=MODE_LWMA; //smoothing method
input uint ARSI_PERIOD=14;              //RSI A period
input uint RRSI_PERIOD=14;              //RSI R period
input uint AMA_PERIOD=5;                //signal A period
input uint RMA_PERIOD=5;                //signal R period
input uint sMAD_PERIOD=21;              //signal period for the histogram
input uint MPhase=15; //smoothing parameter,
                      //for JJMA that can change withing the range -100 ... +100. It impacts the quality of the intermediate process of smoothing;
// for VIDIA it is a CMO period, for AMA it is a slow average period






This indicator was first implemented in MQL4 and published in Code Base at 07.06.2012 (in Russian).

The indicator uses SmoothAlgorithms.mqh library classes (must be copied to the terminal_data_folder\MQL5\Include). The use of the classes 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:

Last comments | Go to discussion (1)
Sergey Golubev
newdigital | 3 Feb 2014 at 06:42

Relative Strength Index (RSI) in Forex Trading (based on dailyforex article)

The Relative Strength Index (RSI) is a momentum oscillator, which is used for technical analysis in the forex market. Momentum oscillators such as RSI are usually used in a ‘sideways’ or ‘ranging’ market, where the price moves progressively between the support and resistance levels. It is a leading indicator, and hence used on account of its wide applicability. It is usually calculated for 14 periods, although the number of days or other period in question can be modified to suit a trader’s specific style.

Overbought and Oversold

Like other momemtun oscillators, RSI moves in a predefined range, although the signal lines are considered to be the 70% (overbought) and 30% (oversold) lines. The overbought region refers to a situation where the market has moved into significant buying pressure, relative to the recent past. It often signals that an upward trend is about to come to an end. Similarly, the oversold region refers to the lower region, which suggests significant selling pressure relative to the recent past, and is indicative of an end to a downward trend.

Basic Trading guidelines

  • Go short when the indicator moves from above, to below the overbought line.
  • Go long when the indicator moves from below, to above the oversold line.