14评论

0收藏

求大神帮修一下

avatar gyygy | 2362 人阅读 | 14 人评论 | 2018-06-05

/*
   Generated by ex4-to-mq4 decompiler (forex-warez.com) 4.0.509.5
   Website: WW w .FO R E x- W A Rez. c oM
   E-mail :  AnD R EY B B R v@ GMa iL . co M
*/
#property copyright "Copyright ?2011, Leandro Farias (Dr. Alexander Elder AutoEnvelope based)"
#property link      "http://www.metaquotes.net"

#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 Blue
#property indicator_color2 Red
#property indicator_color3 White
#property indicator_color4 Yellow

extern int mme_periodo = 26;
extern int mme2_periodo = 13;
extern int stdev_periodo = 60;
extern int band_mme = 200;
int Gi_92;
int Gi_96;
int Gi_100;
double Gda_104[];
double Gda_108[];
double Gda_112[];
double Gda_116[];

// E37F0136AA3FFAF149B351F6A4C948E9
int init() {
   SetIndexBuffer(0, Gda_104);
   SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 2);
   SetIndexBuffer(1, Gda_108);
   SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 2);
   SetIndexBuffer(2, Gda_112);
   SetIndexStyle(2, DRAW_LINE, STYLE_SOLID, 2);
   SetIndexBuffer(3, Gda_116);
   SetIndexStyle(3, DRAW_LINE, STYLE_SOLID, 2);
   f0_0("信息栏1", "AutoEnvelope 包络线与均线系统", 20, 20, 11, "微软雅黑", Yellow);
   f0_0("信息栏2", "======================================", 20, 35, 8, "Arial", White);
   f0_0("信息栏3", "买入信号区", 20, 50, 9, "Arial", DeepSkyBlue);
   f0_0("信息栏4", "---------------", 20, 60, 8, "Arial", White);
   f0_0("信息栏6", "======================================", 20, 135, 8, "Arial", White);
   f0_0("信息栏7", "卖出信号区", 20, 150, 9, "Arial", Orange);
   f0_0("信息栏8", "---------------", 20, 160, 8, "Arial", White);
   f0_0("信息栏10", "=====================================", 20, 235, 8, "Arial", White);
   f0_0("信息栏11", "交易规则-1", 20, 250, 9, "Arial", Pink);
   f0_0("信息栏12", "---------------", 20, 260, 8, "Arial", White);
   f0_0("信息栏13", "黄线上穿白线买入   黄线下穿白线卖出", 20, 275, 9, "Arial", DeepPink);
   f0_0("信息栏14", "上下包络线为止盈止损位", 20, 290, 9, "Arial", DeepPink);
   f0_0("信息栏15", "交易规则-2", 20, 310, 9, "Arial", Pink);
   f0_0("信息栏16", "---------------", 20, 320, 8, "Arial", White);
   f0_0("信息栏17", "当包络线倾斜度小于30度时(盘整时)", 20, 335, 9, "Arial", DeepPink);
   f0_0("信息栏18", "价格在红线则买入 在蓝线则卖出", 20, 350, 9, "Arial", DeepPink);
   f0_0("信息栏19", "其他", 20, 370, 9, "Arial", Pink);
   f0_0("信息栏20", "---------------", 20, 380, 8, "Arial", White);
   f0_0("信息栏21", "买卖时,交叉处与上或下包络线", 20, 395, 9, "Arial", DeepPink);
   f0_0("信息栏22", "的1、2、3倍有特殊关系", 20, 410, 9, "Arial", DeepPink);
   f0_0("信息栏23", "=====================================", 20, 425, 8, "Arial", White);
   return (0);
}

// 52D46093050F38C27267BCE42543EF60
int deinit() {
   ObjectsDeleteAll();
   return (0);
}

// EA2B2676C28C0DB26D39331A336C6B92
int start() {
   double Ld_16;
   double Ld_24;
   double Ld_32;
   int Li_0 = IndicatorCounted();
   int Li_8 = 0;
   int Li_12 = Bars - mme_periodo;
   double Ld_40 = 2.0 / (band_mme + 1);
   int Li_4 = Li_12;
   while (Li_4 > -1) {
      Ld_16 = iStdDev(NULL, 0, stdev_periodo, 0, MODE_EMA, PRICE_CLOSE, Li_4);
      if (Li_8 == 0) Ld_32 = Ld_16;
      else Ld_32 = Ld_24;
      Ld_24 = Ld_16 * Ld_40 + Ld_32 * (1 - Ld_40);
      Gda_112[Li_4] = iMA(NULL, 0, mme_periodo, 0, MODE_EMA, PRICE_CLOSE, Li_4);
      if (mme2_periodo > 0) Gda_116[Li_4] = iMA(NULL, 0, mme2_periodo, 0, MODE_EMA, PRICE_CLOSE, Li_4);
      Gda_104[Li_4] = Gda_112[Li_4] * (Ld_24 / Gda_112[Li_4] + 1.0);
      Gda_108[Li_4] = Gda_112[Li_4] * (1 - Ld_24 / Gda_112[Li_4]);
      if (Gda_112[0] < Gda_116[0] && Gda_112[1] > Gda_116[1]) {
         Gi_92 = TimeCurrent();
         f0_0("信息栏5", "    买入!", 20, 75, 35, "微软雅黑", Aqua);
      }
      if (Gda_112[0] > Gda_116[0] && Gda_112[1] < Gda_116[1]) {
         Gi_92 = TimeCurrent();
         f0_0("信息栏9", "    卖出!", 20, 175, 35, "微软雅黑", Red);
      }
      Li_4--;
      Li_8++;
   }
   Gi_96 = TimeCurrent();
   Gi_100 = Gi_92 + 2;
   if (Gi_96 > Gi_100) {
      ObjectDelete("信息栏5");
      ObjectDelete("信息栏9");
   }
   return (0);
}

// AE96998A6603E29561325BEF9967C4B7
void f0_0(string As_0, string As_8, int Ai_16, int Ai_20, int Ai_24, string As_28, color Ai_36) {
   ObjectCreate(As_0, OBJ_LABEL, 0, 0, 0);
   ObjectSetText(As_0, As_8, Ai_24, As_28, Ai_36);
   ObjectSet(As_0, OBJPROP_XDISTANCE, Ai_16);
   ObjectSet(As_0, OBJPROP_YDISTANCE, Ai_20);
}


""
还没有人打赏,支持一下

评论|共 14 个

last1angel

发表于 2018-6-5 21:55:05 | 显示全部楼层

可以正常使用的呢
EURUSDM1.png

燕子李三

发表于 2020-3-19 19:37:44 | 显示全部楼层

难得一见的好帖

小黄豆

发表于 2020-6-29 15:20:34 | 显示全部楼层

沙发!沙发!

acttianshi

发表于 2020-7-4 13:12:00 | 显示全部楼层

谢谢楼主分享

沉瀹慧子

发表于 2020-7-14 19:47:54 | 显示全部楼层

谢谢楼主分享

揭秘黑幕

发表于 2020-8-6 11:48:32 | 显示全部楼层

学习了,不错

高帆豪

发表于 2020-8-26 11:33:32 | 显示全部楼层

帮你顶下哈!!

幽忧

发表于 2020-11-8 10:00:35 | 显示全部楼层

顶下

mrf1093363

发表于 2021-7-4 20:36:59 | 显示全部楼层

谢谢

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

EA之家评论守则