#property description "A Renko Channel Fractal Breakout Indicator\nBuy when breakout of high. Sell when breakout of low."

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 MediumSeaGreen
#property indicator_color2 MediumSeaGreen
double upper[], lower[];
double high, low;
int i;  
int init(){
   SetIndexArrow(0, 119);
   SetIndexArrow(1, 119); 
   SetIndexStyle(0, DRAW_LINE, STYLE_DASH, 1);
   SetIndexDrawBegin(0, i-1);
   SetIndexBuffer(0, upper);
   SetIndexLabel(0, "Resistance");  
   SetIndexStyle(1, DRAW_LINE, STYLE_DASH, 1);
   SetIndexDrawBegin(1, i-1);
   SetIndexBuffer(1, lower);
   SetIndexLabel(1, "Support");
   return(0); } // End init

int start(){
   i = Bars;
   while(i >= 0){   
       high = iFractals(NULL, 0, MODE_UPPER, i);
       if(high > 0) upper[i] = High[i];
       else upper[i] = upper[i+1]; 
  
       low = iFractals(NULL, 0, MODE_LOWER, i);
       if(low > 0) lower[i] = Low[i];
       else lower[i] = lower[i+1];
       i--;
     }return(0);} // End start