TRUE Forex

Просмотр кода форекс индикатора !!X04-MT4 CANDLES.mq4

#property indicator_chart_window
#property indicator_buffers 8
#property indicator_color1 C'0,200,255'
#property indicator_width1 6
#property indicator_color2 C'255,215,0'
#property indicator_width2 6
#property indicator_color3 Gray
#property indicator_width3 6
#property indicator_color4 Gray
#property indicator_width4 6
#property indicator_color5 C'0,200,255'
#property indicator_color6 C'255,215,0'
#property indicator_color7 Gray
#property indicator_color8 Gray

extern int TF = 0;
extern bool HideCandles = false;
extern int  Width       = 6;

int Sensitivity = 1;
int g_period_80;
int g_period_84;
double g_ibuf_88[];
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[];

int init() {

   ObjectCreate("Close line", OBJ_HLINE, 0, Time[10], Close[0]);
   ObjectSet("Close line", OBJPROP_STYLE, STYLE_SOLID);
   ObjectSet("Close line", OBJPROP_COLOR, Crimson);
   ObjectSet("Close line", OBJPROP_WIDTH, 2);
   ObjectSet("Close line", OBJPROP_BACK, 1);

   SetIndexBuffer(0, g_ibuf_88);
   SetIndexBuffer(1, g_ibuf_92);
   SetIndexBuffer(2, g_ibuf_96);
   SetIndexBuffer(3, g_ibuf_100);
   SetIndexBuffer(4, g_ibuf_104);
   SetIndexBuffer(5, g_ibuf_108);
   SetIndexBuffer(6, g_ibuf_112); 
   SetIndexBuffer(7, g_ibuf_116);
    
   for(int i=0;i<8;i++)
      if(HideCandles)   SetIndexStyle(i, DRAW_NONE);
   else                 
      if(i<4)  SetIndexStyle(i, DRAW_HISTOGRAM,DRAW_HISTOGRAM,Width);
      else     SetIndexStyle(i, DRAW_HISTOGRAM);
          
   
   IndicatorShortName("CANDLES");
   return (0);
}

int deinit() {
ObjectDelete("Close line");
   return (0);
}

int start() {
   double l_icci_0;
   double l_icci_8;
   int li_16;
   ObjectMove("Close line", 0, Time[10], Close[0]);
  
   if (Sensitivity == 1) {
      g_period_84 = 3;
      g_period_80 = 14;
   }
   if (Sensitivity == 0 || Sensitivity == 2 || Sensitivity > 3) {
      g_period_84 = 3;
      g_period_80 = 20;
   }
   if (Sensitivity == 3) {
      g_period_84 = 89;
      g_period_80 = 200;
   }
   
   int l_ind_counted_20 = IndicatorCounted();
   if (Bars <= 15) return (0);
   if (l_ind_counted_20 < 1) {
      for (int li_24 = 1; li_24 <= 15; li_24++) {
         g_ibuf_88[Bars - li_24] = 0.0;
         g_ibuf_96[Bars - li_24] = 0.0;
         g_ibuf_92[Bars - li_24] = 0.0;
         g_ibuf_100[Bars - li_24] = 0.0;
         g_ibuf_104[Bars - li_24] = 0.0;
         g_ibuf_112[Bars - li_24] = 0.0;
         g_ibuf_108[Bars - li_24] = 0.0;
         g_ibuf_116[Bars - li_24] = 0.0;
      }
   }
   if (l_ind_counted_20 > 0) li_16 = Bars - l_ind_counted_20;
   if (l_ind_counted_20 == 0) li_16 = Bars - 15 - 1;
   for (li_24 = li_16; li_24 >= 0; li_24--) {
      l_icci_0 = iCCI(NULL, TF, g_period_84, PRICE_TYPICAL, li_24);
      l_icci_8 = iCCI(NULL, TF, g_period_80, PRICE_TYPICAL, li_24);
      
      g_ibuf_88[li_24] = EMPTY_VALUE;
      g_ibuf_96[li_24] = EMPTY_VALUE;
      g_ibuf_92[li_24] = EMPTY_VALUE;
      g_ibuf_100[li_24] = EMPTY_VALUE;
      g_ibuf_104[li_24] = EMPTY_VALUE;
      g_ibuf_112[li_24] = EMPTY_VALUE;
      g_ibuf_108[li_24] = EMPTY_VALUE;
      g_ibuf_116[li_24] = EMPTY_VALUE;
      
      if (l_icci_0 >= 0.0 && l_icci_8 >= 0.0) {
         g_ibuf_88[li_24] = MathMax(Open[li_24], Close[li_24]);
         g_ibuf_92[li_24] = MathMin(Open[li_24], Close[li_24]);
         g_ibuf_104[li_24] = High[li_24];
         g_ibuf_108[li_24] = Low[li_24];
      } else {
         if (l_icci_8 >= 0.0 && l_icci_0 < 0.0) {
            g_ibuf_96[li_24] = MathMax(Open[li_24], Close[li_24]);
            g_ibuf_100[li_24] = MathMin(Open[li_24], Close[li_24]);
            g_ibuf_112[li_24] = High[li_24];
            g_ibuf_116[li_24] = Low[li_24];
         } else {
            if (l_icci_0 < 0.0 && l_icci_8 < 0.0) {
               g_ibuf_92[li_24] = MathMax(Open[li_24], Close[li_24]);
               g_ibuf_88[li_24] = MathMin(Open[li_24], Close[li_24]);
               g_ibuf_108[li_24] = High[li_24];
               g_ibuf_104[li_24] = Low[li_24];
            } else {
               if (l_icci_8 < 0.0 && l_icci_0 > 0.0) {
                  g_ibuf_100[li_24] = MathMax(Open[li_24], Close[li_24]);
                  g_ibuf_96[li_24] = MathMin(Open[li_24], Close[li_24]);
                  g_ibuf_116[li_24] = High[li_24];
                  g_ibuf_112[li_24] = Low[li_24];
            }}}}}
   return (0);
}
//--------------------------------------------Xard@hotmail.co.uk-----+
/*                                                                   
                              ud$$$**$$$$$$$bc.                          
                          u@**"        4$$$$$$$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$.TZUMAN$$$$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         '#$       
           #ISMAEL#   4$$                          ^$$k         '$      
            "$$6""$b u$$                             '$    d$$$$$P      
              '$F $$$$$"                              ^b  ^$$$$b$       
               '$W$$$$"                                'b@$$$$"         
                                                        ^$$$*  
*/

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

  • X
  • 0% загружено
« индикатор !!X03-MT4 SESSIONS.mq4
индикатор !!X05-MT4 TF DUO.mq4 »