请教一个技术指标问题,关于下标取值 新评论 xixi0925 2020.11.03 07:50 void OnInit() { //--- indicator buffers mapping SetIndexBuffer(0,ExtAOBuffer,INDICATOR_DATA); SetIndexBuffer(1,ExtColorBuffer,INDICATOR_COLOR_INDEX); SetIndexBuffer(2,ColorArrowBuffer,INDICATOR_DATA); SetIndexBuffer(3,ColorArrowColors,INDICATOR_COLOR_INDEX); SetIndexBuffer(4,ExtFastBuffer,INDICATOR_CALCULATIONS); SetIndexBuffer(5,ExtSlowBuffer,INDICATOR_CALCULATIONS); //--- sets first bar from what index will be drawn PlotIndexSetInteger(0,PLOT_DRAW_BEGIN,33); //--- 定义PLOT_ARROW绘制的符号代码 PlotIndexSetInteger(2,PLOT_ARROW,147); PlotIndexSetInteger(2,PLOT_ARROW_SHIFT,5); //--- 设置空值为 0 //PlotIndexSetDouble(2,PLOT_EMPTY_VALUE,0); //PlotIndexSetInteger(2,PLOT_LINE_WIDTH,4); 问题: //--- 定义PLOT_ARROW绘制的符号代码 PlotIndexSetInteger(2,PLOT_ARROW,147); PlotIndexSetInteger(2,PLOT_ARROW_SHIFT,5); 没生效,一直是默认值,plot_index 下标应该指向什么?还是访问顺序有问题? 新人对MQL4和MQL5的任何问题,对算法和代码的帮助和讨论 求高手编写mt5的三线kdj指标,非常感谢~ (HELP) Fractals Ziheng Zhuang 2020.11.04 04:36 #1 xixi0925: 问题: //--- 定义PLOT_ARROW绘制的符号代码 PlotIndexSetInteger(2,PLOT_ARROW,147); PlotIndexSetInteger(2,PLOT_ARROW_SHIFT,5); 没生效,一直是默认值,plot_index 下标应该指向什么?还是访问顺序有问题? plot_index 就是指标buffer的索引。 从你代码片段看不出什么问题。 新评论
//PlotIndexSetInteger(2,PLOT_LINE_WIDTH,4);
问题:
没生效,一直是默认值,plot_index 下标应该指向什么?还是访问顺序有问题?