26评论

1收藏

3均线指标实例源码【图】

avatar 炒他妈的外汇 | 6726 人阅读 | 26 人评论 | 2011-10-01


  • //+------------------------------------------------------------------+
  • //| 3均线.mq4 |
  • //| Copyright ?2007, 520FX Corp. |
  • //| http://www.520fx.com |
  • //+------------------------------------------------------------------+
  • #property copyright \"Copyright ?2007, 520FX Corp.\"
  • #property link \"http://www.520fx.com\"

  • #property indicator_chart_window
  • #property indicator_buffers 3
  • #property indicator_color1 Yellow
  • #property indicator_color2 Green
  • #property indicator_color3 Red

  • extern int MaPeriod=5;
  • double Ma1[],Ma2[],Ma3[];
  • //+------------------------------------------------------------------+
  • //| Custom indicator initialization function |
  • //+------------------------------------------------------------------+
  • int init()
  • {
  • IndicatorBuffers(3);
  • SetIndexStyle(0,DRAW_LINE);
  • SetIndexStyle(1,DRAW_LINE);
  • SetIndexStyle(2,DRAW_LINE);
  • SetIndexBuffer(0,Ma1);
  • SetIndexBuffer(1,Ma2);
  • SetIndexBuffer(2,Ma3);
  • return(0);
  • }

  • int start()
  • {
  • int i;
  • int limit;
  • int counted_bars=IndicatorCounted();
  • if(counted_bars0) counted_bars--;
  • limit=Bars-counted_bars;
  • for (i=limit-1;i>=0;i--)
  • {
  • Ma1=iMA(NULL,0,MaPeriod,0,MODE_EMA,PRICE_HIGH,i);
  • Ma2=iMA(NULL,0,MaPeriod,0,MODE_EMA,PRICE_LOW,i);
  • Ma3=iMA(NULL,0,MaPeriod,0,MODE_EMA,PRICE_WEIGHTED,i);
  • }
  • return(0);
  • }
  • //------------------------------------------------------------

复制代码
""
还没有人打赏,支持一下

评论|共 26 个

lramr

发表于 2012-11-22 00:28:10 | 显示全部楼层

天啊.  

hate

发表于 2012-11-22 00:28:10 | 显示全部楼层

一楼的位置好啊..  

lramr

发表于 2012-11-22 00:28:10 | 显示全部楼层

唉,悲催的外汇。。  

爻爻

发表于 2012-11-22 00:28:10 | 显示全部楼层

给推荐一个好的平台,这样EA才能很好的发挥啊  

姐想赚钱

发表于 2012-11-22 00:28:10 | 显示全部楼层

你还想说什么啊....  

我爱sqq

发表于 2012-11-22 00:28:10 | 显示全部楼层

朕要休息了..............  

操盘手

发表于 2012-11-22 00:28:10 | 显示全部楼层

我有个群,大家一起来讨论EA.  

madydela07

发表于 2012-11-22 00:28:10 | 显示全部楼层

加油啊!!!!顶哦!!!!!  

yzopqjam

发表于 2012-11-22 00:28:10 | 显示全部楼层

经过你的指点 我还是没找到在哪 ~~~  

123下一页
您需要登录后才可以回帖 登录 | 注册 微信登录

EA之家评论守则