坑傻的 发表于 2016-12-26 12:06:20

{求助}提醒不断重复


/*
   Generated by EX4-TO-MQ4 decompiler V4.0.224.1 []
   Website: http://purebeam.biz
   E-mail : purebeam@gmail.com
*/

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 DeepPink
#property indicator_color2 DodgerBlue

double g_ibuf_76[];
double g_ibuf_80[];
extern bool VoiceAlert = FALSE;

int init() {
   ObjectCreate("June", OBJ_LABEL, 0, 0, 0);
   ObjectSet("June", OBJPROP_CORNER, 4);
   ObjectSet("June", OBJPROP_XDISTANCE, 0);
   ObjectSet("June", OBJPROP_YDISTANCE, 15);
   ObjectSet("June", OBJPROP_BACK, TRUE);
   ObjectSetText("June", "      ", 14, "Verdana", Lime);
   SetIndexStyle(0, DRAW_ARROW, EMPTY, 2);
   SetIndexArrow(0, 104);
   SetIndexBuffer(0, g_ibuf_76);
   SetIndexStyle(1, DRAW_ARROW, EMPTY, 2);
   SetIndexArrow(1, 104);
   SetIndexBuffer(1, g_ibuf_80);
   return (0);
}

int deinit() {
   return (0);
}

int start() {
   int li_0;
   double l_ima_4;
   double l_ima_12;
   double l_ima_20;
   double l_ima_28;
   double l_ima_36;
   double l_ima_44;
   double l_ima_52;
   double l_ima_60;
   double ld_68;
   double ld_76;
   int li_84 = IndicatorCounted();
   if (li_84 < 0) return (-1);
   if (li_84 > 0) li_84--;
   int li_88 = Bars - li_84;
   for (int li_92 = 0; li_92 <= li_88; li_92++) {
      li_0 = li_92;
      ld_68 = 0;
      ld_76 = 0;
      for (li_0 = li_92; li_0 <= li_92 + 9; li_0++) ld_76 += MathAbs(High - Low);
      ld_68 = ld_76 / 10.0;
      l_ima_4 = iMA(NULL, 0, 14, 0, MODE_LWMA, PRICE_MEDIAN, li_92);
      l_ima_12 = iMA(NULL, 0, 55, 0, MODE_LWMA, PRICE_MEDIAN, li_92);
      l_ima_20 = iMA(NULL, 0, 1, 0, MODE_LWMA, PRICE_CLOSE, li_92);
      l_ima_36 = iMA(NULL, 0, 3, 0, MODE_LWMA, PRICE_CLOSE, li_92 + 1);
      l_ima_52 = iMA(NULL, 0, 3, 0, MODE_LWMA, PRICE_CLOSE, li_92 - 1);
      l_ima_28 = iMA(NULL, 0, 5, 0, MODE_LWMA, PRICE_OPEN, li_92);
      l_ima_44 = iMA(NULL, 0, 5, 0, MODE_LWMA, PRICE_OPEN, li_92 + 1);
      l_ima_60 = iMA(NULL, 0, 5, 0, MODE_LWMA, PRICE_OPEN, li_92 - 1);
      if ((High + Low) / 2.0 < l_ima_12 && (High + Low) / 2.0 < l_ima_4 && l_ima_20 > l_ima_28 && l_ima_36 < l_ima_44 && l_ima_52 > l_ima_60) {
         g_ibuf_76 = Low - ld_68 / 2.0;
         if (VoiceAlert == TRUE) Alert("Moving Average has crossed up");
      } else {
         if ((High + Low) / 2.0 > l_ima_12 && (High + Low) / 2.0 > l_ima_4 && l_ima_20 < l_ima_28 && l_ima_36 > l_ima_44 && l_ima_52 < l_ima_60) {
            g_ibuf_80 = High + ld_68 / 2.0;
            if (VoiceAlert == TRUE) Alert("Moving Average has crossed down");
         }
      }
   }
   return (0);
}

提醒按钮开了就无限提醒,为什么这样啊

ssvlq 发表于 2018-9-22 16:42:34

楼主辛苦了

uvrgbrej 发表于 2020-6-26 17:39:34

好好 学习了 确实不错

obukwyaf 发表于 2020-7-3 11:18:22

学习了,不错,讲的太有道理了

dreeg 发表于 2020-7-13 18:43:42

学习了,不错

mrli 发表于 2020-8-2 12:30:50

学习了,不错

卢苏 发表于 2020-8-6 14:22:31

学习了,不错

raul 发表于 2020-8-7 19:53:07

帮你顶下哈!!

waihui 发表于 2021-7-4 12:08:52

{:1_181:}

bitsoftware 发表于 2021-7-19 23:17:52

谢谢
页: [1] 2
查看完整版本: {求助}提醒不断重复