Deprecated: Assigning the return value of new by reference is deprecated in /home/forex/public_html/wp-settings.php on line 520

Deprecated: Assigning the return value of new by reference is deprecated in /home/forex/public_html/wp-settings.php on line 535

Deprecated: Assigning the return value of new by reference is deprecated in /home/forex/public_html/wp-settings.php on line 542

Deprecated: Assigning the return value of new by reference is deprecated in /home/forex/public_html/wp-settings.php on line 578

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/forex/public_html/wp-settings.php on line 18
X :forex decode

X Archives

xpMA.mq4

//+------------------------------------------------------------------+
//|                       XP Moving Average                          |
//|                                                         xpMA.mq4 |
//|                                         Developed by Coders Guru |
//|                                            http://www.xpworx.com |
//+------------------------------------------------------------------+

#property link      "http://www.xpworx.com"

#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 Yellow
#property indicator_color2 Green
#property indicator_color3 Red

#define MODE_DEMA 4
#define MODE_TEMA 5
#define MODE_T3MA 6

/* Moving average types constants:
------------------------------------
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.
MODE_DEMA      4     Double Exponential Moving Average.
MODE_TEMA      5     Triple Exponential Moving Average.
MODE_T3MA      6     T3 Moving Average.
------------------------------------*/

/* Applied price constants:
-------------------------------
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.
--------------------------------- */

extern   int      MA_Period               = 10;
extern   int      MA_Type                 = MODE_EMA;
extern   int      MA_Applied              = PRICE_CLOSE;
extern   double   T3MA_VolumeFactor       = 0.8;

double UpBuffer[];
double DownBuffer[];
double Buffer3[];
double buffer[];
double tempbuffer[];
double matriple[];

int init()
{
   IndicatorBuffers(6);

   SetIndexStyle(2,DRAW_LINE,STYLE_DOT,2);
   SetIndexBuffer(2,UpBuffer);
   SetIndexStyle(1,DRAW_LINE,STYLE_DOT,2);
   SetIndexBuffer(1,DownBuffer);
   SetIndexStyle(0,DRAW_LINE,STYLE_DOT,2);
   SetIndexBuffer(0,Buffer3);
   SetIndexBuffer(3,buffer);
   SetIndexBuffer(4,tempbuffer);
   SetIndexBuffer(5,matriple);
   return(0);
}

int deinit()
{
   return(0);
}

void start()
{

   int counted_bars=IndicatorCounted();
   int i = 0;

   if(counted_bars<0) return(-1);
   if(counted_bars>0) counted_bars--;
   int limit=Bars-counted_bars;

   switch (MA_Type)
   {
      case 0:
      case 1:
      case 2:
      case 3:
            {
                  for(i=0; i<limit; i++)
                  {
                     buffer[i] = iMA(NULL,0,MA_Period,0,MA_Type,MA_Applied,i);
                  }
            }
            break;

      case 4:
            {
                  for(i=0; i<limit; i++)
                  {
                     tempbuffer[i] = iMA(NULL,0,MA_Period,0,MODE_EMA,MA_Applied,i);
                  }
                  for(i=0; i<limit; i++)
                  {
                     matriple[i] = iMAOnArray(tempbuffer,0,MA_Period,0,MODE_EMA,i);
                  }
                  for(i=0; i<limit; i++)
                  {
                     buffer[i] = iMAOnArray(matriple,0,MA_Period,0,MODE_EMA,i);
                  }
            }
            break;

      case 5:
            {
                  for(i=0; i<limit; i++)
                  {
                     tempbuffer[i] = iMA(NULL,0,MA_Period,0,MODE_EMA,MA_Applied,i);
                  }
                  for(i=0; i<limit; i++)
                  {
                     buffer[i] = iMAOnArray(tempbuffer,0,MA_Period,0,MODE_EMA,i);
                  }
            }
            break;

      case 6:
            {
                  for(i=0; i<limit; i++)
                  {
                     buffer[i] = iCustom(NULL,0,"T3MA",MA_Period,T3MA_VolumeFactor,0,i);
                  }
            }
            break;
   }

   for(int shift=limit; shift>=0; shift--)
   {
       UpBuffer[shift] = buffer[shift];
       DownBuffer[shift] = buffer[shift];
       Buffer3[shift] = buffer[shift];
   }
   for(shift=limit; shift>=0; shift--)
   {
      if (buffer[shift+1]>buffer[shift])
      {
         UpBuffer[shift+1] = EMPTY_VALUE;
         //Buffer3[i+1] = EMPTY_VALUE;
      }
      else if (buffer[shift+1]<buffer[shift] )
      {
         DownBuffer[shift+1] = EMPTY_VALUE;
//Buffer3[i+1] = EMPTY_VALUE;
      }
      else
      {
         UpBuffer[shift+1] = CLR_NONE;
         DownBuffer[shift+1] = CLR_NONE;
      }
   }
   return(0);
}

[Post to Twitter] Tweet This Post  [Post to Delicious] Delicious This Post  [Post to Ping.fm] Ping This Post  [Post to StumbleUpon] Stumble This Post 

XO_ALERT_cci_cross.mq4

//+------------------------------------------------------------------+
//|                                                    XO_EA_FTP.mq4 |
//|                                                          Kalenzo |
//|                                      bartlomiej.gorski@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Kalenzo"
#property link      "bartlomiej.gorski@gmail.com"
#property indicator_chart_window

extern int barToCheck = 1;
extern int cci = 34;
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----

//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----

//----
   return(0);
  }

//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start(){
   static int dir = 0;
   static int mode = 0;

//----

   if(Bars>mode){
      double xo60g = iCustom(Symbol(),0,"ZZ  MTF  XO  A",60,5,0,barToCheck);//green 60
      double xo60r = iCustom(Symbol(),0,"ZZ  MTF  XO  A",60,5,1,barToCheck);//red 60

      double xo30g = iCustom(Symbol(),0,"ZZ  MTF  XO  A",30,6,0,barToCheck);//green 30
      double xo30r = iCustom(Symbol(),0,"ZZ  MTF  XO  A",30,6,1,barToCheck);//red 30

      double xo15g = iCustom(Symbol(),0,"ZZ  MTF  XO  A",15,5,0,barToCheck);//green 15
      double xo15r = iCustom(Symbol(),0,"ZZ  MTF  XO  A",15,5,1,barToCheck);//red 15

      double xo5g = iCustom(Symbol(),0,"ZZ  MTF  XO  A",5,5,0,barToCheck);//green 5
      double xo5r = iCustom(Symbol(),0,"ZZ  MTF  XO  A",5,5,1,barToCheck);//red 5

      double pxo60g = iCustom(Symbol(),0,"ZZ  MTF  XO  A",60,5,0,barToCheck+1);//green 60
      double pxo60r = iCustom(Symbol(),0,"ZZ  MTF  XO  A",60,5,1,barToCheck+1);//red 60

      double pxo30g = iCustom(Symbol(),0,"ZZ  MTF  XO  A",30,6,0,barToCheck+1);//green 30
      double pxo30r = iCustom(Symbol(),0,"ZZ  MTF  XO  A",30,6,1,barToCheck+1);//red 30

      double pxo15g = iCustom(Symbol(),0,"ZZ  MTF  XO  A",15,5,0,barToCheck+1);//green 15
      double pxo15r = iCustom(Symbol(),0,"ZZ  MTF  XO  A",15,5,1,barToCheck+1);//red 15

      double pxo5g = iCustom(Symbol(),0,"ZZ  MTF  XO  A",5,5,0,barToCheck+1);//green 5
      double pxo5r = iCustom(Symbol(),0,"ZZ  MTF  XO  A",5,5,1,barToCheck+1);//red 5

      //green open signal
      if(xo60g != 0 && xo30g != 0 && xo15g != 0 && xo5g != 0 && (pxo60g == 0 || pxo30g == 0 || pxo15g == 0 || pxo5g == 0) ){
         //Alert(Symbol()+" "+Period()+" XO Long ",Bid);
         mode = Bars;
         dir = 1;
         }//red open signal
      else if(xo60r != 0 && xo30r != 0 && xo15r != 0 && xo5r != 0 && (pxo60r == 0 || pxo30r == 0 || pxo15r == 0 || pxo5r == 0) ){
         //Alert(Symbol()+" "+Period()+" XO Short ",Bid);
         mode = Bars;
         dir = -1;
         }
      }
   if(dir!=0){
      static int ltime = 0;
      if(ltime!=Bars){
         double cci0 = iCCI(NULL,0,cci,PRICE_CLOSE,barToCheck);
         double cci1 = iCCI(NULL,0,cci,PRICE_CLOSE,barToCheck+1);
         if(dir==1 && cci0>0 && cci1<0){
            ltime=Bars;
            Alert(Symbol()+" "+Period()+" XO Long ",Bid);
            }
         else if(dir==-1 && cci0<0 && cci1>0){
            ltime=Bars;
            Alert(Symbol()+" "+Period()+" XO Short ",Bid);
            }
         }
      }
//----
   return(0);
  }
//+------------------------------------------------------------------+

[Post to Twitter] Tweet This Post  [Post to Delicious] Delicious This Post  [Post to Ping.fm] Ping This Post  [Post to StumbleUpon] Stumble This Post 

XO.mq4

//+------------------------------------------------------------------+
//|                                                           XO.mq4 |
//|                                   Original Author SHARIPOV AINUR |
//|               Conversion to MT4 and modification only adoleh2000 |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2005, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#property indicator_separate_window
#property  indicator_buffers 2
#property  indicator_color1  Lime  //XO up
#property  indicator_color2  Red  //XO down

extern double KirPER=10;
double cb,valuel,valueh,CurrentBar;
double Kir ,Hi, Lo, KirUp, KirDn,mode,cnt,cnt1,cur,kr,no;
double ExtMapBuffer1[]; // XO up
double ExtMapBuffer2[]; // Xo down
int loopbegin;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
     IndicatorBuffers(2);
//---- drawing settings

   SetIndexBuffer(0,ExtMapBuffer1);//bbMacd line
   SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,2);

   SetIndexBuffer(1,ExtMapBuffer2);//Upperband line
   SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,2);

  IndicatorShortName("XO ("+KirPER+"), "+valueh+","+valuel);
  SetIndexLabel(0,"XO Up");
  SetIndexLabel(1,"XO Down");

//---- indicators
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
      int limit;
   int counted_bars=IndicatorCounted();
//---- check for possible errors
   if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
   if(counted_bars>0) counted_bars--;

      loopbegin = Bars-1;
      for(int i = loopbegin; i >= 0; i--)
      {

if (Kir<1)
{
Hi=Close[i];
Lo=Close[i];
Kir=1;
}

cur=(Close[i]);

if (cur > (Hi+KirPER * Point))
{
Kir=Kir+1;
Hi=cur;
Lo=cur-KirPER*Point;
KirUp=1;
KirDn=0;
kr=kr+1;
no=0;
}

if (cur < (Lo-KirPER*Point))
{
Lo=cur;
Hi=cur+KirPER*Point;
KirUp=0;
KirDn=1;
Kir=Kir+1;
no=no+1;
kr=0;
}

valueh=kr;
ExtMapBuffer1[i]=valueh;//XO up

if (valueh < 0)
{
ExtMapBuffer1[i] = 0;
}
if (valueh > 0)
{
ExtMapBuffer1[i] = 1;
}

valuel=0-no;
ExtMapBuffer2[i]=valuel;// XO down

if (valuel > 0)
{
ExtMapBuffer2[i] = 0;
}
if (valuel < 0)
{
ExtMapBuffer2[i] = -1;
}

}

//----
   return(0);
  }
//+------------------------------------------------------------------+

[Post to Twitter] Tweet This Post  [Post to Delicious] Delicious This Post  [Post to Ping.fm] Ping This Post  [Post to StumbleUpon] Stumble This Post 

X_profile.mq4

//+------------------------------------------------------------------+
//|                                                    X_profile.mq4 |
//|                                Copyright ?2005, Trading Studio. |
//|                                          http://www.bluechips.it |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2005, Trading Studio."
#property link      "http://www.bluechips.it"

#property indicator_chart_window
#property indicator_buffers 5
#property indicator_color1 Red
#property indicator_color2 Yellow
#property indicator_color3 Green
#property indicator_color4 Yellow
#property indicator_color5 Green

double buffer1[];
double buffer2[];
double buffer3[];
double buffer4[];
double buffer5[];
double parziale;

extern datetime  DataInizio=D'2005.08.01 04:30';

//+------------------------------------------------------------------+
//| inizializzazione                         |
//+------------------------------------------------------------------+
int init()
  {

Print("sei nell_indicatore");

//---- settaggio indicatore
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,buffer1);
SetIndexBuffer(1,buffer2);
SetIndexBuffer(2,buffer3);
SetIndexBuffer(3,buffer4);
SetIndexBuffer(4,buffer5);
IndicatorShortName("31Prova3");
if(!SetIndexBuffer(0,buffer1) && !SetIndexBuffer(1,buffer2) && !SetIndexBuffer(2,buffer3) && !SetIndexBuffer(3,buffer4) && !SetIndexBuffer(4,buffer5))
   Print("buffer non settato");
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| deinizializzazione
//+------------------------------------------------------------------+
int deinit()
  {
   return(0);
  }
//+------------------------------------------------------------------+
//| iterazione
//+------------------------------------------------------------------+
int start()
  {

   double array_price[][6];
   int cont;
   double deviazione;

   ArrayInitialize(array_price,0);
   ArrayCopyRates(array_price,(Symbol()));

for (int j = Bars-1; j >= 0; j--) {

if (Time[j]>=DataInizio) {
   for (int i = j; i >= 0; i--)
   {
      cont++;
         parziale=parziale+array_price[i][4];
         buffer1[i]=parziale/cont;
         deviazione=iStdDev(NULL,0,cont,MODE_SMA,0,PRICE_CLOSE,0);
         buffer2[i]=buffer1[i]+deviazione;
         buffer3[i]=buffer1[i]+(2*deviazione);
         buffer4[i]=buffer1[i]-deviazione;
         buffer5[i]=buffer1[i]-(2*deviazione);
   }
   break;
}
}
   return(0);
  }
//+------------------------------------------------------------------+

[Post to Twitter] Tweet This Post  [Post to Delicious] Delicious This Post  [Post to Ping.fm] Ping This Post  [Post to StumbleUpon] Stumble This Post 

x.mq4

//+——————————————————————+
//| x.mq4 |
//| Copyright ?2005, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+——————————————————————+
#property copyright “Copyright ?2005, MetaQuotes Software Corp.”
#property link “http://www.metaquotes.net”

#property indicator_chart_window
//—- input parameters
extern int ExtParam1;
//+——————————————————————+
//| Custom indicator initialization function |
//+——————————————————————+
int init()
{
//—- indicators
//—-
return(0);
}
//+——————————————————————+
//| Custor indicator deinitialization function |
//+——————————————————————+
int deinit()
{
//—-

//—-
return(0);
}
//+——————————————————————+
//| Custom indicator iteration function |
//+——————————————————————+
int start()
{
int counted_bars=IndicatorCounted();
//—-

//—-
return(0);
}
//+——————————————————————+

[Post to Twitter] Tweet This Post  [Post to Delicious] Delicious This Post  [Post to Ping.fm] Ping This Post  [Post to StumbleUpon] Stumble This Post 

Tweet This Post links powered by Tweet This v1.3.9, a WordPress plugin for Twitter.