Navigation:Home > Content >

BST_v1~.mq4

Time: 2016-01-13 | Download file:BST_v1~.mq4

/*
   Generated by ex4-to-mq4 decompiler FREEWARE 4.0.451.7
   Website:  H TT P ://W WW. mE tA qU oteS . n eT
   E-mail : S u P Po r t @ME TaquoTeS .ne T
*/
#property copyright "Copyright © 2012, www.yes-com.com"
#property link      "http://www.metaquotes.net"

#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 Black
#property indicator_color2 Black
#property indicator_color3 Black

extern int analized_bars = 100;
extern int retention_bar = 20;
extern bool Pointer = TRUE;
extern bool information = TRUE;
extern color color_down = Red;
extern color color_up = Blue;
double Gda_unused_100[];
double Gda_unused_104[];
double Gd_108;
double Gd_116;
double Gd_124;
int Gi_132;
int Gi_136;
double Gd_140;
int G_count_148;
int G_count_152;
int G_count_156;
int Gi_160;
int Gi_164;
int Gi_168;
int Gi_unused_172;
double Gd_488;
double Gd_496;

// E37F0136AA3FFAF149B351F6A4C948E9
void init() {
}

// 52D46093050F38C27267BCE42543EF60
void deinit() {
   ObjectDelete("Label_Obj_Up");
   ObjectDelete("Label_Obj_Down");
   ObjectDelete("Label_Obj_pr_buy");
   ObjectDelete("Label_Obj_pr_sell");
   ObjectDelete("buy");
   ObjectDelete("inform");
   ObjectDelete("Label_Obj_dot_red");
   ObjectDelete("Label_Obj_dot_blue");
}

// EA2B2676C28C0DB26D39331A336C6B92
void start() {
   int Li_4;
   G_count_148 = 0;
   G_count_152 = 0;
   G_count_156 = 0;
   Gd_488 = 0.0;
   Gd_496 = 0.0;
   Gi_unused_172 = 0;
   for (int index_0 = 0; index_0 < 12; index_0++)
      if (Close[index_0] < Open[index_0]) Li_4++;
   double Ld_unused_8 = 0.1;
   int Li_unused_16 = 1;
   for (int index_20 = 0; index_20 < analized_bars; index_20++) {
      if (Close[index_20] > Open[index_20 + retention_bar]) G_count_152++;
      if (Close[index_20] < Open[index_20 + retention_bar]) G_count_148++;
      if (Close[index_20] == Open[index_20 + retention_bar]) G_count_156++;
   }
   for (int index_24 = 0; index_24 < analized_bars; index_24++) {
      if (Close[index_24] > Open[index_24]) Gd_488 += High[index_24] - Low[index_24];
      if (Close[index_24] < Open[index_24]) Gd_496 += High[index_24] - Low[index_24];
   }
   Gd_108 = Gd_488 + Gd_496;
   Gd_116 = 100.0 * Gd_488 / Gd_108;
   Gd_124 = 100.0 * Gd_496 / Gd_108;
   Gi_160 = 100 * G_count_148 / analized_bars;
   Gi_164 = 100 * G_count_152 / analized_bars;
   Gi_168 = 100 * G_count_156 / analized_bars;
   Gd_140 = Gi_160 + Gi_164;
   Gi_132 = 100 * Gi_164 / Gd_140;
   Gi_136 = 100 * Gi_160 / Gd_140;
   ObjectDelete("Label_Obj_Up");
   ObjectDelete("Label_Obj_Down");
   ObjectDelete("Label_Obj_pr_buy");
   ObjectDelete("Label_Obj_pr_sell");
   ObjectDelete("buy");
   ObjectDelete("inform");
   ObjectDelete("Label_Obj_dot_red");
   ObjectDelete("Label_Obj_dot_blue");
   ObjectCreate("Label_Obj_Up", OBJ_LABEL, 0, 0, 0);
   ObjectSet("Label_Obj_Up", OBJPROP_CORNER, 1);
   ObjectSet("Label_Obj_Up", OBJPROP_XDISTANCE, 282);
   ObjectSet("Label_Obj_Up", OBJPROP_YDISTANCE, 25);
   ObjectSetText("Label_Obj_Up", "UP", 12, "Arial", color_up);
   ObjectCreate("Label_Obj_Down", OBJ_LABEL, 0, 0, 0);
   ObjectSet("Label_Obj_Down", OBJPROP_CORNER, 1);
   ObjectSet("Label_Obj_Down", OBJPROP_XDISTANCE, 68);
   ObjectSet("Label_Obj_Down", OBJPROP_YDISTANCE, 25);
   ObjectSetText("Label_Obj_Down", "DOWN", 12, "Arial", color_down);
   int Li_28 = 0;
   if (Gi_136 > 0 && Gi_136 <= 10) Li_28 = 1;
   if (Gi_136 >= 11 && Gi_136 <= 20) Li_28 = 2;
   if (Gi_136 >= 21 && Gi_136 <= 30) Li_28 = 3;
   if (Gi_136 >= 31 && Gi_136 <= 40) Li_28 = 4;
   if (Gi_136 >= 41 && Gi_136 <= 50) Li_28 = 5;
   if (Gi_136 >= 51 && Gi_136 <= 60) Li_28 = 6;
   if (Gi_136 >= 61 && Gi_136 <= 70) Li_28 = 7;
   if (Gi_136 >= 71 && Gi_136 <= 80) Li_28 = 8;
   if (Gi_136 >= 81 && Gi_136 <= 90) Li_28 = 9;
   if (Gi_136 >= 91 && Gi_136 <= 100) Li_28 = 10;
   int Li_32 = 0;
   if (Gi_132 >= 0 && Gi_132 <= 10) Li_32 = 1;
   if (Gi_132 >= 11 && Gi_132 <= 20) Li_32 = 2;
   if (Gi_132 >= 21 && Gi_132 <= 30) Li_32 = 3;
   if (Gi_132 >= 31 && Gi_132 <= 40) Li_32 = 4;
   if (Gi_132 >= 41 && Gi_132 <= 50) Li_32 = 5;
   if (Gi_132 >= 51 && Gi_132 <= 60) Li_32 = 6;
   if (Gi_132 >= 61 && Gi_132 <= 70) Li_32 = 7;
   if (Gi_132 >= 71 && Gi_132 <= 80) Li_32 = 8;
   if (Gi_132 >= 81 && Gi_132 <= 90) Li_32 = 9;
   if (Gi_132 >= 91 && Gi_132 <= 100) Li_32 = 10;
   int x_36 = 165;
   string name_40 = "Label_Obj_dot_red";
   for (int Li_48 = 1; Li_48 < Li_28; Li_48++) {
      ObjectCreate(name_40, OBJ_LABEL, 0, 0, 0);
      ObjectSet(name_40, OBJPROP_CORNER, 1);
      ObjectSet(name_40, OBJPROP_XDISTANCE, x_36);
      ObjectSet(name_40, OBJPROP_YDISTANCE, 1);
      ObjectSetText(name_40, CharToStr(110), 15, "Wingdings", color_down);
      x_36 -= 15;
      name_40 = name_40 + Li_48;
   }
   int x_52 = 180;
   string name_56 = "Label_Obj_dot_blue";
   for (Li_48 = 1; Li_48 < Li_32; Li_48++) {
      ObjectCreate(name_56, OBJ_LABEL, 0, 0, 0);
      ObjectSet(name_56, OBJPROP_CORNER, 1);
      ObjectSet(name_56, OBJPROP_XDISTANCE, x_52);
      ObjectSet(name_56, OBJPROP_YDISTANCE, 1);
      ObjectSetText(name_56, CharToStr(110), 15, "Wingdings", color_up);
      x_52 += 15;
      name_56 = name_56 + Li_48;
   }
   string text_64 = Gi_132 + "%";
   ObjectCreate("Label_Obj_pr_buy", OBJ_LABEL, 0, 0, 0);
   ObjectSet("Label_Obj_pr_buy", OBJPROP_CORNER, 1);
   ObjectSet("Label_Obj_pr_buy", OBJPROP_XDISTANCE, 250);
   ObjectSet("Label_Obj_pr_buy", OBJPROP_YDISTANCE, 25);
   ObjectSetText("Label_Obj_pr_buy", text_64, 12, "Arial", color_up);
   string text_72 = Gi_136 + "%";
   ObjectCreate("Label_Obj_pr_sell", OBJ_LABEL, 0, 0, 0);
   ObjectSet("Label_Obj_pr_sell", OBJPROP_CORNER, 1);
   ObjectSet("Label_Obj_pr_sell", OBJPROP_XDISTANCE, 120);
   ObjectSet("Label_Obj_pr_sell", OBJPROP_YDISTANCE, 25);
   ObjectSetText("Label_Obj_pr_sell", text_72, 12, "Arial", color_down);
   if (Pointer == TRUE) {
      if (G_count_152 + Gd_488 > G_count_148 + Gd_496) {
         ObjectCreate("buy", OBJ_ARROW, 0, Time[0], High[0] + 4.0 * Point);
         ObjectSet("buy", OBJPROP_ARROWCODE, 233);
         ObjectSet("buy", OBJPROP_COLOR, Blue);
         ObjectSet("buy", OBJPROP_WIDTH, 2);
      }
      if (G_count_152 + Gd_488 < G_count_148 + Gd_496) {
         ObjectCreate("buy", OBJ_ARROW, 0, Time[0], Low[0] - 4.0 * Point);
         ObjectSet("buy", OBJPROP_ARROWCODE, 234);
         ObjectSet("buy", OBJPROP_COLOR, Red);
         ObjectSet("buy", OBJPROP_WIDTH, 2);
      }
   }
   if (information == TRUE) {
      ObjectCreate("inform", OBJ_LABEL, 0, 0, 0);
      ObjectSet("inform", OBJPROP_CORNER, 1);
      ObjectSet("inform", OBJPROP_XDISTANCE, 80);
      ObjectSet("inform", OBJPROP_YDISTANCE, 39);
      ObjectSetText("inform", "Indicator BST_v1 site www.yes-com.com", 9, "Arial", Gray);
   }
}

Recommend