weixin_45248930 2019-08-15 10:29 采纳率: 0%
浏览 274

这个MT4指标6条均线变14条均线代码哪里出问题了?

我不太懂编写技术,但是想要改一下,于是网上下载了6条均线的顾比,想要改成14条的,结果添加的那一部分内容就是不显示,改编之后的源码发上来,请教各位专家,哪里出错了?

#property indicator_chart_window
#property indicator_buffers 14
#property indicator_color1 Red
#property indicator_color2 Red
#property indicator_color3 Red
#property indicator_color4 Red
#property indicator_color5 Red
#property indicator_color6 Red
#property indicator_color7 Red
#property indicator_color8 Blue
#property indicator_color9 Blue
#property indicator_color10 Blue
#property indicator_color11 Blue
#property indicator_color12 Blue
#property indicator_color13 Blue
#property indicator_color14 Blue
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double ExtMapBuffer5[];
double ExtMapBuffer6[];
double ExtMapBuffer7[];
double ExtMapBuffer8[];
double ExtMapBuffer9[];
double ExtMapBuffer10[];
double ExtMapBuffer11[];
double ExtMapBuffer12[];
double ExtMapBuffer13[];
double ExtMapBuffer14[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(2,DRAW_LINE);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(3,DRAW_LINE);
SetIndexBuffer(3,ExtMapBuffer4);
SetIndexStyle(4,DRAW_LINE);
SetIndexBuffer(4,ExtMapBuffer5);
SetIndexStyle(5,DRAW_LINE);
SetIndexBuffer(5,ExtMapBuffer6);
SetIndexStyle(6,DRAW_LINE);
SetIndexBuffer(6,ExtMapBuffer7);
SetIndexStyle(7,DRAW_LINE);
SetIndexBuffer(7,ExtMapBuffer8);
SetIndexStyle(8,DRAW_LINE);
SetIndexBuffer(8,ExtMapBuffer9);
SetIndexStyle(9,DRAW_LINE);
SetIndexBuffer(9,ExtMapBuffer10);
SetIndexStyle(10,DRAW_LINE);
SetIndexBuffer(10,ExtMapBuffer11);
SetIndexStyle(11,DRAW_LINE);
SetIndexBuffer(11,ExtMapBuffer12);

SetIndexStyle(12,DRAW_LINE);
SetIndexBuffer(12,ExtMapBuffer13);
SetIndexStyle(13,DRAW_LINE);
SetIndexBuffer(13,ExtMapBuffer14);

//----
return(0);
}

int deinit()
{
return(0);
}

int start()
{
int i,j,limit,counted_bars=IndicatorCounted();

if(counted_bars if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;

for(i=0; i<limit; i++){
ExtMapBuffer1[i]=iMA(NULL,0,12,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer2[i]=iMA(NULL,0,13,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer3[i]=iMA(NULL,0,14,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer4[i]=iMA(NULL,0,15,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer5[i]=iMA(NULL,0,16,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer6[i]=iMA(NULL,0,17,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer1[i]=iMA(NULL,0,18,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer2[i]=iMA(NULL,0,21,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer3[i]=iMA(NULL,0,22,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer4[i]=iMA(NULL,0,23,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer5[i]=iMA(NULL,0,24,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer6[i]=iMA(NULL,0,25,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer1[i]=iMA(NULL,0,26,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer2[i]=iMA(NULL,0,27,0,MODE_EMA,PRICE_CLOSE,i);

}

return(0);
}
//+------------------------------------------------------------------+

  • 写回答

1条回答 默认 最新

  • zqbnqsdsmd 2019-08-15 10:32
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误