TRUE Forex

Просмотр кода форекс индикатора !XPS v7 Heiken Ashi.mq4

// +----------------------------------------------------------------------------------------+ //
// |    .-._______                           XARD777                          _______.-.    | //
// |---( )_)______)                 Knowledge of the ancients                (______(_( )---| //
// |  (    ()___)                              \¦/                             (___()    )  | //
// |       ()__)                              (o o)                             (__()       | //
// |--(___()_)__________________________oOOo___(_)___oOOo_________________________(_()___)--| //
// |_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|____|_____| //
// |                                                                                   2011 | //
// |----------------------------------------------------------------------------------------| //
// |                 File:     !XPS v7 Heiken Ashi.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 4
#property indicator_color1 C'227,38,54'//Red
#property indicator_width1 1
#property indicator_color2 C'88,128,184'//Lavender
#property indicator_width2 1
#property indicator_color3 C'255,49,72'//Red
#property indicator_width3 4
#property indicator_color4 RoyalBlue//C'88,128,184'//Lavender
#property indicator_width4 4

extern int MA.Method = 1;
extern int MA.Period = 21;
extern int MA.Method2 = 1;
extern int MA.Period2 = 8;
extern bool POP_UP_Box_Alert = true;
extern bool Sound_Alert = true;
double g_ibuf_100[];
double g_ibuf_104[];
double g_ibuf_108[];
double g_ibuf_112[];
double g_ibuf_116[];
double g_ibuf_120[];
double g_ibuf_124[];
double g_ibuf_128[];
int gi_132 = 0;
string prior.text = "";

int init() {
   IndicatorBuffers(8);
   SetIndexStyle(0, DRAW_NONE);
   SetIndexBuffer(0, g_ibuf_100);
   SetIndexStyle(1, DRAW_NONE);
   SetIndexBuffer(1, g_ibuf_104);
   SetIndexStyle(2, DRAW_HISTOGRAM);
   SetIndexBuffer(2, g_ibuf_108);
   SetIndexStyle(3, DRAW_HISTOGRAM);
   SetIndexBuffer(3, g_ibuf_112);
   SetIndexDrawBegin(0, 5);
   SetIndexBuffer(0, g_ibuf_100);
   SetIndexBuffer(1, g_ibuf_104);
   SetIndexBuffer(2, g_ibuf_108);
   SetIndexBuffer(3, g_ibuf_112);
   SetIndexBuffer(4, g_ibuf_116);
   SetIndexBuffer(5, g_ibuf_120);
   SetIndexBuffer(6, g_ibuf_124);
   SetIndexBuffer(7, g_ibuf_128);
   return (0);
}

int deinit() {
   return (0);
}

int start() {
   double l_ima_0;
   double l_ima_8;
   double l_ima_16;
   double l_ima_24;
   double ld_32;
   double ld_40;
   double ld_48;
   double ld_56;
   if (Bars <= 10) return (0);
   gi_132 = IndicatorCounted();
   if (gi_132 < 0) return (-1);
   if (gi_132 > 0) gi_132--;
   for (int li_64 = Bars - gi_132 - 1; li_64 >= 0; li_64--) {
      l_ima_0 = iMA(NULL, 0, MA.Period, 0, MA.Method, PRICE_CLOSE, li_64);
      l_ima_8 = iMA(NULL, 0, MA.Period, 0, MA.Method, PRICE_LOW, li_64);
      l_ima_16 = iMA(NULL, 0, MA.Period, 0, MA.Method, PRICE_OPEN, li_64);
      l_ima_24 = iMA(NULL, 0, MA.Period, 0, MA.Method, PRICE_HIGH, li_64);
      ld_32 = (g_ibuf_116[li_64 + 1] + (g_ibuf_120[li_64 + 1])) / 2.0;
      ld_56 = (l_ima_0 + l_ima_24 + l_ima_16 + l_ima_8) / 4.0;
      ld_40 = MathMax(l_ima_24, MathMax(ld_32, ld_56));
      ld_48 = MathMin(l_ima_16, MathMin(ld_32, ld_56));
      if (ld_32 < ld_56) {
         g_ibuf_124[li_64] = ld_48;
         g_ibuf_128[li_64] = ld_40;
      } else {
         g_ibuf_124[li_64] = ld_40;
         g_ibuf_128[li_64] = ld_48;
      }
      g_ibuf_116[li_64] = ld_32;
      g_ibuf_120[li_64] = ld_56;
   }
   for (int i = 0; i < Bars; i++) g_ibuf_100[i] = iMAOnArray(g_ibuf_124, Bars, MA.Period2, 0, MA.Method2, i);
   for (i = 0; i < Bars; i++) g_ibuf_104[i] = iMAOnArray(g_ibuf_128, Bars, MA.Period2, 0, MA.Method2, i);
   for (i = 0; i < Bars; i++) g_ibuf_108[i] = iMAOnArray(g_ibuf_116, Bars, MA.Period2, 0, MA.Method2, i);
   for (i = 0; i < Bars; i++) g_ibuf_112[i] = iMAOnArray(g_ibuf_120, Bars, MA.Period2, 0, MA.Method2, i);
   int crossed=Crossed(g_ibuf_100[0], g_ibuf_104[0]);
   return (0);
}
int Crossed(double ad_0, double ad_8) {
   string text = "";
   if (ad_0 <= ad_8) text = "LONG";
   if (ad_0 > ad_8) text = "SHORT";
   if(prior.text=="")
      {
      prior.text=text;
      return(0);
      }
   if (text != prior.text)
    {
      if (POP_UP_Box_Alert) Alert("HA Direction change to " + text + "  ", Symbol(), " ", Period(), " @ ", Bid);
      if (Sound_Alert) PlaySound("alert.wav");
      prior.text = text;
      return (1);
   }
   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 v7 Heiken Ashi.mq4

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

  • X
  • 0% загружено
« индикатор !XPS v7 GANN Weekly.mq4
индикатор !XPS v7 Inv Fisher.mq4 »