PChannel_System_Digit Indicator For MT5

PChannel_System_Digit Indicator For MT5

The PChannel_System_Digit Indicator For MT5 implements a price breakout system using the PChannel_System indicator. When price moves outside the gray channel area, the color of price candlestick changes to a color that corresponds to the trend direction. Blue candles denote upside breakout, while pink candles represent downside breakout of the channel.

Bright colors signify coincidence of trend and candlestick trajectory. Dark colors correspond to a situation where the direction of price candlestick is opposite to the direction of trend. This indicator version also provides users the choice to round the levels of the upper and lower channel lines to a specified number of digits. The most recent channel breakout levels also get highlighted as colored price labels.

FREE PChannel_System_Digit Indicator

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

The PChannel_System_Digit Indicator For MT5 has 8 parameters to configure.

input string SirName="PChannel_System_Digit";       //Ïåðâàÿ ÷àñòü èìåíè ãðàôè÷åñêèõ îáúåêòîâ
input uint period=20;                               //Ïåðèîä ïîèñêà ýêñòðåìóìîâ
input uint Digit=2;                                 //êîëè÷åñòâî ðàçðÿäîâ îêðóãëåíèÿ
input bool RoundPrice=true;                         //îêðóãëÿòü öåíû
input bool ShowPrice=true;                          //ïîêàçûâàòü öåíîâûå ìåòêè
input uint   Shift=2;                               //ñäâèã êàíàëà ïî ãîðèçîíòàëè â áàðàõ
input color Upper_color=clrBlue;
input color Lower_color=clrMagenta;

Buffers of the PChannel_System_Digit Indicator For MT5

The PChannel_System_Digit Indicator For MT5 provides 9 buffers.

SetIndexBuffer(0,Up1Buffer,INDICATOR_DATA);
SetIndexBuffer(1,Dn1Buffer,INDICATOR_DATA);
SetIndexBuffer(2,Up2Buffer,INDICATOR_DATA);
SetIndexBuffer(3,Dn2Buffer,INDICATOR_DATA);
SetIndexBuffer(4,ExtOpenBuffer,INDICATOR_DATA);
SetIndexBuffer(5,ExtHighBuffer,INDICATOR_DATA);
SetIndexBuffer(6,ExtLowBuffer,INDICATOR_DATA);
SetIndexBuffer(7,ExtCloseBuffer,INDICATOR_DATA);
SetIndexBuffer(8,ExtColorBuffer,INDICATOR_COLOR_INDEX);

Main Parts Of The Code

int OnCalculate(
                const int rates_total,    // êîëè÷åñòâî èñòîðèè â áàðàõ íà òåêóùåì òèêå
                const int prev_calculated,// êîëè÷åñòâî èñòîðèè â áàðàõ íà ïðåäûäóùåì òèêå
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[]
                )
  {
//---- ïðîâåðêà êîëè÷åñòâà áàðîâ íà äîñòàòî÷íîñòü äëÿ ðàñ÷¸òà
   if(rates_total lt min_rates_total) return(0);

//---- èíäåêñàöèÿ ýëåìåíòîâ â ìàññèâàõ êàê â òàéìñåðèÿõ  
   ArraySetAsSeries(open,true);
   ArraySetAsSeries(close,true);
   ArraySetAsSeries(high,true);
   ArraySetAsSeries(low,true);

//---- Îáúÿâëåíèå öåëûõ ïåðåìåííûõ
   int limit;
//---- Îáúÿâëåíèå ïåðåìåííûõ ñ ïëàâàþùåé òî÷êîé  
   double HH,LL;

//---- ðàñ÷¸òû ñòàðòîâîãî íîìåðà limit äëÿ öèêëà ïåðåñ÷¸òà áàðîâ
   if(prev_calculated gt rates_total || prev_calculated lt =0)// ïðîâåðêà íà ïåðâûé ñòàðò ðàñ÷¸òà èíäèêàòîðà
     {
      limit=rates_total-min_rates_total; // ñòàðòîâûé íîìåð äëÿ ðàñ÷¸òà âñåõ áàðîâ
     }
   else
     {
      limit=rates_total-prev_calculated; // ñòàðòîâûé íîìåð äëÿ ðàñ÷¸òà íîâûõ áàðîâ
     }

//---- îñíîâíîé öèêë ðàñ÷¸òà èíäèêàòîðà
   for(int bar=limit; bar gt =0 && !IsStopped(); bar--)
     {
      HH=high[ArrayMaximum(high,bar,period)];
      LL=low[ArrayMinimum(low,bar,period)];
      Up1Buffer[bar]=HH;
      Dn1Buffer[bar]=LL;      
      Up1Buffer[bar]=Up2Buffer[bar]=PointPow10*MathCeil(Up1Buffer[bar]/PointPow10);
      Dn1Buffer[bar]=Dn2Buffer[bar]=PointPow10*MathFloor(Dn1Buffer[bar]/PointPow10);
     }

//---- ðàñ÷¸ò ñòàðòîâîãî íîìåðà limit äëÿ öèêëà ïåðåñ÷¸òà áàðîâ
   if(prev_calculated gt rates_total || prev_calculated lt =0) limit-=int(Shift);
//---- Îñíîâíîé öèêë ðàñêðàñêè áàðîâ èíäèêàòîðà
   for(int bar=limit; bar gt =0 && !IsStopped(); bar--)
     {
      int clr=2;
      ExtOpenBuffer[bar]=0.0;
      ExtCloseBuffer[bar]=0.0;
      ExtHighBuffer[bar]=0.0;
      ExtLowBuffer[bar]=0.0;

      if(close[bar] gt Up1Buffer[bar+Shift])
        {
         if(open[bar] lt =close[bar]) clr=4;
         else clr=3;
         ExtOpenBuffer[bar]=open[bar];
         ExtCloseBuffer[bar]=close[bar];
         ExtHighBuffer[bar]=high[bar];
         ExtLowBuffer[bar]=low[bar];
        }

      if(close[bar] lt Dn1Buffer[bar+Shift])
        {
         if(open[bar] gt close[bar]) clr=0;
         else clr=1;
         ExtOpenBuffer[bar]=open[bar];
         ExtCloseBuffer[bar]=close[bar];
         ExtHighBuffer[bar]=high[bar];
         ExtLowBuffer[bar]=low[bar];
        }
        
      ExtColorBuffer[bar]=clr;
     }
   if(ShowPrice)
     {
      int bar0=int(Shift);
      datetime time0=time[0];
      SetRightPrice(0,upper_name,0,time0,Up1Buffer[bar0],Upper_color);
      SetRightPrice(0,lower_name,0,time0,Dn1Buffer[bar0],Lower_color);
     }
//----     
   ChartRedraw(0);
   return(rates_total);
  }
//+------------------------------------------------------------------+
//|  RightPrice creation                                             |
//+------------------------------------------------------------------+
void CreateRightPrice(long chart_id,// chart ID
                      string   name,              // object name
                      int      nwin,              // window index
                      datetime time,              // price level time
                      double   price,             // price level
                      color    Color              // Text color
                      )
//---- 
  {
//----
   ObjectCreate(chart_id,name,OBJ_ARROW_RIGHT_PRICE,nwin,time,price);
   ObjectSetInteger(chart_id,name,OBJPROP_COLOR,Color);
   ObjectSetInteger(chart_id,name,OBJPROP_BACK,true);
   ObjectSetInteger(chart_id,name,OBJPROP_WIDTH,2);
//----
  }
//+------------------------------------------------------------------+
//|  RightPrice reinstallation                                       |
//+------------------------------------------------------------------+
void SetRightPrice(long chart_id,// chart ID
                   string   name,              // object name
                   int      nwin,              // window index
                   datetime time,              // price level time
                   double   price,             // price level
                   color    Color              // Text color
                   )
//---- 
  {
//----
   if(ObjectFind(chart_id,name)==-1) CreateRightPrice(chart_id,name,nwin,time,price,Color);
   else ObjectMove(chart_id,name,0,time,price);
//----
  }
//+------------------------------------------------------------------+

 

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:  

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.