Future Candles~





/*
   Generated by EX4-TO-MQ4 decompiler V4.0.220.2c []
   Website: http://purebeam.biz
   E-mail : purebeam@gmail.com
*/
#property copyright "Copyright © 2008, Forex Prestige™ Software Ltd."
#property link      "http://www.forex-prestige.myxosting.ru"

#property indicator_chart_window
#property indicator_buffers 6
#property indicator_color1 Aqua
#property indicator_color2 Aqua
#property indicator_color3 Aqua
#property indicator_color4 Aqua
#property indicator_color5 White
#property indicator_color6 Black

double g_ibuf_76[];
double g_ibuf_80[];
double g_ibuf_84[];
double g_ibuf_88[];
double g_ibuf_92[];
double g_ibuf_96[];
extern color CandleBody = Aqua;
extern color BullCandle = Black;
extern color BearCandle = White;
extern bool IndicatorNameView = FALSE;

int init() {
   SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID, 1, CandleBody);
   SetIndexBuffer(0, g_ibuf_76);
   SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 1, CandleBody);
   SetIndexBuffer(1, g_ibuf_80);
   SetIndexStyle(2, DRAW_HISTOGRAM, STYLE_SOLID, 3, CandleBody);
   SetIndexBuffer(2, g_ibuf_84);
   SetIndexStyle(3, DRAW_HISTOGRAM, STYLE_SOLID, 3, CandleBody);
   SetIndexBuffer(3, g_ibuf_88);
   SetIndexStyle(4, DRAW_HISTOGRAM, STYLE_SOLID, 2, BearCandle);
   SetIndexBuffer(4, g_ibuf_92);
   SetIndexStyle(5, DRAW_HISTOGRAM, STYLE_SOLID, 2, BullCandle);
   SetIndexBuffer(5, g_ibuf_96);
   SetIndexBuffer(0, g_ibuf_76);
   SetIndexBuffer(1, g_ibuf_80);
   SetIndexBuffer(2, g_ibuf_84);
   SetIndexBuffer(3, g_ibuf_88);
   SetIndexBuffer(4, g_ibuf_92);
   SetIndexBuffer(5, g_ibuf_96);
   SetIndexShift(0, 15);
   SetIndexShift(1, 15);
   SetIndexShift(2, 15);
   SetIndexShift(3, 15);
   SetIndexShift(4, 15);
   SetIndexShift(5, 15);
   return (0);
}

int deinit() {
   ObjectDelete("Label_XObject1");
   return (0);
}

int start() {
   double ld_8;
   double ld_16;
   double ld_24;
   double ld_32;
   double ld_40;
   double ld_48;
   double l_close_56;
   double ld_64;
   double ld_72;
   if (IndicatorNameView == TRUE) {
      ObjectCreate("Label_XObject1", OBJ_LABEL, 0, 0, 0);
      ObjectSet("Label_XObject1", OBJPROP_XDISTANCE, 230);
      ObjectSet("Label_XObject1", OBJPROP_YDISTANCE, 2);
      ObjectSetText("Label_XObject1", "Future Candles Pro™", 10, "System", CandleBody);
   }
   int l_ind_counted_0 = IndicatorCounted();
   int li_4 = 14;
   double ld_112 = 0;
   double ld_120 = 0;
   double ld_128 = 0;
   double ld_136 = 0;
   double ld_144 = 0;
   for (int li_152 = 14; li_152 >= 0; li_152--) {
      l_close_56 = Close[li_152];
      ld_128 += l_close_56;
   }
   ld_128 /= 15.0;
   for (li_152 = 3; li_152 >= 0; li_152--) {
      l_close_56 = Close[li_152];
      ld_144 += l_close_56;
   }
   ld_144 /= 4.0;
   ld_136 = ld_144;
   while (li_4 >= 1) {
      ld_8 = High[li_4];
      if (ld_136 < ld_8) {
         ld_112 = ld_8 - ld_136;
         ld_8 = ld_136 - ld_112;
      } else {
         ld_112 = ld_136 - ld_8;
         ld_8 = ld_136 + ld_112;
      }
      ld_16 = Low[li_4];
      if (ld_136 < ld_16) {
         ld_112 = ld_16 - ld_136;
         ld_16 = ld_136 - ld_112;
      } else {
         ld_112 = ld_136 - ld_16;
         ld_16 = ld_136 + ld_112;
      }
      ld_32 = Close[li_4];
      if (ld_136 < ld_32) {
         ld_112 = ld_32 - ld_136;
         ld_32 = ld_136 - ld_112;
      } else {
         ld_112 = ld_136 - ld_32;
         ld_32 = ld_136 + ld_112;
      }
      ld_24 = Open[li_4];
      if (ld_136 < ld_24) {
         ld_112 = ld_24 - ld_136;
         ld_24 = ld_136 - ld_112;
      } else {
         ld_112 = ld_136 - ld_24;
         ld_24 = ld_136 + ld_112;
      }
      g_ibuf_76[li_4] = ld_8;
      g_ibuf_80[li_4] = ld_16;
      g_ibuf_84[li_4] = ld_24;
      g_ibuf_88[li_4] = ld_32;
      if (ld_24 > ld_32) {
         ld_40 = ld_24 - 1.0 * Point;
         ld_48 = ld_32 + 1.0 * Point;
      } else {
         ld_40 = ld_24 + 1.0 * Point;
         ld_48 = ld_32 - 1.0 * Point;
      }
      g_ibuf_92[li_4] = ld_40;
      g_ibuf_96[li_4] = ld_48;
      if (li_4 == 14) {
         ld_64 = ld_24;
         ld_72 = ld_32;
      }
      li_4--;
   }
   ld_112 = (Open[0] + Close[0]) / 2.0;
   ld_120 = (ld_64 + ld_72) / 2.0;
   g_ibuf_84[14] = ld_112;
   g_ibuf_88[14] = ld_120;
   if (ld_112 > ld_120) {
      g_ibuf_92[14] = ld_112 - 1.0 * Point;
      g_ibuf_96[14] = ld_120 + 1.0 * Point;
      g_ibuf_80[14] = ld_112;
   } else {
      g_ibuf_92[14] = ld_112 + 1.0 * Point;
      g_ibuf_96[14] = ld_120 - 1.0 * Point;
      g_ibuf_76[14] = ld_120;
   }
   ld_112 = Open[0];
   g_ibuf_76[15] = ld_112 + 10000.0 * Point;
   g_ibuf_80[15] = ld_112 + 10000.0 * Point;
   g_ibuf_84[15] = ld_112 + 10000.0 * Point;
   g_ibuf_88[15] = ld_112 + 10000.0 * Point;
   g_ibuf_92[15] = ld_112 + 10000.0 * Point;
   g_ibuf_96[15] = ld_112 + 10000.0 * Point;
   return (0);
}




Sample





Analysis



Market Information Used:

Series array that contains close prices for each bar
Series array that contains the highest prices of each bar
Series array that contains the lowest prices of each bar
Series array that contains open prices of each bar


Indicator Curves created:

Implements a curve of type DRAW_HISTOGRAM


Indicators Used:



Custom Indicators Used:

Order Management characteristics:

Other Features: