How to set value at indicator short name?

 

Hello,

I build an indicator that display on seperate window, but the value not display at indicator short name.

Anyone know how to set or show value at there?

My code here:

#property indicator_separate_window
#property indicator_buffers 2
#property indicator_plots   2
...
//--- plot up
#property indicator_label1  "up"
#property indicator_type1   DRAW_HISTOGRAM
#property indicator_color1  clrAqua
#property indicator_style1  STYLE_SOLID
#property indicator_width1  1
//--- plot dn
#property indicator_label2  "dn"
#property indicator_type2   DRAW_HISTOGRAM
#property indicator_color2  clrRed
#property indicator_style2  STYLE_SOLID
#property indicator_width2  1
//--- indicator buffers
double         upBuffer[];
double         dnBuffer[];

and init:

int OnInit()
{
//--- indicator buffers mapping
   SetIndexBuffer(0,upBuffer,INDICATOR_DATA); 
   SetIndexBuffer(1,dnBuffer,INDICATOR_DATA);
   IndicatorSetInteger(INDICATOR_DIGITS,_Digits);
//---
   return(INIT_SUCCEEDED);
}

Thanks!

 
Minh Truong Pham: , but the value not display at indicator short name.

Your question was answered by the automatic linking: indicator short name

 
William Roeder #:

Your question was answered by the automatic linking: indicator short name

Hello sir, thank for your anwser. But still not success.

Please let me know what command set this value. 

 

In image, I want to set like MACD did, but i'm not success. 

Thank you!

 
Minh Truong Pham #:

Hello sir, thank for your anwser. But still not success.

Please let me know what command set this value. 

 

In image, I want to set like MACD did, but i'm not success. 

Thank you!

You are referring to the automated value readings of the indicators buffers. You cannot change them, only supply valid values.
 

Check what the actual values are (you can print last candle's values in OnCalculate or CopyBuffer from another EA/script), if you are using 5 digits and they have more zeros (for instance 0.0000005) they get rounded. You could multiply both of your plots by 100, 1000, etc. to scale the result so it shows (and maybe you need to modify other calculations, but I can't tell without seeing them, if the plots don't change visually you probably don't need to do anything else)

You can also set the digits to 8 or more
 

Thank to helping me,

It just show today without change code :D.

Don't know why