Help Please to Display Arrows

 
//+------------------------------------------------------------------+
//|                                              5min_Indicator8.mq4 |
//|                                     Ferrari Green Associates LTD |
//|                                    https://www.Ferrari-Green.com |
//+------------------------------------------------------------------+
#property copyright "Ferrari Green Associates LTD"
#property link      "https://www.Ferrari-Green.com"
#property version   "1.00"
#property strict
#property indicator_chart_window

#property indicator_buffers 4


//---Indicator Colours
#property indicator_color1 clrGreen//up arrow
#property indicator_color2 clrRed//down arrow
#property indicator_color3 clrCrimson//BollingerUpper
#property indicator_color4 clrCrimson//BollingerLower

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
bool DrawLine(string n,datetime t1,double p1,datetime t2,double p2,color clr=clrBlack,string dscr="",bool ray=true,int stl=STYLE_SOLID,int wdt=1)
  {

   if(ObjectFind(n)>=0)
      ObjectDelete(n);
   if(!ObjectCreate(0,n,OBJ_TREND,0,t1,p1,t2,p2))
      return(false);
   bool ok=ObjectSet(n,OBJPROP_COLOR,clr);
   ok = ok && ObjectSet(n,OBJPROP_STYLE,stl);
   ok = ok && ObjectSet(n, OBJPROP_RAY, ray);
   ok = ok && ObjectSet(n,OBJPROP_WIDTH,wdt);
   ok = ok && ObjectSetText(n,dscr,10);
   WindowRedraw();
   return(ok);
  }


//---Indicator Width
#property indicator_width1 2
#property indicator_width2 2

#include <WinUser32.mqh>
extern bool show=true;//Show Indicators?

double UpArrow[];
double DownArrow[];
double BollingerUpper[];
double BollingerLower[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {

//--- indicator buffers mapping
   SetIndexBuffer(0,UpArrow);
   SetIndexStyle(0,DRAW_ARROW);
   SetIndexArrow(0,233);
   SetIndexLabel(0,"Buy Signal.");
//---
   SetIndexBuffer(1,DownArrow);
   SetIndexStyle(1,DRAW_ARROW);
   SetIndexArrow(1,234);
   SetIndexLabel(1,"Sell Signal.");
//---
   SetIndexBuffer(2,BollingerUpper);
   SetIndexStyle(2,DRAW_LINE);
   SetIndexLabel(2,"BollingerUpper.");
//---
   SetIndexBuffer(3,BollingerLower);
   SetIndexStyle(3,DRAW_LINE);
   SetIndexLabel(3,"BollingerUpper.");
//---

   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
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[])
  {
//---for loop
   int counted_bars=IndicatorCounted();
   int limit= Bars-counted_bars;
   for(int i=1; i<limit-1; i++)
     {
      double Ac=iAC(NULL,0,i);
      double AcBack=iAC(NULL,0,i+1);
      double BolUpper=iBands(NULL,0,20,3,0,PRICE_MEDIAN,MODE_UPPER,i);
      double BolLower=iBands(NULL,0,20,3,0,PRICE_MEDIAN,MODE_LOWER,i);
      bool flag=false;
      //---
      double PriceMedian=(High[i]+Low[i])/2;
      double PriceMedianBack=(High[i+1]+Low[i+1])/2;
      double PriceLow=(Low[i]);
      double PriceLowBack=(Low[i+1]);
      double PriceHigh=(High[i]);
      double PriceHighBack=(High[i+1]);
      
      if(show==true)
        {
         BollingerUpper[i]=BolUpper;
         BollingerLower[i]=BolLower;
        }
        
      //---Prior if here
      if(PriceLowBack<flag && PriceHigh>flag)
           {
            flag=DrawLine("Line_"+(string)i,Time[i+1],High[i+1],Time[i],High[i]);
           }
      
      
        {
         UpArrow[i]=Open[i];
        }
      
      //---Prior if here
      if(PriceHighBack>flag && PriceLowBack<flag)
           {
            flag=DrawLine("Line_"+(string)i,Time[i+1],High[i+1],Time[i],High[i]);
           }
      
      
        {
         DownArrow[i]=Open[i];
        }
     }
//--- return value of prev_calculated for next call
   return(rates_total);
  }

//+------------------------------------------------------------------+

I would like only the last 2 lines to paint how do I achieve this ?

 

to disable buffer painting, change SetIndexStyle to DRAW_NONE.

SetIndexStyle(1,DRAW_NONE);
Reason: