外汇论坛 外兔财经

开启左侧

请问这个简单的公式为什么在MT4上显示不了

[复制链接]
发表于 2010-2-21 23:47 | 显示全部楼层 |阅读模式
https://www.y2cn.com
#property copyright "ABC"
#property link      ""
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 White

double jlone[];
double jltwo[];
double jloverall[];
extern int one=  5;
extern int two=  10;

int i=1;
int init()
  {

   SetIndexBuffer(0,jloverall);
   SetIndexStyle(0,DRAW_LINE);
   SetIndexDrawBegin(0,1);

   return(0);
  }

int start()
  {
int limit=Bars-IndicatorCounted();
while(i<limit)
{
jlone[i]=  iMA(NULL,0,one  ,0,MODE_SMA,PRICE_CLOSE,i) ;

jltwo[i]=  iMA(NULL,0,two  ,0,MODE_SMA,PRICE_CLOSE,i) ;

if(jlone[i]-jltwo[i]>0.0000)

{jloverall[i]=0.0005;}
else{jloverall[i]=-0.0005;}
i++;
}
   return(0);
  }
这个只是希望5日均线大于10日均线时显示1,小于时显示0,但编译后在MT4上什么线都画不出来,请高手帮忙看看哪里需要修改,多谢!!!
发表于 2010-4-21 21:08 | 显示全部楼层
支持一下!!呵呵,不错
发表于 2010-4-22 07:48 | 显示全部楼层
谢谢......终于顶进了!!!
发表于 2010-8-16 18:18 | 显示全部楼层
发表于 2011-10-29 17:22 | 显示全部楼层

本版积分规则

QQ|手机版 Mobile Version|Archiver|关于我们 About Us|联系我们 Contact Us|Y2外汇论坛 外兔财经

GMT+8, 2024-4-28 08:47 , Processed in 0.049378 second(s), 23 queries .

Powered by Discuz! X7.2

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表