why this indicator not update when arrive new candle ?

 

Hi  why this indicator not update  when arrive  a new candle 

//+------------------------------------------------------------------+
//|                                      SCALPING_INDICATOR_2MIN.mq4 |
//|                                  Copyright 2023, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2023, MetaQuotes Ltd."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Tomato
#property indicator_color2 DodgerBlue

extern string   b8="=== SETUP  ===";          //.
extern color    DwnArrow = clrMagenta;               // SETTA IL COLORE DELLA FRECCIA SHORT
extern color    UpArrow = clrGold;               // SETTA IL COLORE DELLA FRECCIA LONG
extern string   b9="=== SETUP RSI ===";          //.
extern int Levelup=90;                           // LIVELLO RSI SUPERIORE 
extern int LevelDown=10;
extern int RSIPeriod=2;
extern string   b10="=== SETUP FRACTAL ===";     //.
extern int ShowDownFractal=0;                    // SHOW FRACTAL DOWN 0 NOT VISUALIZE
extern int ShowUPFractal=0;                      // SHOW FRACTAL UP 0 NOT VISUALIZE
//---- buffers
double ExtUpFractalsBuffer[];
double ExtDownFractalsBuffer[];
static int lastTick = 0;


string MPrefix="FI";
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
{
    //---- indicator buffers mapping  
    SetIndexBuffer(0,ExtUpFractalsBuffer);
    SetIndexBuffer(1,ExtDownFractalsBuffer);   
    //---- drawing settings
    SetIndexStyle(0,DRAW_ARROW);
    SetIndexArrow(0,234);
    SetIndexStyle(1,DRAW_ARROW);
    SetIndexArrow(1,233);
    //----
    SetIndexEmptyValue(0,0.0);
    SetIndexEmptyValue(1,0.0);
    //---- name for DataWindow
    SetIndexLabel(0,"Fractal Up");
    SetIndexLabel(1,"Fractal Down");
    
    return(INIT_SUCCEEDED);
}

//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int lastBar = -1;

int start()
{
    int counted_bars = IndicatorCounted();
    if (counted_bars < 0)
        return (-1);

    int limit = Bars - counted_bars;
    if (lastBar >= limit)
        return (0);

    for (int i = lastBar; i >= limit; i--)
    {
        double rsiValue = iRSI(Symbol(), 0, RSIPeriod, PRICE_CLOSE, i);
        double prevRsiValue = iRSI(Symbol(), 0, RSIPeriod, PRICE_CLOSE, i - 1);

        if (rsiValue < Levelup && prevRsiValue >= Levelup)
        {
            // Draw a white arrow with a unique name
            ObjectCreate("ArrowDown" + IntegerToString(i), OBJ_ARROW_DOWN, 0, Time[i], High[i] + 0.00013);
            ObjectSetInteger(0, "ArrowDown" + IntegerToString(i), OBJPROP_ARROWCODE, 234);
            ObjectSetInteger(0, "ArrowDown" + IntegerToString(i), OBJPROP_COLOR, DwnArrow);
            ObjectSetInteger(0, "ArrowDown" + IntegerToString(i), OBJPROP_WIDTH, 1);
        }

        if (rsiValue > LevelDown && prevRsiValue <= LevelDown)
        {
            // Draw a white arrow with a unique name
            ObjectCreate("ArrowUp" + IntegerToString(i), OBJ_ARROW_UP, 0, Time[i], Low[i]);
            ObjectSetInteger(0, "ArrowUp" + IntegerToString(i), OBJPROP_ARROWCODE, 233);
            ObjectSetInteger(0, "ArrowUp" + IntegerToString(i), OBJPROP_COLOR, UpArrow);
            ObjectSetInteger(0, "ArrowUp" + IntegerToString(i), OBJPROP_WIDTH, 1);
        }
    }

    lastBar = limit;

    return (0);
}


 
int deinit()
  {
//----
ObjectsDeleteAll(0);
    return(0);
   
  }
//+---