MT4自定义指标不报错但是前台不显示,源码哪里有问题

 
//+------------------------------------------------------------------+
//|                                                       test-1.mq4 |
//|                                           Copyright 2022, Fu Yu. |
//|                    https://www.mql5.com/zh/users/ciciboy3/seller |
//+------------------------------------------------------------------+
#property copyright "Copyright 2022, Fu Yu."
#property link      "https://www.mql5.com/zh/users/ciciboy3/seller"
#property version   "1.00"
#property strict
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_plots   2
//--- plot buy
#property indicator_label1  "buy"
#property indicator_type1   DRAW_ARROW
#property indicator_color1  clrAqua
#property indicator_style1  STYLE_SOLID
#property indicator_width1  1
//--- plot sell
#property indicator_label2  "sell"
#property indicator_type2   DRAW_ARROW
#property indicator_color2  clrRed
#property indicator_style2  STYLE_SOLID
#property indicator_width2  1
//--- indicator buffers
int InpKPeriod0=9;  // K period
int InpDPeriod0=3;  // D period
int InpSlowing0=3;  // Slowing
double         buyBuffer[];
double         sellBuffer[];
double isto9k[];
double isto9d[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   SetIndexBuffer(0,buyBuffer);
   SetIndexBuffer(1,sellBuffer);
//--- setting a code from the Wingdings charset as the property of PLOT_ARROW
   SetIndexArrow(0,116);
   SetIndexArrow(1,234);

//---
   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[])
  {
//---
   if(rates_total<InpKPeriod0
      ||rates_total<InpDPeriod0
      ||rates_total<InpSlowing0)
     {
      return (0);
     }

   int i=0;
   int limit;
   limit=rates_total-prev_calculated;
   if(prev_calculated>0)
      limit++;
   for(i=0; i<limit; i++)
     {
      isto9k[i]=iStochastic(NULL,0,InpKPeriod0,InpDPeriod0,InpSlowing0,0,0,MODE_MAIN,i);
      isto9d[i]=iStochastic(NULL,0,InpKPeriod0,InpDPeriod0,InpSlowing0,0,0,MODE_SIGNAL,i);
      if(isto9k[i]<isto9d[i])
        {
         buyBuffer[i]=close[i];
        }
     }
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+
 

isto9k[i] isto9d[i] 數組超出範圍

編譯沒抱錯並不表示代碼沒問題 只能說代碼的語法沒問題

這兩個不需要設為數組來做計算的