Navigation´╝ÜHome > Content >

Dynamic_Force_Meter.mq4

Time: 2012-05-15 | Download file:Dynamic_Force_Meter.mq4

#property copyright "All Rights Reserved (C) 2011 Dynamic Force Meter"
#property link      ""
#property strict

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Green
#property indicator_color2 Red

extern string sep1 = "Settings";
extern string sep6 = "------------------------------------";
extern string sep7 = "Message Alert:";
extern bool AlertMessage = TRUE;
extern string sep8 = "------------------------------------";
extern string sep9 = "Email Alert:";
extern bool AlertEmail = TRUE;
double G_ibuf_124[];
double G_ibuf_128[];
double G_ibuf_132[];

// E37F0136AA3FFAF149B351F6A4C948E9
int init() {
   IndicatorBuffers(3);
   SetIndexStyle(0, DRAW_ARROW, STYLE_SOLID, 1);
   SetIndexArrow(0, 233);
   SetIndexBuffer(0, G_ibuf_124);
   SetIndexEmptyValue(0, -1);
   SetIndexStyle(1, DRAW_ARROW, STYLE_SOLID, 1);
   SetIndexArrow(1, 234);
   SetIndexBuffer(1, G_ibuf_128);
   SetIndexEmptyValue(1, -1);
   SetIndexBuffer(2, G_ibuf_132);
   return (0);
}

// EA2B2676C28C0DB26D39331A336C6B92
int start() {
   double Ld_4;
   for (int index_0 = 0; index_0 < Bars; index_0++) {
      G_ibuf_124[index_0] = -1;
      G_ibuf_128[index_0] = -1;
      if (iCustom(Symbol(), 0, "FX Cycle Dominator", 5, 0, index_0) > 12.0 && iCustom(Symbol(), 0, "FX Cycle Dominator", 5, 0, index_0 + 1) < 12.0 && iCustom(Symbol(),
         0, "FX Cycle Dominator", 5, 0, index_0 + 2) > 12.0) G_ibuf_124[index_0] = Low[index_0 + 1] - iATR(Symbol(), 0, 50, 1);
      if (iCustom(Symbol(), 0, "FX Cycle Dominator", 5, 0, index_0) < 88.0 && iCustom(Symbol(), 0, "FX Cycle Dominator", 5, 0, index_0 + 1) > 88.0 && iCustom(Symbol(),
         0, "FX Cycle Dominator", 5, 0, index_0 + 2) < 88.0) G_ibuf_128[index_0] = High[index_0 + 1] + iATR(Symbol(), 0, 50, 1);
      if (iCustom(Symbol(), 0, "FX Cycle Dominator", 15, 0, index_0) > 12.0 && iCustom(Symbol(), 0, "FX Cycle Dominator", 15, 0, index_0 + 1) < 12.0 && iCustom(Symbol(),
         0, "FX Cycle Dominator", 15, 0, index_0 + 2) > 12.0) G_ibuf_124[index_0] = Low[index_0 + 1] - iATR(Symbol(), 0, 50, 1);
      if (iCustom(Symbol(), 0, "FX Cycle Dominator", 15, 0, index_0) < 88.0 && iCustom(Symbol(), 0, "FX Cycle Dominator", 15, 0, index_0 + 1) > 88.0 && iCustom(Symbol(),
         0, "FX Cycle Dominator", 15, 0, index_0 + 2) < 88.0) G_ibuf_128[index_0] = High[index_0 + 1] + iATR(Symbol(), 0, 50, 1);
      if (iCustom(Symbol(), 0, "FX Cycle Dominator", 10, 0, index_0) > 12.0 && iCustom(Symbol(), 0, "FX Cycle Dominator", 10, 0, index_0 + 1) < 12.0 && iCustom(Symbol(),
         0, "FX Cycle Dominator", 10, 0, index_0 + 2) > 12.0) G_ibuf_124[index_0] = Low[index_0 + 1] - iATR(Symbol(), 0, 50, 1);
      if (iCustom(Symbol(), 0, "FX Cycle Dominator", 10, 0, index_0) < 88.0 && iCustom(Symbol(), 0, "FX Cycle Dominator", 10, 0, index_0 + 1) > 88.0 && iCustom(Symbol(),
         0, "FX Cycle Dominator", 10, 0, index_0 + 2) < 88.0) G_ibuf_128[index_0] = High[index_0 + 1] + iATR(Symbol(), 0, 50, 1);
   }
   if (High[0] == Low[0] && High[0] == Close[0] && High[0] == Open[0]) {
      if (G_ibuf_124[1] != -1.0) {
         Ld_4 = High[iHighest(Symbol(), 0, MODE_HIGH, 3, 0)] + 5.0 * Point;
         if (AlertMessage) Alert("Dynamic Force Meter (R): Long Signal on " + Symbol() + " [" + Period() + "], Stop Loss at " + Ld_4);
         if (AlertEmail) SendMail("Dynamic Force Meter (R) Signal", "Dynamic Force Meter (R): Long Signal on " + Symbol() + " [" + Period() + "], Stop Loss at " + Ld_4);
      }
      if (G_ibuf_128[1] != -1.0) {
         Ld_4 = Low[iLowest(Symbol(), 0, MODE_LOW, 3, 0)] - 5.0 * Point;
         if (AlertMessage) Alert("Dynamic Force Meter (R): Short Signal on " + Symbol() + " [" + Period() + "], Stop Loss at " + Ld_4);
         if (AlertEmail) SendMail("Dynamic Force Meter (R) Signal", "Dynamic Force Meter (R): Short Signal on " + Symbol() + " [" + Period() + "], Stop Loss at " + Ld_4);
      }
   }
   return (0);
}

Recommend