TRUE Forex

Просмотр кода форекс индикатора !XPS FX OBOS.mq4

// +----------------------------------------------------------------------------------------+ //
// |    .-._______                           XARD777                          _______.-.    | //
// |---( )_)______)                 Knowledge of the ancients                (______(_( )---| //
// |  (    ()___)                              \¦/                             (___()    )  | //
// |       ()__)                              (o o)                             (__()       | //
// |--(___()_)__________________________oOOo___(_)___oOOo_________________________(_()___)--| //
// |_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|____|_____| //
// |                                                                                   2011 | //
// |----------------------------------------------------------------------------------------| //
// |                 File:     !XPS FX OBOS.mq4                                             | //
// | Programming language:     MQL4                                                         | //
// | Development platform:     MetaTrader 4                                                 | //
// |          End product:     THIS SOFTWARE IS FOR USE ONLY BY XARD777                     | //
// |                                                                                        | //
// |                                                         [Xard777 Proprietory Software] | //
// +----------------------------------------------------------------------------------------+ //

#property indicator_chart_window
#property indicator_buffers 7
#property indicator_color1 CLR_NONE//Blue
#property indicator_color2 CLR_NONE//DimGray
#property indicator_color3 CLR_NONE//Black
#property indicator_width3 3
#property indicator_color4 CLR_NONE//Black
#property indicator_width4 3
#property indicator_color5 CLR_NONE//DimGray
#property indicator_color6 CLR_NONE//Black
#property indicator_width6 3
#property indicator_color7 CLR_NONE//Black
#property indicator_width7 3

extern int Nmbr_Bars = 120;
extern int Order = 0;
extern double Ecart = 1.61803399;
double g_ibuf_92[];
double g_ibuf_96[];
double g_ibuf_100[];
double g_ibuf_104[];
double g_ibuf_108[];
double g_ibuf_112[];
double g_ibuf_116[];
double gda_120[20][20];
double gda_124[20];
double gda_128[20];
double gda_132[20];
int gi_136;
int gi_140;
int gi_144;
int gi_148;
int gi_152;
int gi_156;
int gi_160;
double gd_164;
double gd_172;
double gd_180;
double gd_188;
double gd_196;

bool color.framexb=true;
color MM2Colorxb = C'40,80,120';

#define FF1xb "FF1xb"
#define FF2xb "FF2xb"

int init() {
   Comment("");
   SetIndexStyle(0, DRAW_NONE);
   SetIndexBuffer(0, g_ibuf_92);
   SetIndexBuffer(1, g_ibuf_96);
   SetIndexBuffer(2, g_ibuf_100);
   SetIndexBuffer(3, g_ibuf_104);
   SetIndexBuffer(4, g_ibuf_108);
   SetIndexBuffer(5, g_ibuf_112);
   SetIndexBuffer(6, g_ibuf_116);
   return (0);
}

int deinit() {
   Comment("");
   ObjectDelete("REG");
   ObjectDelete("X1");
   ObjectDelete("X2");
   ObjectDelete("X3");
   ObjectDelete("Z1");
   ObjectDelete("Z2");
   ObjectDelete("Z3");
   
   ObjectDelete(FF1xb);
   ObjectDelete(FF2xb);
   
   return (0);
}

int start() {

   CreateMMxb();
}
void CreateObj(string objNamexb, double start, double end, color clr)
   {
   ObjectCreate(objNamexb, OBJ_RECTANGLE, 0, Time[0+Nmbr_Bars], start, Time[0], end);
   ObjectSet(objNamexb, OBJPROP_COLOR, clr);
   }
   void DeleteObjects()
   {
   ObjectDelete(FF1xb);
   ObjectDelete(FF2xb);
   }
   
   void CreateMMxb()
   {
   DeleteObjects();


   if (Year() >= 2020) return (0);
   datetime l_time_0 = 0;
   SetIndexDrawBegin(0, Bars - Nmbr_Bars - 1);
   SetIndexDrawBegin(1, Bars - Nmbr_Bars - 1);
   SetIndexDrawBegin(2, Bars - Nmbr_Bars - 1);
   SetIndexDrawBegin(3, Bars - Nmbr_Bars - 1);
   SetIndexDrawBegin(4, Bars - Nmbr_Bars - 1);
   SetIndexDrawBegin(5, Bars - Nmbr_Bars - 1);
   SetIndexDrawBegin(6, Bars - Nmbr_Bars - 1);
   if (l_time_0 != Time[0]) {
      ObjectDelete("REG");
      ObjectDelete("X1");
      ObjectDelete("X2");
      ObjectDelete("X3");
      ObjectDelete("Z1");
      ObjectDelete("Z2");
      ObjectDelete("Z3");
      l_time_0 = Time[0];
   }
   gi_152 = Order + 1;
   gda_124[1] = Nmbr_Bars + 1;
   for (gi_160 = 1; gi_160 <= gi_152 << 1 - 2; gi_160++) {
      gd_164 = 0;
      for (gi_156 = 0; gi_156 <= Nmbr_Bars; gi_156++) gd_164 += MathPow(gi_156, gi_160);
      gda_124[gi_160 + 1] = gd_164;
   }
   for (gi_160 = 1; gi_160 <= gi_152; gi_160++) {
      gd_164 = 0;
      for (gi_156 = 0; gi_156 <= Nmbr_Bars; gi_156++) {
         if (gi_160 == 1) gd_164 += (High[gi_156] + Low[gi_156]) / 2.0;
         else gd_164 += (High[gi_156] + Low[gi_156]) / 2.0 * MathPow(gi_156, gi_160 - 1);
      }
      gda_128[gi_160] = gd_164;
   }
   for (gi_140 = 1; gi_140 <= gi_152; gi_140++) {
      for (gi_136 = 1; gi_136 <= gi_152; gi_136++) {
         gi_144 = gi_136 + gi_140 - 1;
         gda_120[gi_136][gi_140] = gda_124[gi_144];
      }
   }
   for (gi_144 = 1; gi_144 <= gi_152 - 1; gi_144++) {
      gi_148 = 0;
      gd_188 = 0;
      for (gi_136 = gi_144; gi_136 <= gi_152; gi_136++) {
         if (MathAbs(gda_120[gi_136][gi_144]) > gd_188) {
            gd_188 = MathAbs(gda_120[gi_136][gi_144]);
            gi_148 = gi_136;
         }
      }
      if (gi_148 == 0) return (0);
      if (gi_148 != gi_144) {
         for (gi_140 = 1; gi_140 <= gi_152; gi_140++) {
            gd_196 = gda_120[gi_144][gi_140];
            gda_120[gi_144][gi_140] = gda_120[gi_148][gi_140];
            gda_120[gi_148][gi_140] = gd_196;
         }
         gd_196 = gda_128[gi_144];
         gda_128[gi_144] = gda_128[gi_148];
         gda_128[gi_148] = gd_196;
      }
      for (gi_136 = gi_144 + 1; gi_136 <= gi_152; gi_136++) {
         gd_180 = gda_120[gi_136][gi_144] / gda_120[gi_144][gi_144];
         for (gi_140 = 1; gi_140 <= gi_152; gi_140++) {
            if (gi_140 == gi_144) gda_120[gi_136][gi_140] = 0;
            else gda_120[gi_136][gi_140] = gda_120[gi_136][gi_140] - gd_180 * gda_120[gi_144][gi_140];
         }
         gda_128[gi_136] = gda_128[gi_136] - gd_180 * gda_128[gi_144];
      }
   }
   gda_132[gi_152] = gda_128[gi_152] / gda_120[gi_152][gi_152];
   for (gi_136 = gi_152 - 1; gi_136 >= 1; gi_136--) {
      gd_196 = 0;
      for (gi_140 = 1; gi_140 <= gi_152 - gi_136; gi_140++) {
         gd_196 += (gda_120[gi_136][gi_136 + gi_140]) * (gda_132[gi_136 + gi_140]);
         gda_132[gi_136] = 1 / gda_120[gi_136][gi_136] * (gda_128[gi_136] - gd_196);
      }
   }
   for (gi_156 = 0; gi_156 <= Nmbr_Bars; gi_156++) {
      gd_164 = 0;
      for (gi_144 = 1; gi_144 <= Order; gi_144++) gd_164 += (gda_132[gi_144 + 1]) * MathPow(gi_156, gi_144);
      g_ibuf_92[gi_156] = gda_132[1] + gd_164;
   }
   gd_172 = iStdDev(NULL, 0, Nmbr_Bars, 0, MODE_SMA, PRICE_HIGH, 0) * Ecart;
   for (gi_156 = 0; gi_156 <= Nmbr_Bars; gi_156++) {
      g_ibuf_104[gi_156] = g_ibuf_92[gi_156] + gd_172;
      g_ibuf_100[gi_156] = g_ibuf_92[gi_156] + (g_ibuf_104[gi_156] - g_ibuf_92[gi_156]) / 1.382;
      g_ibuf_96[gi_156] = g_ibuf_92[gi_156] + (g_ibuf_100[gi_156] - g_ibuf_92[gi_156]) / 1.618;
      g_ibuf_116[gi_156] = g_ibuf_92[gi_156] - gd_172;
      g_ibuf_112[gi_156] = g_ibuf_92[gi_156] - (g_ibuf_92[gi_156] - g_ibuf_116[gi_156]) / 1.382;
      g_ibuf_108[gi_156] = g_ibuf_92[gi_156] - (g_ibuf_92[gi_156] - g_ibuf_112[gi_156]) / 1.618;
   }
   
   ObjectDelete("REG");
   ObjectCreate("REG", OBJ_TREND, 0, Time[0], g_ibuf_92[0], Time[0+Nmbr_Bars], g_ibuf_92[0]);
   ObjectSet("REG", OBJPROP_STYLE, STYLE_SOLID);
        ObjectSet("REG", OBJPROP_WIDTH, 4);
        ObjectSet("REG", OBJPROP_COLOR, MM2Colorxb);
        ObjectSet("REG", OBJPROP_BACK, 1);
        ObjectSet("REG", OBJPROP_RAY, 0);
        ObjectMove("REG", 0, Time[0],  g_ibuf_92[0]);
        
/*   ObjectDelete("X1");
   ObjectCreate("X1", OBJ_TREND, 0, Time[0], g_ibuf_104[0], Time[0+Nmbr_Bars], g_ibuf_104[0]);
   ObjectSet("X1", OBJPROP_STYLE, STYLE_SOLID);
        ObjectSet("X1", OBJPROP_WIDTH, 3);
        ObjectSet("X1", OBJPROP_COLOR, Blue);
        ObjectSet("X1", OBJPROP_BACK, 1);
        ObjectSet("X1", OBJPROP_RAY, 0);
        ObjectMove("X1", 0, Time[0],  g_ibuf_104[0]); 
        
   ObjectDelete("X2");
   ObjectCreate("X2", OBJ_TREND, 0, Time[0], g_ibuf_112[0], Time[0+48], g_ibuf_112[0]);
   ObjectSet("X2", OBJPROP_STYLE, STYLE_SOLID);
        ObjectSet("X2", OBJPROP_WIDTH, 3);
        ObjectSet("X2", OBJPROP_COLOR, Blue);
        ObjectSet("X2", OBJPROP_BACK, 1);
        ObjectSet("X2", OBJPROP_RAY, 0);
        ObjectMove("X2", 0, Time[0],  g_ibuf_112[0]); 
        
   ObjectDelete("X3");
   ObjectCreate("X3", OBJ_TREND, 0, Time[0], g_ibuf_116[0], Time[0+48], g_ibuf_116[0]);
   ObjectSet("X3", OBJPROP_STYLE, STYLE_SOLID);
        ObjectSet("X3", OBJPROP_WIDTH, 3);
        ObjectSet("X3", OBJPROP_COLOR, Blue);
        ObjectSet("X3", OBJPROP_BACK, 1);
        ObjectSet("X3", OBJPROP_RAY, 0);
        ObjectMove("X3", 0, Time[0],  g_ibuf_116[0]); */            
   
   
   if (color.framexb) {  
CreateObj(FF1xb, g_ibuf_100[0], g_ibuf_104[0], MM2Colorxb);
CreateObj(FF2xb, g_ibuf_112[0], g_ibuf_116[0], MM2Colorxb);
} 
   
 /*
   ObjectDelete(buff_str);
        ObjectCreate(buff_str, OBJ_TREND, 0, Time[0], mmlx[i], Time[0+FWx], mmlx[i]);
        ObjectSet(buff_str, OBJPROP_STYLE, STYLE_SOLID);
        ObjectSet(buff_str, OBJPROP_WIDTH, mml_wdth[i]);
        ObjectSet(buff_str, OBJPROP_COLOR, mml_clr[i]);
        ObjectSet(buff_str, OBJPROP_BACK, 1);
        ObjectSet(buff_str, OBJPROP_RAY, 0);
        ObjectMove(buff_str, 0, Time[0],  mmlx[i]);
  */        
  
   return (0);
}
// ------------------------------------------------------------------------------------------ //
//                                     E N D   P R O G R A M                                  //
// ------------------------------------------------------------------------------------------ //
/*                                                         
                                        ud$$$**BILLION$bc.                          
                                    u@**"        PROJECT$$Nu                       
                                  J                ""#$$$$$$r                     
                                 @                       $$$$b                    
                               .F                        ^*3$$$                   
                              :% 4                         J$$$N                  
                              $  :F                       :$$$$$                  
                             4F  9                       J$$$$$$$                 
                             4$   k             4$$$$bed$$$$$$$$$                 
                             $$r  'F            $$$$$$$$$$$$$$$$$r                
                             $$$   b.           $$$$$$$$$$$$$$$$$N                
                             $$$$$k 3eeed$$b    XARD777."$$$$$$$$$                
              .@$**N.        $$$$$" $$$$$$F'L $$$$$$$$$$$  $$$$$$$                
              :$$L  'L       $$$$$ 4$$$$$$  * $$$$$$$$$$F  $$$$$$F         edNc   
             @$$$$N  ^k      $$$$$  3$$$$*%   $F4$$$$$$$   $$$$$"        d"  z$N  
             $$$$$$   ^k     '$$$"   #$$$F   .$  $$$$$c.u@$$$          J"  @$$$$r 
             $$$$$$$b   *u    ^$L            $$  $$$$$$$$$$$$u@       $$  d$$$$$$ 
              ^$$$$$$.    "NL   "N. z@*     $$$  $$$$$$$$$$$$$P      $P  d$$$$$$$ 
                 ^"*$$$$b   '*L   9$E      4$$$  d$$$$$$$$$$$"     d*   J$$$$$r   
                      ^$$$$u  '$.  $$$L     "#" d$$$$$$".@$$    .@$"  z$$$$*"     
                        ^$$$$. ^$N.3$$$       4u$$$$$$$ 4$$$  u$*" z$$$"          
                          '*$$$$$$$$ *$b      J$$$$$$$b u$$P $"  d$$P             
                             #$$$$$$ 4$ 3*$"$*$ $"$'c@@$$$$ .u@$$$P               
                               "$$$$  ""F~$ $uNr$$$^&J$$$$F $$$$#                 
                                 "$$    "$$$bd$.$W$$$$$$$$F $$"                   
                                   ?k         ?$$$$$$$$$$$F'*                     
                                    9$$bL     z$$$$$$$$$$$F                       
                                     $$$$    $$$$$$$$$$$$$                        
                                      '#$$c  '$$$$$$$$$"                          
                                       .@"#$$$$$$$$$$$$b                          
                                     z*      $$$$$$$$$$$$N.                       
                                   e"      z$$"  #$$$k  '*$$.                     
                                .u*      u@$P"      '#$$c   "$$c                   
                        u@$*"""       d$$"            "$$$u  ^*$$b.               
                      :$F           J$P"                ^$$$c   '"$$$$$$bL        
                     d$$  ..      @$#                      #$$b         '#$       
                     9$$$$$$b   4$$                          ^$$k         '$      
                      "$$6""$b u$$                             '$    d$$$$$P      
                        '$F $$$$$"                              ^b  ^$$$$b$       
                         '$W$$$$"                                'b@$$$$"         
                                                                  ^$$$*/

Комментарии к исходному коду форекс индикатора !XPS FX OBOS.mq4
В целях безопасности и борьбы со спамом в тексте комментариев запрещено размещать html-теги и ссылки. Благодарим за понимание.

  • X
  • 0% загружено
« индикатор !XARD TIMEFRAME.mq4
индикатор !XPS MATHBOARD.mq4 »