TRUE Forex

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

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

#property  indicator_separate_window
#property indicator_minimum 0
#property indicator_maximum 1
#property  indicator_buffers 3
#property indicator_color2 C'72,49,255'
#property indicator_color3 C'255,49,72'


#property indicator_width2 6
#property indicator_width3 6
 
extern int period = 0;
extern bool alarm=false;


double         ExtBuffer0[];
double         ExtBuffer1[];
double         ExtBuffer2[];

double alertBar;
double last;

int init() {

   //-----------------------------
   
   switch ( Period() )
   {
   case     1: period = 2880;break;
   case     5: period = 576;break;
   case    15: period = 192;break;
   case    30: period = 96;break;
   case    60: period = 48;break;
   case   240: period = 48;break;
   case  1440: period = 48;break;
   case 10080: period = 48;break;
   default   : period = 48;break;
   }
   
   //-----------------------------
   
   SetIndexStyle(0,DRAW_NONE);
   SetIndexStyle(1,DRAW_HISTOGRAM);
   SetIndexStyle(2,DRAW_HISTOGRAM);
   IndicatorDigits(Digits+1);

   SetIndexBuffer(0,ExtBuffer0);
   SetIndexBuffer(1,ExtBuffer1);
   SetIndexBuffer(2,ExtBuffer2);

   IndicatorShortName(" X :-)");
   SetIndexLabel(0, NULL);
   SetIndexLabel(1, NULL);
   SetIndexLabel(2, NULL);


   return(0);
  }


int deinit()
  {
//----
  ObjectDelete("XPS");
  ObjectDelete("XPS2");
  ObjectDelete("XPS3");
//----
   return(0);
  }


int start() {
   
   int    limit;
   int    counted_bars=IndicatorCounted();
   double prev,current,old;
   double Value=0,Value1=0,Value2=0,Fish=0,Fish1=0,Fish2=0;
   double price;
   double MinL=0;
   double MaxH=0;  
   

   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;

   for(int i=0; i<limit; i++)
   
    { MaxH = High[Highest(NULL,0,MODE_HIGH,period,i)];
      MinL = Low[Lowest(NULL,0,MODE_LOW,period,i)];
      price = (High[i]+Low[i])/2;
      
      Value = 0.33*2*((price-MinL)/(MaxH-MinL)-0.5) + 0.67*Value1;     
      Value=MathMin(MathMax(Value,-0.999),0.999); 
      
      ExtBuffer0[i]=0.5*MathLog((1+Value)/(1-Value))+0.5*Fish1;
      
      Value1=Value;
      Fish1=ExtBuffer0[i];  
    }


   bool up = TRUE;
   for(i=limit-2; i>=0; i--)
     
     {
      current=ExtBuffer0[i];
      prev=ExtBuffer0[i+1];
           
      if (((current<0)&&(prev>0))||(current<0))   up= false;    
      if (((current>0)&&(prev<0))||(current>0))   up= true;
      
      if(!up) {
         ExtBuffer2[i]=1;
         ExtBuffer1[i]=0;
      
      if (alarm && i==0 && last != 2 && ExtBuffer1[i] == 0 && Bars>alertBar) 
        {
            Alert("Possible Trend going DOWN on ",Period()," ",Symbol());
            alertBar = Bars;last = 2;
        }      
        }
        
       else {
          ExtBuffer1[i]=1;
          ExtBuffer2[i]=0;
      
 //     if (alarm && i==0 && last != 1 && ExtBuffer2[i] == 0 && Bars>alertBar) 
   //     {
     //       Alert("Possible Trend going UP on ",Period()," ",Symbol());
       //     alertBar = Bars;
         //   last = 1;
       // }   
        }
  }//End Loop


   ObjectDelete("XPS");
   ObjectCreate("XPS", OBJ_LABEL, 1, 0, 0);
   ObjectSetText("XPS","!XPS v8", 28, "Arial Black", C'46,46,46');
   ObjectSet("XPS", OBJPROP_CORNER, 2);
   ObjectSet("XPS", OBJPROP_BACK, 0);
   ObjectSet("XPS", OBJPROP_XDISTANCE, 16);
   ObjectSet("XPS", OBJPROP_YDISTANCE, 6);     
      
   ObjectDelete("XPS2");
   ObjectCreate("XPS2", OBJ_LABEL, 1, 0, 0);
   ObjectSetText("XPS2","!XPS v8", 28, "Arial Black", Silver);
   ObjectSet("XPS2", OBJPROP_CORNER, 2);
   ObjectSet("XPS2", OBJPROP_BACK, 0);
   ObjectSet("XPS2", OBJPROP_XDISTANCE, 14);
   ObjectSet("XPS2", OBJPROP_YDISTANCE, 8); 
   
   ObjectDelete("XPS3");
   ObjectCreate("XPS3", OBJ_LABEL, 1, 0, 0);
   ObjectSetText("XPS3","Release Candidate 009", 9, "Arial Black", Silver);
   ObjectSet("XPS3", OBJPROP_CORNER, 2);
   ObjectSet("XPS3", OBJPROP_BACK, 0);
   ObjectSet("XPS3", OBJPROP_XDISTANCE, 17);
   ObjectSet("XPS3", OBJPROP_YDISTANCE, 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 OSCILLATOR v2.mq4
В целях безопасности и борьбы со спамом в тексте комментариев запрещено размещать html-теги и ссылки. Благодарим за понимание.

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