Barras de histograma não aparece no indicador criado! Alguém me ajuda ?

 
//+------------------------------------------------------------------+
//|                                                         ind2.mq5 |
//|                        Copyright 2020, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2020, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"


#property indicator_separate_window
#property indicator_buffers 1
#property indicator_plots   1
//--- plot Volume


#property indicator_label1  "Volume"
#property indicator_type1   DRAW_LINE
#property indicator_color1  clrRed
#property indicator_style1  STYLE_SOLID
#property indicator_width1  4


//--- indicator buffers
double         VolumeBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   SetIndexBuffer(0,VolumeBuffer,INDICATOR_DATA);
   //IndicatorSetString(INDICATOR_SHORTNAME, "Volume");
//---
   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(prev_calculated == 0){
      for(int index = 0; index < rates_total; index++){
         VolumeBuffer[index] = (double)volume[index];
      }
   }else{
      VolumeBuffer[rates_total - 1] = (double)volume[rates_total - 1];
   }
   
   return(rates_total);
  }
//+------------------------------------------------------------------+

Arquivos anexados:
metra.png  86 kb