新手入门教程 发表于 2026-1-26 16:01:53

SetIndexShift( )【自定义外汇MT4指标篇-MQL4函数】

SetIndexShift( )【自定义外汇MT4指标篇-MQL4函数】
void SetIndexShift( int index, int shift)
撤销画线设置。对于仓位值,画线将会平移到右侧或是平移到左侧。在当前柱计算值将被平移到相应的柱。

参数:
index   -   索引线。必须在0至7之间。
shift   -   平移植。

示例:

//+------------------------------------------------------------------+
//| Alligator initialization function                              |
//+------------------------------------------------------------------+
int init()
{
//----当画出时线平移
   SetIndexShift(0,JawsShift);
   SetIndexShift(1,TeethShift);
   SetIndexShift(2,LipsShift);
//---- 当画出时越过地一个位置
   SetIndexDrawBegin(0,JawsShift+JawsPeriod);
   SetIndexDrawBegin(1,TeethShift+TeethPeriod);
   SetIndexDrawBegin(2,LipsShift+LipsPeriod);
//---- 绘制3个添加缓冲位置
   SetIndexBuffer(0,ExtBlueBuffer);
   SetIndexBuffer(1,ExtRedBuffer);
   SetIndexBuffer(2,ExtLimeBuffer);
//---- 画出设定
   SetIndexStyle(0,DRAW_LINE);
   SetIndexStyle(1,DRAW_LINE);
   SetIndexStyle(2,DRAW_LINE);
//---- 索引标签
   SetIndexLabel(0,"Gator Jaws");
   SetIndexLabel(1,"Gator Teeth");
   SetIndexLabel(2,"Gator Lips");
//---- 初始化完成
   return(0);
}


大家在看了小编以上对"SetIndexShift( )【自定义外汇MT4指标篇-MQL4函数】"的介绍后应该都清楚了吧,希望对大家做单有所帮助。如果大家还想要下载更多有关"SetIndexShift( )【自定义外汇MT4指标篇-MQL4函数】"的相关EA源码,敬请关注汇探网下载。我们会持续更新交易系统,EA源码。
页: [1]
查看完整版本: SetIndexShift( )【自定义外汇MT4指标篇-MQL4函数】