'“BuySignal”' - undeclared identifier	RSI_Wendel_01.mq5	9	29
'“BuySignal”' - invalid property value	RSI_Wendel_01.mq5	9	29
'indicator_label1' - expression expected	RSI_Wendel_01.mq5	9	11
'“SellSignal”' - undeclared identifier	RSI_Wendel_01.mq5	10	29
'“SellSignal”' - invalid property value	RSI_Wendel_01.mq5	10	29
'indicator_label2' - expression expected	RSI_Wendel_01.mq5	10	11
'“K' - undeclared identifier	RSI_Wendel_01.mq5	11	29
'Line”' - undeclared identifier	RSI_Wendel_01.mq5	11	32
'Line”' - some operator expected	RSI_Wendel_01.mq5	11	32
'“K' - invalid property value	RSI_Wendel_01.mq5	11	29
'indicator_label3' - expression expected	RSI_Wendel_01.mq5	11	11
'“D' - undeclared identifier	RSI_Wendel_01.mq5	12	29
'Line”' - undeclared identifier	RSI_Wendel_01.mq5	12	32
'Line”' - some operator expected	RSI_Wendel_01.mq5	12	32
'“D' - invalid property value	RSI_Wendel_01.mq5	12	29
'indicator_label4' - expression expected	RSI_Wendel_01.mq5	12	11
'SetIndexBufferStyle' - undeclared identifier	RSI_Wendel_01.mq5	55	4
',' - unexpected token	RSI_Wendel_01.mq5	55	25
'0' - some operator expected	RSI_Wendel_01.mq5	55	24
',' - unexpected token	RSI_Wendel_01.mq5	55	48
'PLOT_COLOR_INDEX' - undeclared identifier	RSI_Wendel_01.mq5	55	50
'PLOT_COLOR_INDEX' - some operator expected	RSI_Wendel_01.mq5	55	50
expression has no effect	RSI_Wendel_01.mq5	55	47
'colorGreen' - undeclared identifier	RSI_Wendel_01.mq5	55	68
')' - unexpected token	RSI_Wendel_01.mq5	55	78
')' - unexpected token	RSI_Wendel_01.mq5	55	79
'SetIndexBufferStyle' - undeclared identifier	RSI_Wendel_01.mq5	56	4
',' - unexpected token	RSI_Wendel_01.mq5	56	25
'1' - some operator expected	RSI_Wendel_01.mq5	56	24
',' - unexpected token	RSI_Wendel_01.mq5	56	48
'PLOT_COLOR_INDEX' - undeclared identifier	RSI_Wendel_01.mq5	56	50
'PLOT_COLOR_INDEX' - some operator expected	RSI_Wendel_01.mq5	56	50
expression has no effect	RSI_Wendel_01.mq5	56	47
'colorRed' - undeclared identifier	RSI_Wendel_01.mq5	56	68
')' - unexpected token	RSI_Wendel_01.mq5	56	76
')' - unexpected token	RSI_Wendel_01.mq5	56	77



MEU CODIGO ABAIXO:

//±-----------------------------------------------------------------+
//|                                                         RSI Zone  |
//|                        Copyright 2023, YourName                  |
//|                                       https://www.yourwebsite.com|
//±-----------------------------------------------------------------+
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_plots   4
#property indicator_label1  “BuySignal”
#property indicator_label2  “SellSignal”
#property indicator_label3  “K Line”
#property indicator_label4  “D Line”

//— input parameters
input int n1 = 30;

//— indicator buffers
double BuySignalBuffer[];
double SellSignalBuffer[];
double KBuffer[];
double DBuffer[];

//— variables
double highestHigh, lowestLow, rsv;
double kPrev = 0, dPrev = 0;
double k = 0, d = 0;
double leadingLine, var1, var2, var3, var4, var5, var10, var13;

//±-----------------------------------------------------------------+
//| Custom indicator initialization function                         |
//±-----------------------------------------------------------------+
int OnInit()
  {
   //— indicator buffers mapping
   SetIndexBuffer(0, BuySignalBuffer);
   SetIndexBuffer(1, SellSignalBuffer);
   SetIndexBuffer(2, KBuffer);
   SetIndexBuffer(3, DBuffer);

   //— sets dynamic array as series 
   ArraySetAsSeries(BuySignalBuffer, true);
   ArraySetAsSeries(SellSignalBuffer, true);
   ArraySetAsSeries(KBuffer, true);
   ArraySetAsSeries(DBuffer, true);

   //— plot settings
   PlotIndexSetInteger(0, PLOT_DRAW_TYPE, DRAW_ARROW);    // Buy Signal as Arrow
   PlotIndexSetInteger(0, PLOT_ARROW, 233);               // Up Arrow
   PlotIndexSetInteger(1, PLOT_DRAW_TYPE, DRAW_ARROW);    // Sell Signal as Arrow
   PlotIndexSetInteger(1, PLOT_ARROW, 234);               // Down Arrow
   PlotIndexSetInteger(2, PLOT_DRAW_TYPE, DRAW_LINE);     // K Line
   PlotIndexSetInteger(3, PLOT_DRAW_TYPE, DRAW_LINE);     // D Line

   //— colors
   SetIndexBufferStyle(0, PlotIndexSetInteger(0, PLOT_COLOR_INDEX, colorGreen));
   SetIndexBufferStyle(1, PlotIndexSetInteger(1, PLOT_COLOR_INDEX, colorRed));

   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[])
  {
   int start = (prev_calculated > 0) ? prev_calculated - 1 : 0;

   for(int i = start; i < rates_total; i++)
     {
      highestHigh = high[iHighest(NULL, 0, MODE_HIGH, n1, i)];
      lowestLow = low[iLowest(NULL, 0, MODE_LOW, n1, i)];
      rsv = 100 * (close[i] - lowestLow) / (highestHigh - lowestLow);

      k = EMA(rsv, 3, i, kPrev);
      d = EMA(k, 3, i, dPrev);

      BuySignalBuffer[i] = (d < 25 && IsCrossover(k, d, kPrev, dPrev)) ? 30 : 0;
      SellSignalBuffer[i] = (d > 75 && IsCrossunder(d, k, dPrev, kPrev)) ? 70 : 0;

      // Save the previous values
      kPrev = k;
      dPrev = d;

      // Assign K and D to buffers for plotting
      KBuffer[i] = k;
      DBuffer[i] = d;
     }

   return(rates_total);
  }

//— Function to calculate EMA
double EMA(double value, int period, int index, double prevEMA)
  {
   double weight = 2.0 / (period + 1);
   if(index == 0)
     {
      prevEMA = value;
      return value;
     }
   else
     {
      double ema = (value - prevEMA) * weight + prevEMA;
      return ema;
     }
  }

//— Function to detect crossover
bool IsCrossover(double fast, double slow, double prevFast, double prevSlow)
  {
   return (prevFast <= prevSlow && fast > slow);
  }

//— Function to detect crossunder
bool IsCrossunder(double fast, double slow, double prevFast, double prevSlow)
  {
   return (prevFast >= prevSlow && fast < slow);
  }