跳至内容

IndicatorDigits

IndicatorDigits

设置精度格式(小数点后的数字位数)以可视化指标值。

void  IndicatorDigits(
   int     digits         // digits
   );

参数

digits

[in] 精度格式,小数点后的数字位数。

返回值

无。

注意

默认使用符号价格的精度,指标附属于此符号图表。

示例:

int init()
  {
//---- 2 additional buffers are used for counting.
   IndicatorBuffers(3);
//---- setting of drawing parameters
   SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,3);
   SetIndexDrawBegin(0,SignalSMA);
   IndicatorDigits(Digits+2);
//---- 3 allocated buffers of an indicator
   SetIndexBuffer(0,ind_buffer1);
   SetIndexBuffer(1,ind_buffer2);
   SetIndexBuffer(2,ind_buffer3);
//---- "short name" for DataWindow and indicator subwindow
   IndicatorShortName("OsMA("+FastEMA+","+SlowEMA+","+SignalSMA+")");
//---- initialization done
   return(0);
  }

另请参阅

自定义指标属性

最后更新于