有您的持续关注
我们会做得更好

指标Vertical Line创建竖线标识K线的指定平移



Vertical Line指标可以将主图中相对当前K线的某个平移用竖线标记。K线的平移规则为当前为0,上一根为1,依次往后。Place_Line_Bars_Back=10参数为10就是从当前K线为0在往后面数第10根K线。

Vertical Line指标图表效果:Vertical Line指标Vertical Line指标源码:

//+------------------------------------------------------------------+
//|                                                Vertical Line.mq4 |
//|                              Copyright @2006, fxid10t@yahoo.com |
//|                               http://www.forexprogramtrading.com |
//+------------------------------------------------------------------+
#property copyright "Copyright @2006, fxid10t@yahoo.com"
#property link      "http://www.125808047.com"
#property indicator_chart_window

extern int Place_Line_Bars_Back=10;
extern color Line_Color=Orange;
extern int Line_Style=1;
extern int Line_Width=1;
extern bool Draw_as_Background=true;

int init(){return(0);}
int deinit(){ObjectDelete("V-Line"); return(0);}
int start(){
ObjectDelete("V-Line");
ObjectCreate("V-Line",OBJ_VLINE,0,Time[Place_Line_Bars_Back],Bid);
ObjectSet("V-Line",OBJPROP_COLOR,Line_Color);
ObjectSet("V-Line",OBJPROP_STYLE,Line_Style);
ObjectSet("V-Line",OBJPROP_WIDTH,Line_Width);
ObjectSet("V-Line",OBJPROP_BACK,Draw_as_Background);
return(0);}
//+------------------------------------------------------------------+

如您喜欢此文章请点下面分享按钮↴峰汇在线 » 指标Vertical Line创建竖线标识K线的指定平移
上一篇:
下一篇:
分享到:更多 ()