UltraFatl Indicator For MT5

UltraFatl Indicator For MT5

The UltraFatl Indicator For MT5 is based on the analysis of Fast Adaptive Trend Line (FATL) indicator and its signal lines. The values of FATL with different time periods are utilized to calculate the average values of FATL indicator. The evaluation of trend direction is dependent on the averaged values for all the signal lines.

The positive and negative trend values are thereafter averaged and used to create a multi-colored histogram. The histogram is plotted using the DRAW_COLOR_HISTOGRAM2 style. Bar colors depend on trend direction, while the width of histogram is a factor of the strength of trend in force.

FREE UltraFatl Indicator

Download the FREE UltraFatl Indicator for MT5.

To receive my email 100% sure: 
Put my email on your whitelist!


Partially Automated Trading Besides Your Day Job

Alerts In Real-Time When Divergences Occur

My Recommended MT4/MT5 Broker


Installing the UltraFatl Indicator For MT5

After you downloaded the indicator via the form above you need to unzip the zip-file. Then you need to copy the file ultrafatl.mq5 into the folder MQL5\Indicators of your MT5 installation. After that please restart MT5 and then you will be able to see the indicator in the list of indicators.

Parameters of the UltraFatl Indicator For MT5

The UltraFatl Indicator For MT5 has 16 parameters to configure.

input ENUM_APPLIED_PRICE Applied_price=PRICE_CLOSE; // Applied price
input Smooth_Method W_Method=MODE_JJMA;             // Smoothing method
input int StartLength=3;                            // Initial smoothing period
input int WPhase=100;                               // Phase
input uint Step=5;                                  // Step
input uint StepsTotal=10;                           // Total steps
input Smooth_Method SmoothMethod=MODE_JJMA;         // Smoothing method
input int SmoothLength=3;                           // Smoothing length
input int SmoothPhase=100;                          // Phase
input Applied_price_ IPC=PRICE_CLOSE_;              // Applied price
input uint UpLevel=80;                              // Overbought level (in %)
input uint DnLevel=20;                              // Oversold level (in %)
input color UpLevelsColor=Blue;                     // Color of overbought level
input color DnLevelsColor=Blue;                     // Color of oversold level
input STYLE Levelstyle=DASH_;                       // Level style
input WIDTH  LevelsWidth=Width_1;                   // Level width

Buffers of the UltraFatl Indicator For MT5

The UltraFatl Indicator For MT5 provides 3 buffers.


Main Parts Of The Code

int OnCalculate(const int rates_total,    // number of bars in history at current tick
                const int prev_calculated,// number of bars, calculated at previous call
                const datetime &time[],
                const double &open[],
                const double& high[],     // high prices
                const double& low[],      // low prices
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
//---- checking of bars
   if(rates_total lt min_rates_total) return(RESET);

//---- declaration of local variables
   int limit,bar,maxbar0,maxbar1,maxbar2;
   double upsch,dnsch,fatl,price;

//---- calculation of maxbar starting bar index for XMASeries()

//---- set limit for bars recalculation
   if(prev_calculated gt rates_total || prev_calculated lt =0)// checking of first call
      limit=maxbar0;                       // starting index for all bars
   else limit=rates_total-prev_calculated; // starting index for new bars

//---- set indexing as time series

//---- calculation of indicator values
   for(bar=limit; bar gt =0 && !IsStopped(); bar--)

      for(int sm=int(StepsTotal); sm gt =0 && !IsStopped(); sm--)

      if(bar gt maxbar2)
         if(bar) ArrayCopy(invalue1,invalue0,0,0,WHOLE_ARRAY);

      for(int sm=int(StepsTotal); sm gt =0 && !IsStopped(); sm--)
         if(invalue0[sm] gt invalue1[sm]) upsch++;
      else                          dnsch++;


      if(bar) ArrayCopy(invalue1,invalue0,0,0,WHOLE_ARRAY);

//---- set starting index for bars recalculation
   if(prev_calculated gt rates_total || prev_calculated lt =0)// checking of first call

//---- calculation of indicator values
   for(bar=limit; bar gt =0 && !IsStopped(); bar--)

      if(BullsBuffer[bar] gt BearsBuffer[bar])
         if(BullsBuffer[bar] gt dUpLevel || BearsBuffer[bar] lt dDnLevel)
            if(BullsBuffer[bar+1] lt =BullsBuffer[bar]) ColorBuffer[bar]=7;
            else ColorBuffer[bar]=8;
            if(BullsBuffer[bar+1] lt =BullsBuffer[bar]) ColorBuffer[bar]=5;
            else ColorBuffer[bar]=6;

      if(BullsBuffer[bar] lt BearsBuffer[bar])
         if(BullsBuffer[bar] lt dDnLevel || BearsBuffer[bar] gt dUpLevel)
            if(BearsBuffer[bar+1] lt =BearsBuffer[bar]) ColorBuffer[bar]=1;
            else ColorBuffer[bar]=2;
            if(BearsBuffer[bar+1] lt =BearsBuffer[bar]) ColorBuffer[bar]=3;
            else ColorBuffer[bar]=4;


About Me

I'm Mike Semlitsch the owner of PerfectTrendSystem.com. My trading career started in 2007. Since 2013 I have helped thousands of traders to take their trading to the next level. Many of them are now constantly profitable traders. 

The following performance was achieved by me while trading live in front of hundreds of my clients:

Connect With Me:  

This FREE Indicator Can Transform
Your Trading!

FREE Indicator + Telegram Group

Request the Ultimate Double Top/Bottom Indicator which is used by 10,000+ traders.

Results From 5 Months!
This service starts soon! Be the first who get's notified when it begins!