void SetIndexLabel( int index, string text)
在DataWindow 和tooltip中设置图画线描述。
参数:
index - 索引线。必须在0至7之间。
text - 标签文本。 NULL 表示索引值在DataWindow不显示。
示例:
- //+------------------------------------------------------------------+
- //| Ichimoku Kinko Hyo initialization function |
- //+------------------------------------------------------------------+
- int init()
- {
- //----
- SetIndexStyle(0,DRAW_LINE);
- SetIndexBuffer(0,Tenkan_Buffer);
- SetIndexDrawBegin(0,Tenkan-1);
- SetIndexLabel(0,"Tenkan Sen");
- //----
- SetIndexStyle(1,DRAW_LINE);
- SetIndexBuffer(1,Kijun_Buffer);
- SetIndexDrawBegin(1,Kijun-1);
- SetIndexLabel(1,"Kijun Sen");
- //----
- a_begin=Kijun; if(a_begin<Tenkan) a_begin=Tenkan;
- SetIndexStyle(2,DRAW_HISTOGRAM,STYLE_DOT);
- SetIndexBuffer(2,SpanA_Buffer);
- SetIndexDrawBegin(2,Kijun+a_begin-1);
- SetIndexShift(2,Kijun);
- //---- 在DataWindow窗口Up Kumo线不显示
- SetIndexLabel(2,NULL);
- SetIndexStyle(5,DRAW_LINE,STYLE_DOT);
- SetIndexBuffer(5,SpanA2_Buffer);
- SetIndexDrawBegin(5,Kijun+a_begin-1);
- SetIndexShift(5,Kijun);
- SetIndexLabel(5,"Senkou Span A");
- //----
- SetIndexStyle(3,DRAW_HISTOGRAM,STYLE_DOT);
- SetIndexBuffer(3,SpanB_Buffer);
- SetIndexDrawBegin(3,Kijun+Senkou-1);
- SetIndexShift(3,Kijun);
- //---- 在DataWindow窗口Down Kumo 线不显示
- SetIndexLabel(3,NULL);
- //----
- SetIndexStyle(6,DRAW_LINE,STYLE_DOT);
- SetIndexBuffer(6,SpanB2_Buffer);
- SetIndexDrawBegin(6,Kijun+Senkou-1);
- SetIndexShift(6,Kijun);
- SetIndexLabel(6,"Senkou Span B");
- //----
- SetIndexStyle(4,DRAW_LINE);
- SetIndexBuffer(4,Chinkou_Buffer);
- SetIndexShift(4,-Kijun);
- SetIndexLabel(4,"Chinkou Span");
- //----
- return(0);
- }
复制代码
|