TRUE Forex

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

// +----------------------------------------------------------------------------------------+ //
// |    .-._______                           XARD777                          _______.-.    | //
// |---( )_)______)                 Knowledge of the ancients                (______(_( )---| //
// |  (    ()___)                              \¦/                             (___()    )  | //
// |       ()__)                              (o o)                             (__()       | //
// |--(___()_)__________________________oOOo___(_)___oOOo_________________________(_()___)--| //
// |_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|____|_____| //
// |                                                                                   2011 | //
// |----------------------------------------------------------------------------------------| //
// |                 File:     !XPS v7 MOMENTUM TREND.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 2
#property indicator_color1 Lime
#property indicator_width1 3
#property indicator_color2 Red
#property indicator_width2 3

//---- input parameters
extern int     MA1Period   =  8;
extern int     MA2Period   = 34;
 
extern int     MA1Type     =  2;
extern int     MA2Type     =  2; 
                                    /*
                                    MODE_SMA 0 Simple moving average, 
                                    MODE_EMA 1 Exponential moving average, 
                                    MODE_SMMA 2 Smoothed moving average, 
                                    MODE_LWMA 3 Linear weighted moving average. 
                                    */
                                    
extern int     MA1Price    =  4;
extern int     MA2Price    =  4; 
                                    /*
                                    PRICE_CLOSE 0 Close price. 
                                    PRICE_OPEN 1 Open price. 
                                    PRICE_HIGH 2 High price. 
                                    PRICE_LOW 3 Low price. 
                                    PRICE_MEDIAN 4 Median price, (high+low)/2. 
                                    PRICE_TYPICAL 5 Typical price, (high+low+close)/3. 
                                    PRICE_WEIGHTED 6 Weighted close price, (high+low+close+close)/4. 
                                    */
                                    

double         b1[];
double         b2[];
double         b3[];
double         b4[];



int init()  {
   IndicatorBuffers(4);
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,b1);
   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(1,b2);
   SetIndexBuffer(2,b3);
   SetIndexBuffer(3,b4);
   SetIndexEmptyValue(0,0);
   SetIndexEmptyValue(1,0);
   return(0);
}



int start() {

   int counted_bars=IndicatorCounted();
   int i,limit;
   
   if (counted_bars<0) return(-1);
   if (counted_bars>0) counted_bars--;

   limit=Bars-MA2Period-counted_bars;

   if(limit<0) limit=0;
   if (limit>MA2Period) { b1[limit+1]=0; b2[limit+1]=0; }


   for (i=limit;i>=0;i--) {
      b3[i]=iMA(NULL,0,MA1Period,0,MA1Type,MA1Price,i);
      b4[i]=iMA(NULL,0,MA2Period,0,MA2Type,MA2Price,i);
      b1[i]=b1[i+1];
      b2[i]=b2[i+1];

      if ( (b3[i]-b4[i])>(b3[i+1]-b4[i+1]) ) { b1[i]=b3[i]; if (b1[i+1]<0.01) b2[i]=b3[i]; if (b1[i+1]>0) b2[i]=0; }
      if ( (b3[i]-b4[i])<(b3[i+1]-b4[i+1]) ) { b2[i]=b3[i]; if (b2[i+1]<0.01) b1[i]=b3[i]; if (b2[i+1]>0) b1[i]=0; }
   }
   
   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 MOMENTUM TREND.mq4
В целях безопасности и борьбы со спамом в тексте комментариев запрещено размещать html-теги и ссылки. Благодарим за понимание.

  • X
  • 0% загружено
« индикатор !XPS v7 Inv Fisher.mq4
индикатор !XPS v7 Murrey Math (3).mq4 »