How to draw historgram on chart window

 

Hi Everyone,

I create an custom indicator and would like to draw histogram on chart window instead of Arrow.

I try this code below and it doesn't work.

Can you help me with that?

Thank you,

HHC


//--- plot sell2
#property indicator_label4  "sell2"
#property indicator_type4   DRAW_HISTOGRAM
#property indicator_color4  clrRed
property indicator_style4  STYLE_SOLID
#property indicator_width4  2
----
   SetIndexBuffer(1,sell2);
 
hhchenfx:

Hi Everyone,

I create an custom indicator and would like to draw histogram on chart window instead of Arrow.

I try this code below and it doesn't work.

Can you help me with that?

Thank you,

HHC


Is this all the code? For one the style property doesn't have # before it. Other possible issues could be how you apply values to the buffer of which we cant know because the code isn't showing that.
Reason: