Percentage Crossover Channel Indicator For MT5

Percentage Crossover Channel Indicator For MT5

The Percentage Crossover Channel Indicator For MT5 is a price channel indicator. It is based on the percentage deviation of price from the middle channel line. The indicator consists of three lines overlaid on a price chart: 1. Green Colored Upper Channel Line 2. Blue Colored Middle Channel Line 3. Magenta Colored Lower Channel Line The Percentage Crossover Channel Indicator For MT5 can be used to detect the direction of trend in a market. A broad generalization would be to consider 10 simultaneous price piercings of the Green Upper Channel Line as representative of an underlying bullish trend. Contrarily, 10 simultaneous price piercings of the Magenta Lower Channel Line can be deemed to signify an underlying bearish market trend. 1. In case of an up trend, every dip below the Blue Middle Channel Line provides an opportunity to initiate long positions. 2. During a down trend, any bounce above the Middle line can be used to enter in to short trades.

FREE Percentage Crossover Channel Indicator

Download the FREE Percentage Crossover Channel 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 Percentage Crossover Channel 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 percentagecrossoverchannel.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 Percentage Crossover Channel Indicator For MT5

The Percentage Crossover Channel Indicator For MT5 has 2 parameters to configure.

input double percent=1.0; // Percentage price deviation from the indicator previous value
input int Shift=0;        // Horizontal shift of the indicator in bars

Buffers of the Percentage Crossover Channel Indicator For MT5

The Percentage Crossover Channel Indicator For MT5 provides 3 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 int begin,          // bars reliable counting beginning index
                const double &price[])    // price array for the indicator calculation
//---- checking the number of bars to be enough for the calculation
   if(rates_total lt min_rates_total+begin) return(0);

//---- declaration of integer variables
   int first,bar,bar1;

//---- calculation of the  first  starting index for the bars recalculation loop
   if(prev_calculated==0) // checking for the first start of the indicator calculation
      first=1+begin;      // starting index for calculation of all bars
      //---- performing the shift of the beginning of the indicators drawing
   else // starting index for calculation of new bars

//---- main cycle of calculation of the channel center line
   for(bar=first; bar lt rates_total; bar++)
      if((price[bar]*minusvar) gt MiddleBuffer[bar1]) MiddleBuffer[bar]=price[bar]*minusvar;
         if(price[bar]*plusvar lt MiddleBuffer[bar1]) MiddleBuffer[bar]=price[bar]*plusvar;
         else MiddleBuffer[bar]=MiddleBuffer[bar1];

      UpperBuffer[bar]=MiddleBuffer[bar] + (MiddleBuffer[bar]/100) * percent;
      LowerBuffer[bar]=MiddleBuffer[bar] - (MiddleBuffer[bar]/100) * percent;


About Me

I'm Mike Semlitsch the owner of 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:  

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

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.