UltraXMA Indicator For MT5

UltraXMA Indicator For MT5

The UltraXMA Indicator For MT5 plots a cloud indicator in a separate pane below price, whose color and value represent the trend direction and strength, respectively. It is based on the XMA indicator, a Moving Average curve that contains a digital filter. Basic signals generated by the UltraXMA Indicator For MT5 are enumerated below: 1. When the cloud color changes to Violet, an up trend is deemed to be in force. Traders can initiate long positions when the Violet cloud reverses from below the 2.00 mark. 2. When the cloud color changes to Orange, the trend is considered to have shifted from up to down. Traders can enter short as and when the Orange cloud reverses from above the 8.00 zone. The UltraXMA can be applied across time frames and asset classes. It seems to perform better during periods when price is trending strongly.

FREE UltraXMA Indicator

Download the FREE UltraXMA 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 UltraXMA 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 ultraxma.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 UltraXMA Indicator For MT5

The UltraXMA 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;                       // Smoothing parameter
input uint Step=5;                          // Period change step
input uint StepsTotal=10;                   // Number of period changes
input Smooth_Method SmoothMethod=MODE_JJMA; // Smoothing method
input int SmoothLength=3;                   // Smoothing depth
input int SmoothPhase=100;                  // Smoothing parameter
input Applied_price_ IPC=PRICE_CLOSE;       // Applied price
input uint UpLevel=80;                      // Overbought level
input uint DnLevel=20;                      // Oversold level
input color UpLevelsColor=Red;              // Overbought level color
input color DnLevelsColor=Red;              // Oversold level color
input STYLE Levelstyle=DASH_;               // Levels style
input WIDTH  LevelsWidth=Width_1;           // Levels width

Buffers of the UltraXMA Indicator For MT5

The UltraXMA Indicator For MT5 provides 2 buffers.


Main Parts Of The Code

int OnCalculate(const int rates_total,    // number of bars in history at the current tick
                const int prev_calculated,// number of bars calculated at previous call
                const datetime &time[],
                const double &open[],
                const double& high[],     // price array of maximums of price for the indicator calculation
                const double& low[],      // price array of minimums of price for the indicator calculation
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
//---- checking the number of bars to be enough for the calculation
   if(rates_total lt min_rates_total) return(RESET);

//---- declarations of local variables 
   int limit,bar,maxbar1,maxbar2;
   double upsch,dnsch,price_;

//---- calculation of maxbar initial index for the XMASeries() function

//---- calculation of the  limit  starting index for the bars recalculation loop
   if(prev_calculated gt rates_total || prev_calculated lt =0)// checking for the first start of the indicator calculation
      limit=maxbar1;                       // starting index for calculation of all bars
   else limit=rates_total-prev_calculated; // starting index for calculation of new bars

//---- indexing elements in arrays as time series  

//---- main indicator calculation loop
   for(bar=limit; bar gt =0 && !IsStopped(); bar--)
      //---- call of the PriceSeries function to get the input price  price_ 

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

      if(bar gt maxbar2)
         if(bar) ArrayCopy(xxma1,xxma0,0,0,WHOLE_ARRAY);

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


      if(bar) ArrayCopy(xxma1,xxma0,0,0,WHOLE_ARRAY);


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!