跳至内容

SetIndexEmptyValue

SetIndexEmptyValue

设置绘图线的空值。

void  SetIndexEmptyValue(
   int     index,       // line index
   double  value        // new "empty value"
   );

参数

index

[in] 行索引。必须在0到7之间。

value

[in] 新的“空”值。

返回值

无。

注意

空值不会在DataWindow中绘制或显示。默认情况下,空值为EMPTY_VALUE。

示例:

int init()
  {
//---- 2 allocated indicator buffers
    SetIndexBuffer(0,ExtUppperBuffer);
    SetIndexBuffer(1,ExtLowerBuffer);
//---- drawing parameters setting
    SetIndexStyle(0,DRAW_ARROW);
    SetIndexArrow(0,217);
    SetIndexStyle(1,DRAW_ARROW);
    SetIndexArrow(1,218);
//---- 0 value will not be displayed
    SetIndexEmptyValue(0,0.0);
    SetIndexEmptyValue(1,0.0);
//---- displaying in DataWindow
    SetIndexLabel(0,"Fractal Up");
    SetIndexLabel(1,"Fractal Down");
//---- initialization done
   return(0);
  }

参见

自定义指示符属性

最后更新于