Watch how to download trading robots for free
Find us on Facebook!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Views:
4258
Rating:
(10)
Published:
2018.09.27 15:45
Updated:
2023.03.29 13:48
\MQL5\Include\
UltraMFI.mq5 (22.19 KB) view
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

Actual author: Dmitriy.

This indicator is based on MFI (Money Flow Index) and its multiple signal lines analysis. Signal lines calculation algorithm is as follows. We have indicator input parameters as source data:

  • StartLength - minimum initial value of the first signal line;
  • Step - period change step;
  • StepsTotal - number of period changes.

Any period value from the multitude of signal lines is calculated using arithmetic progression:

SignalPeriod(Number) = StartLength + Number * Step,

where the value of Number variable ranges from zero to StepsTotal. Obtained values ​​of the periods are added to the variables array and are used at each indicator tick to get the array of smoothed Larry Williams' Percent Range indicator values. Directions of the current trend for each of the smoothings are calculated and also the number of positive and negative trends for the whole array of MFI smoothed values is determined.

The final number of positive and negative trends is smoothed in its turn and used as the indicator lines that form a color cloud displayed with the help of the DRAW_FILLING style class.

A trend direction in this indicator is determined by the cloud color, while its power is determined by the cloud width. You can use the overbought (UpLevel) and oversold (DnLevel) levels that are set in percent value from the indicator maximum range.

Smoothing algorithms can be selected out of ten possible versions:

  1. SMA - simple moving average;
  2. EMA - exponential moving average;
  3. SMMA - smoothed moving average;
  4. LWMA - linear weighed Moving Average;
  5. JJMA - JMA adaptive average;
  6. JJurX - ultralinear averaging;
  7. ParMA - parabolic averaging;
  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 the VIDYA it is a CMO oscillator period and for the AMA it is a slow EMA period. In other algorithms these parameters do not affect the averaging. For AMA fast EMA period is a fixed and equal to 2 by default value. The ratio of raising to the power is also equal to 2 for AMA.

The indicator uses the SmoothAlgorithms.mqh library classes (copy them to <terminal_data_directory>\MQL5\Include). The classes were described in detail in the Averaging Price Series for Intermediate Calculations Without Using Additional Buffers article.

//+----------------------------------------------+
//| Indicator input parameters                   |
//+----------------------------------------------+
input int MFI_Period=13;                            // MFI indicator period
input ENUM_APPLIED_VOLUME VolumeType=VOLUME_TICK;   // MFI indicator volume
//----
input Smooth_Method W_Method=MODE_JJMA; // Smoothing method
input int StartLength=3;                // Initial averaging period
input int WPhase=100;                   // Smoothing parameter
// for JJMA it varies within the range -100 ... +100 and influences the quality of the transient period;
// For VIDIA, it is the CMO period, for AMA, it is the period of slow moving average
//----  
input uint Step=5;        // Period change step
input uint StepsTotal=10; // Number of period changes
//----
input Smooth_Method SmoothMethod=MODE_JJMA; // Soothing method
input int SmoothLength=3;                   // Smoothing depth                    
input int SmoothPhase=100;                  // Smoothing parameter
// for JJMA it varies within the range -100 ... +100 and influences the quality of the transient period;
//----                          
input uint UpLevel=80;            // Overbought level in %%
input uint DnLevel=20;            // Oversold level in %%
input color UpLevelsColor=Blue;   // The color of the overbought level
input color DnLevelsColor=Blue;   // The color of the oversold level
input STYLE Levelstyle=DASH_;     // Style of the levels
input WIDTH  LevelsWidth=Width_1; // Width of the levels
//+----------------------------------------------+

Fig. 1. The UltraMFI indicator

Fig. 1. The UltraMFI indicator

Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/21750

TD_I TD_I

The TD_I indicator (Thomas DeMark Indicator) is a modified version of the standard DeMarker Indicator by Thomas R. DeMark.

55 MA 55 MA

A trading system based on iMA (Moving Average, MA) with the averaging period of 55 (the averaging period is hardcoded and is not available in input parameters).

BBands_Stop_v1_Alert BBands_Stop_v1_Alert

The BBands Stop v1 indicator provides alerts, sends email and push notifications when the trend direction changes and the indicator color changes accordingly.

Wiseman1 Wiseman1

The indicator colors candlesticks depending on the position of these candlesticks in relation to the previous candlesticks.