Как построить гистограмму с накоплением?

 

Я попробовал это:

 Histogram plots --- //  
 #property  indicator_label1     "Green"  
 #property  indicator_type1     DRAW_HISTOGRAM  
 #property  indicator_color1     clrLimeGreen  
 #property  indicator_style1     STYLE_SOLID  
 #property  indicator_width1     5  
 #property  indicator_label2     "of Red"  
 #property  indicator_type2     DRAW_HISTOGRAM  
 #property  indicator_color2     clrRed  
 #property  indicator_style2     STYLE_SOLID  
 #property  indicator_width2     3  
 #property  indicator_minimum  0 
 // --- input parameters  

 double           ExtBullsBuffer [];  
 double           ExtBearsBuffer [];  
 double           ExtBullsBufferTemp [];  
 double           ExtBearsBufferTemp [];  
 // + ----------------------------------------------- ------------------- +  
 // |  Custom indicator initialization function |  
 // + ----------------------------------------------- ------------------- +  
 int  OnInit  ()  
   {  

 // --- indicator buffers mapping  
   SetIndexBuffer  (  0  , ExtBullsBuffer,  INDICATOR_DATA  );  
   SetIndexBuffer  (  1  , ExtBearsBuffer, INDICATOR_DATA  );  
   SetIndexBuffer  (  2  , ExtBullsBufferTemp,  INDICATOR_CALCULATIONS  );  
   SetIndexBuffer  (  3  , ExtBearsBufferTemp,  INDICATOR_CALCULATIONS  );  
   
 
   return  (  INIT_SUCCEEDED  );  
   } 

Я получил это:

output

Но я хочу вот так:

expect

Дайте мне знать, как это сделать.

Причина обращения: