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
forex decode

Wolf.mq4

//+------------------------------------------------------------------+
//| A WolfWave finder based on ZIGZAG.MQ4                            |
//| fukinagashi a t gmx p o i n t net                                              |
//+------------------------------------------------------------------+

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 DodgerBlue
#define MaxAnalyze 200
#define UpperDistance 5
#define LowerDistance 5
#define Title "WW"

//---- indicator parameters
extern int ExtDepth=12;
extern int ExtDeviation=5;
extern int ExtBackstep=3;

//---- indicator buffers
double ExtMapBuffer[];
double ExtMapBuffer2[];

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

   SetIndexStyle(0,DRAW_SECTION);
//---- indicator buffers mapping
   SetIndexBuffer(0,ExtMapBuffer);
   SetIndexBuffer(1,ExtMapBuffer2);

   SetIndexEmptyValue(0,0.0);

   ArraySetAsSeries(ExtMapBuffer,true);
   ArraySetAsSeries(ExtMapBuffer2,true);
//---- indicator short name
   IndicatorShortName("WolfWave");
//---- initialization done

   return(0);
  }

int deinit()
{
      for (int i=1;i<=5;i++) {
         ObjectDelete(Title + ""+i);
      }

      ObjectDelete(Title + "Line-2-4");
      ObjectDelete(Title + "Line-1-3");
      ObjectDelete(Title + "Line-1-4");
      }

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start()
  {
   int    shift, back,lasthighpos,lastlowpos;
   double val,res;
   double curlow,curhigh,lasthigh,lastlow;
   int num=0;

   int Peak[MaxAnalyze],h,i,j;
   int Wolf[6];
   string WolfWave="None";
   double Winkel1, Winkel2;
   bool found=false;

   for(shift=Bars-ExtDepth; shift>=0; shift--)
     {
      val=Low[Lowest(NULL,0,MODE_LOW,ExtDepth,shift)];
      if(val==lastlow) val=0.0;
      else
        {
         lastlow=val;
         if((Low[shift]-val)>(ExtDeviation*Point)) val=0.0;
         else
           {
            for(back=1; back<=ExtBackstep; back++)
              {
               res=ExtMapBuffer[shift+back];
               if((res!=0)&&(res>val)) ExtMapBuffer[shift+back]=0.0;
              }
           }
        }
      ExtMapBuffer[shift]=val;
      //--- high
      val=High[Highest(NULL,0,MODE_HIGH,ExtDepth,shift)];
      if(val==lasthigh) val=0.0;
      else
        {
         lasthigh=val;
         if((val-High[shift])>(ExtDeviation*Point)) val=0.0;
         else
           {
            for(back=1; back<=ExtBackstep; back++)
              {
               res=ExtMapBuffer2[shift+back];
               if((res!=0)&&(res<val)) ExtMapBuffer2[shift+back]=0.0;
              }
           }
        }
      ExtMapBuffer2[shift]=val;
     }

   // final cutting
   lasthigh=-1; lasthighpos=-1;
   lastlow=-1;  lastlowpos=-1;

   for(shift=Bars-ExtDepth; shift>=0; shift--)
     {
      curlow=ExtMapBuffer[shift];
      curhigh=ExtMapBuffer2[shift];
      if((curlow==0)&&(curhigh==0)) continue;
      //---
      if(curhigh!=0)
        {
         if(lasthigh>0)
           {
            if(lasthigh<curhigh) ExtMapBuffer2[lasthighpos]=0;
            else ExtMapBuffer2[shift]=0;
           }
         //---
         if(lasthigh<curhigh || lasthigh<0)
           {
            lasthigh=curhigh;
            lasthighpos=shift;
           }
         lastlow=-1;
        }
      //----
      if(curlow!=0)
        {
         if(lastlow>0)
           {
            if(lastlow>curlow) ExtMapBuffer[lastlowpos]=0;
            else ExtMapBuffer[shift]=0;
           }
         //---
         if((curlow<lastlow)||(lastlow<0))
           {
            lastlow=curlow;
            lastlowpos=shift;
           }
         lasthigh=-1;
        }
     }

   for(shift=Bars-1; shift>=0; shift--)
     {
      if(shift>=Bars-ExtDepth) ExtMapBuffer[shift]=0.0;
      else
        {
         res=ExtMapBuffer2[shift];
         //if(res!=0.0) ExtMapBuffer[shift]=res;
         if(res>0.0) ExtMapBuffer[shift]=res;
        }
     }

// Basic Modification ==>

	i=0;
   for(h=0; h<Bars && i<MaxAnalyze; h++)
   {
      if ((ExtMapBuffer[h]!=0) || (ExtMapBuffer2[h]!=0)) {
         Peak[i]= h;
         i++;
      }
   }

   for(j=0;j<i && j<MaxAnalyze && found==false;j++) {
      Wolf[1]=Peak[j+4]; // 1 High
      Wolf[2]=Peak[j+3]; // 2 Low
      Wolf[3]=Peak[j+2]; // 3 High
      Wolf[4]=Peak[j+1]; // 4 Low
      Wolf[5]=Peak[j+0]; // 5 High
      if (     // Buy Wolfwave
         Low[Wolf[1]]<High[Wolf[2]] &&  // 1. + 3.a.
         Low[Wolf[3]]<Low[Wolf[1]] &&   // 2. + 3.b.
         Low[Wolf[3]]<High[Wolf[4]]  // 4
         ) {
            WolfWave="Buy";
      } else if
         (     // Sell Wolfwave
         High[Wolf[1]]>Low[Wolf[2]] &&  // 1. + 3.a.
         High[Wolf[3]]>High[Wolf[1]] &&   // 2. + 3.b.
         High[Wolf[3]]>Low[Wolf[4]]  // 4
         ) {
            WolfWave="Sell";
         } else {
            WolfWave="Not";
      }

      if(WolfWave=="Buy") {
        	ObjectCreate(Title + "Line-1-3", OBJ_TREND, 0, Time[Wolf[1]],Low[Wolf[1]], Time[Wolf[3]],Low[Wolf[3]] );
        	if (ObjectGetValueByShift(Title + "Line-1-3", Wolf[5]) >= Low[Wolf[5]]) {
           	ObjectCreate(Title + "1", OBJ_TEXT, 0, Time[Wolf[1]],Low[Wolf[1]]-LowerDistance*Point );
           	ObjectSetText(Title + "1", ""+DoubleToStr(1,0), 10, "Arial", Red);
           	ObjectCreate(Title + "2", OBJ_TEXT, 0, Time[Wolf[2]],High[Wolf[2]]+UpperDistance*Point );
           	ObjectSetText(Title + "2", ""+DoubleToStr(2,0), 10, "Arial", Red);
           	ObjectCreate(Title + "3", OBJ_TEXT, 0, Time[Wolf[3]],Low[Wolf[3]]-LowerDistance*Point );
           	ObjectSetText(Title + "3", ""+DoubleToStr(3,0), 10, "Arial", Red);
           	ObjectCreate(Title + "4", OBJ_TEXT, 0, Time[Wolf[4]],High[Wolf[4]]+UpperDistance*Point );
           	ObjectSetText(Title + "4", ""+DoubleToStr(4,0), 10, "Arial", Red);
           	ObjectCreate(Title + "5", OBJ_TEXT, 0, Time[Wolf[5]],Low[Wolf[5]]-LowerDistance*Point );
           	ObjectSetText(Title + "5", ""+DoubleToStr(5,0), 10, "Arial", Red);
           	ObjectCreate(Title + "Line-1-4", OBJ_TREND, 0, Time[Wolf[1]],Low[Wolf[1]], Time[Wolf[4]],High[Wolf[4]] );
           	ObjectSet(Title + "Line-1-4", OBJPROP_COLOR, LimeGreen);
          	ObjectSet(Title + "Line-1-4", OBJPROP_WIDTH, 2);
           	Comment("Buy Wolfwave (" + TimeToStr(Time[Wolf[5]],TIME_DATE|TIME_MINUTES) + ") at " + (ObjectGetValueByShift("Line-1-3", Wolf[5])-5*Point) + " SL " + High[Wolf[5]]);
          	// found=true;
         } else {
            ObjectDelete(Title + "Line-1-3");
         }
      } else if (WolfWave=="Sell") {
         ObjectCreate(Title + "Line-1-3", OBJ_TREND, 0, Time[Wolf[1]],High[Wolf[1]], Time[Wolf[3]],High[Wolf[3]] );
         if ( ObjectGetValueByShift(Title + "Line-1-3", Wolf[5]) <= High[Wolf[5]] ) {
           	ObjectCreate(Title + "1", OBJ_TEXT, 0, Time[Wolf[1]],High[Wolf[1]]+UpperDistance*Point );
            ObjectSetText(Title + "1", ""+DoubleToStr(1,0), 10, "Arial", Red);
            ObjectCreate(Title + "2", OBJ_TEXT, 0, Time[Wolf[2]],Low[Wolf[2]]-LowerDistance*Point );
            ObjectSetText(Title + "2", ""+DoubleToStr(2,0), 10, "Arial", Red);
            ObjectCreate(Title + "3", OBJ_TEXT, 0, Time[Wolf[3]],High[Wolf[3]]+UpperDistance*Point );
            ObjectSetText(Title + "3", ""+DoubleToStr(3,0), 10, "Arial", Red);
            ObjectCreate(Title + "4", OBJ_TEXT, 0, Time[Wolf[4]],Low[Wolf[4]]-LowerDistance*Point );
            ObjectSetText(Title + "4", ""+DoubleToStr(4,0), 10, "Arial", Red);
            ObjectCreate(Title + "5", OBJ_TEXT, 0, Time[Wolf[5]],High[Wolf[5]]+UpperDistance*Point );
            ObjectSetText(Title + "5", ""+DoubleToStr(5,0), 10, "Arial", Red);
            ObjectCreate(Title + "Line-1-4", OBJ_TREND, 0, Time[Wolf[1]],High[Wolf[1]], Time[Wolf[4]],Low[Wolf[4]] );
            ObjectSet(Title + "Line-1-4", OBJPROP_COLOR, LimeGreen);
            ObjectSet(Title + "Line-1-4", OBJPROP_WIDTH, 2);
           	Comment("Sell Wolfwave (" + TimeToStr(Time[Wolf[5]],TIME_DATE|TIME_MINUTES) + ") at " + (ObjectGetValueByShift("Line-1-3", Wolf[5])-5*Point) + " SL " + High[Wolf[5]]);
            // found=true;
         } else {
           	ObjectDelete(Title + "Line-1-3");
         }
      }
   }
}

[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 

wlxFractals.mq4

//+------------------------------------------------------------------+
//|                                                  wlxFractals.mq4 |
//|         Copyright ?2004, by konKop, GOODMAN, Mstera, af + wellx |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2004, by wellx"
#property link      "http://www.metaquotes.net"

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 DeepSkyBlue
#property indicator_color2 Red
//---- input parameters
extern int       Equals=5;
extern int       nLeftUp=2;
extern int       nRightUp=2;
extern int       nLeftDown=2;
extern int       nRightDown=2;
//---- buffers
double FractalsUp[];
double FractalsDown[];

int pos=0, cntup=0, cntdown=0, cnt=0;
int r=0,l=0,e=0;
int fup=0,fdown=0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_ARROW);
   SetIndexArrow(0,217);
   SetIndexBuffer(0,FractalsUp);
   SetIndexEmptyValue(0,0.0);
   SetIndexStyle(1,DRAW_ARROW);
   SetIndexArrow(1,218);
   SetIndexBuffer(1,FractalsDown);
   SetIndexEmptyValue(1,0.0);

   cntup=nLeftUp+nRightUp+Equals+1;
   cntdown=nLeftDown+Equals+1;
   if (cntup>=cntdown) cnt=cntup;
   if (cntup<cntdown)  cnt=cntdown;
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//---- TODO: add your code here

//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int i=0, j=0;
   int cbars=IndicatorCounted();
   if  (cbars<0) return(-1);
   if  (cbars>0) cbars--;

   pos=0;

   if (cbars > (Bars-cnt-1)) pos=(Bars-cnt-1);
   else pos=cbars+nRightUp;

   while (pos>=nRightUp)
    {
     FractalsUp[pos]  =NULL;
     FractalsDown[pos]=NULL;

     //???????
     r=nRightUp; //????? ??? ????????
     for (i=1;i<=r;i++)
     {
      if (High[pos]<=High[pos-i]) break;
     }

     //?? ??? ??? ? i ??? ?? ???r+1
     if (i==r+1) //FractalsUp[pos]=High[pos];
     {
      l=nLeftUp;  //????? ???????????
      e=Equals;
      for (j=1;j<=l+Equals;j++)
       {

        if (High[pos] < High[pos+j]) break;
        if (High[pos] > High[pos+j]) l--;
        if (High[pos] == High[pos+j])e--;
        if (l==0)
         {
           FractalsUp[pos]=High[pos];
           break;
         }
        if (e<0) break;
       }
     }

     //??????
     r=nRightDown; //????? ??? ????????
     for (i=1;i<=r;i++)
     {
      if (Low[pos]>=Low[pos-i]) break;
     }

     if (i==r+1) //FractalsUp[pos]=High[pos];
     {
      l=nLeftDown;  //????? ???????????
      e=Equals;
      for (j=1;j<=l+Equals;j++)
       {

        if (Low[pos] > Low[pos+j]) break;
        if (Low[pos] < Low[pos+j]) l--;
        if (Low[pos] == Low[pos+j])e--;
        if (l==0)
         {
           FractalsDown[pos]=Low[pos];
           break;
         }
        if (e<0) break;
       }
     }
    pos--;
    }
//----
   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 

wlxBWWiseMan-2.mq4

//+------------------------------------------------------------------+
//|                                               wlxBWWiseMan-2.mq4 |
//|                                          Copyright ?2005, wellx |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2005, wellx"
#property link      "http://www.metaquotes.net"

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 DarkOrange
#property indicator_color2 Magenta

//---- input parameters

extern int       updown=8;
//---- buffers
double BWWM2Up[];
double BWWM2Down[];

int pos=0;
double AO,AO1,AO2,AO3,AO4;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_ARROW);
   SetIndexArrow(0,141);
   SetIndexBuffer(0,BWWM2Up);
   SetIndexEmptyValue(0,0.0);
   SetIndexStyle(1,DRAW_ARROW);
   SetIndexArrow(1,141);
   SetIndexBuffer(1,BWWM2Down);
   SetIndexEmptyValue(1,0.0);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//---- TODO: add your code here

//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int  cbars=IndicatorCounted();
   if  (cbars<0) return(-1);
   if  (cbars>0) cbars--;
//---- TODO: add your code here
   if (cbars > (Bars-40)) pos=(Bars-40);
   else pos=cbars;
//----
   while (pos > 0)
   {
    BWWM2Up[pos]=NULL;
    BWWM2Down[pos]=NULL;
    AO=iAO(NULL,0,pos);
    AO1=iAO(NULL,0,pos+1);
    AO2=iAO(NULL,0,pos+2);
    AO3=iAO(NULL,0,pos+3);
    AO4=iAO(NULL,0,pos+4);

    if (
        (AO4>0.0 && AO3>0.0 )
          &&
        (AO4<AO3 && AO3>AO2 && AO2>AO1 && AO1>AO)
       )
        BWWM2Up[pos]=(High[pos]+updown*Point);

    if (
        (AO4<0.0 && AO3<0.0 )
          &&
        (AO4>AO3 && AO3<AO2 && AO2<AO1 && AO1<AO)
       )
        BWWM2Down[pos]=(Low[pos]-updown*Point);
     pos--;
    }

    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 

wlxBWWiseMan-1.mq4

//+------------------------------------------------------------------+
//|                                                 BW-wiseMan-1.mq4 |
//|                                          Copyright ?2005, wellx |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2005, wellx"
#property link      "http://www.metaquotes.net"

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Yellow
#property indicator_color2 OrangeRed

extern int  updown=5; //???? ????? ???? ???????? ???
extern int  back=2;   // ??? ????? ???????

//---- buffers
double BWWM1Up[];
double BWWM1Down[];

int pos=0;
int i=0;
bool contup=true,contdown=true;

//+-----------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_ARROW);
   SetIndexArrow(0,140);
   SetIndexBuffer(0,BWWM1Up);
   SetIndexEmptyValue(0,0.0);

   SetIndexStyle(1,DRAW_ARROW);
   SetIndexArrow(1,140);
   SetIndexBuffer(1,BWWM1Down);
   SetIndexEmptyValue(1,0.0);

   IndicatorDigits(6);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//---- TODO: add your code here

//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int  cbars=IndicatorCounted();
   if  (cbars<0) return(-1);
   if  (cbars>0) cbars--;
//---- TODO: add your code here
   //if (cbars == 0) return(0);
   pos=cbars;
   while (pos > 0)
   {
    BWWM1Up[pos]=NULL;
    BWWM1Down[pos]=NULL;

    if (
        (Low[pos]> iAlligator(NULL,0,13,8,8,5,5,3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORLIPS, pos))
         &&
        (Low[pos]> iAlligator(NULL,0,13,8,8,5,5,3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORTEETH, pos))
         &&
        (Low[pos]> iAlligator(NULL,0,13,8,8,5,5,3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORJAW, pos))
         &&
        (Close[pos]<((High[pos]+Low[pos])/2))
       )
        {
           contup=true;
           for(i=1; i <= back ;i++)
               {
                 if (High[pos]<=High[pos+i])
                  {
                   contup=false;
                   break;
                  }
               }
           if (contup) BWWM1Up[pos]=(High[pos]+updown*Point);
        }

    if (
        (High[pos]< iAlligator(NULL,0,13,8,8,5,5,3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORLIPS, pos))
         &&
        (High[pos]< iAlligator(NULL,0,13,8,8,5,5,3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORTEETH, pos))
         &&
        (High[pos]< iAlligator(NULL,0,13,8,8,5,5,3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORJAW, pos))
         &&
        (Close[pos]>((High[pos]+Low[pos])/2))
       )
        {
           contdown=true;
           for(i=1; i <= back ;i++)
               {
                 if (Low[pos]>=Low[pos+i])
                  {
                   contdown=false;
                   break;
                  }
               }
           if (contdown) BWWM1Down[pos]=(Low[pos]-updown*Point);
        }

    pos--;
   }

//----
   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 

WisemanAO.mq4

//+------------------------------------------------------------------+
//|                                               wlxBWWiseMan-2.mq4 |
//|                                          Copyright ?2005, wellx |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2005, wellx"
#property link      "http://www.metaquotes.net"

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Green
//---- input parameters
extern int updown = 10;
extern bool UseAlert=true;
//---- buffers
double BWWM2Up[];
double BWWM2Down[];
string UD="";

//----
int pos = 0;
double AO, AO1, AO2, AO3, AO4;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexBuffer(0, BWWM2Up);
   SetIndexBuffer(1, BWWM2Down);
//----
   SetIndexStyle(0, DRAW_ARROW, 0, 2);
   SetIndexStyle(1, DRAW_ARROW, 0, 2);
//----
   SetIndexArrow(0, 140);
   SetIndexArrow(1, 141);
//----
   IndicatorShortName("StrInd(" + updown + ")");
   SetIndexLabel(0, "StrIndUp");
   SetIndexLabel(1, "StrIndDn");
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int cbars = IndicatorCounted();
//----
   if(cbars < 0)
       return(-1);
//----
   if(cbars > 0)
       cbars--;
//----
   if(cbars > (Bars - 40))
       pos = (Bars - 40);
   else
       pos = Bars - cbars;
//----
   while(pos > 0)
     {
       BWWM2Up[pos] = NULL;
       BWWM2Down[pos] = NULL;
       AO = iAO(NULL, 0, pos);
       AO1 = iAO(NULL, 0, pos + 1);
       AO2 = iAO(NULL, 0, pos + 2);
       AO3 = iAO(NULL, 0, pos + 3);
       AO4 = iAO(NULL, 0, pos + 4);
       //----
       if((AO4 > 0.0 && AO3 > 0.0) && (AO4 < AO3 && AO3 > AO2 && AO2 >AO1 && AO1 > AO))
           BWWM2Up[pos] = (High[pos] + updown*Point);
            if (pos < 2 )
  {
  UD=" Up.";
  DoAlert(UD);
  }

      //----
       if((AO4 < 0.0 && AO3 < 0.0) && (AO4 > AO3 && AO3 < AO2 && AO2 < AO1 && AO1 < AO))
           BWWM2Down[pos] = (Low[pos] - updown*Point);
            if (pos < 2 )
  {
  UD=" Down.";
  DoAlert(UD);
  }

       pos--;
     }
       return(0);

    //   SpeechText("There is an opportunity to buy or sell ",

    }
void DoAlert(string UD)
{
   if (!NewBar() || !UseAlert)
      return;
     Alert (Symbol()," ",Period(),"WisemanAO ",UD);

}

  bool NewBar()
{
   static datetime dt  = 0;
   if (dt != Time[0])
   {
      dt = Time[0];
      return(true);
   }

}

[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 

Wiseman_1.mq4

//+------------------------------------------------------------------+
//|                                                    Wiseman 1.mq4 |
//|                           Bill Williams Wiseman 1 Divergent bars |
//|                                             Author: David Thomas |
//|                                      MQ4 Conversion: Pavel Kulko |
//|                                                  polk@alba.dp.ua |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2005, Pavel Kulko"
#property link      "polk@alba.dp.ua"

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Aqua
#property indicator_color2 Red

double UpBuf[],DnBuf[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init() {
   SetIndexStyle(0,DRAW_HISTOGRAM,0,2);
   SetIndexBuffer(0,UpBuf);
   SetIndexStyle(1,DRAW_HISTOGRAM,0,2);
   SetIndexBuffer(1,DnBuf);
   return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start() {
   int result;
   double median;
   int    counted_bars=IndicatorCounted();
   int limit = Bars-counted_bars-1;
   for(int i=limit; i>=0; i--) {
     result = 0;
     median = (High[i]+Low[i])/2;
     if((Low[i] < Low[i+1]) && (Close[i] > median)) result = -1;
     if((High[i] > High[i+1]) && (Close[i] < median)) result = 1;
     if(result > 0) {
       UpBuf[i] = Low[i];
       DnBuf[i] = High[i];
     }
     if(result < 0) {
       UpBuf[i] = High[i];
       DnBuf[i] = Low[i];
     }
   }
   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 

William36HistogramWallerTest.mq4

/*
original formula)
WH:=HHV(HIGH,5);
WL:=LLV(LOW,5);

//WRD:=(( HHV( WH,36 )-c ) /( HHV(WH,36 ) - LLV( WL,36) ) ) *- 100,

//WDo:=WRD+50;

//WU:=IF(WDo>0,WDo,0);
//WD:=IF(WDo<0,WDo,0);
//{- this will give you the william's when it is below zero and it is plotted red}
//LN:=0;

*/

#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 LimeGreen
#property indicator_color2 Red
#property indicator_color3 Gray
#property indicator_maximum 50
#property indicator_minimum -50
#property indicator_level1 0
#property indicator_level2 15
#property indicator_level3 -15
//---- input parameters

//---- buffers

double WU[],WD[],W[],Zero[];
int Ssw=0,Bsw=0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   string short_name;
//---- 3 additional buffers are used for counting.
   IndicatorBuffers(4);
   SetIndexBuffer(3,W);
//---- indicator lines
   SetIndexStyle(0,DRAW_HISTOGRAM,0,3);
   SetIndexBuffer(0,WU);
   SetIndexStyle(1,DRAW_HISTOGRAM,0,3);
   SetIndexBuffer(1,WD);
      SetIndexStyle(2,DRAW_LINE,0,2);
   SetIndexBuffer(2,Zero);
//---- name for DataWindow and indicator subwindow label
   short_name="William%R36 With Alert";
   IndicatorShortName(short_name);

//---- indicator lines

//----
   SetIndexDrawBegin(0,40);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| BSPVolume
//+------------------------------------------------------------------+
int start()
 {
   int    i,k,counted_bars=IndicatorCounted();

   if(Bars<=40) return(0);
//---- initial zero
/*
  if(counted_bars<1)
     {
      for(i=1;i<=CCIPeriod;i++) CCIBuffer[Bars-i]=0.0;
      for(i=1;i<=CCIPeriod;i++) DevBuffer[Bars-i]=0.0;
      for(i=1;i<=CCIPeriod;i++) MovBuffer[Bars-i]=0.0;
     }
*/
//---- last counted bar will be recounted
   int limit=Bars-counted_bars;
   if (counted_bars>0) limit++; else if (limit>300) limit=300;

   for(i=0; i<limit; i++)
      W[i]=50+(-100)*(High[Highest(NULL,0,MODE_HIGH,40,i)]-Close[i])/(High[Highest(NULL,0,MODE_HIGH,40,i)]-Low[Lowest(NULL,0,MODE_LOW,40,i)]);

   for(i=0; i<limit; i++) Zero[i]=0;

   for(i=0; i<limit; i++)
  {

     if (W[i]<0 && W[i+1]>0 && i<2)
     {
     Ssw=1;
     Bsw=0;
     }

     if (W[i]>0 && W[i+1]<0 && i<2)
     {
     Ssw=0;
     Bsw=1;
     }

     if (Bsw==1 && i<2 && W[i]>=15 )
         {
     Ssw=0;
     Bsw=0;
       Alert (Symbol()," ",Period()," Willy Says B U Y");
         }
       if (Ssw==1 && i<2 && W[i]<=-15 )
         {
     Ssw=0;
     Bsw=0;
       Alert (Symbol()," ",Period()," Willy Says S E L L");
     }
 if (Ssw==1) Comment ("SELL SWITCH ON","i ",i,"W[i] ",W[i],"W[i+1] ",W[i+1]);
 if (Bsw==1) Comment ("BUY SWITCH ON","i ",i,"W[i] ",W[i],"W[i+1] ",W[i+1]);
 if (Bsw==0 && Ssw==0) Comment ("NO SWITCH ON","i ",i,"W[i] ",W[i],"W[i+1] ",W[i+1]);

   if (W[i]>0)
      {WU[i]=W[i];WD[i]=0;}

      else if (W[i]<0)
          {WU[i]=0;WD[i]=W[i];}

            else {WU[i]=0;WD[i]=0;}
        }
            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 

wellxAMA.mq4

//+------------------------------------------------------------------+
//|                                                      Kaufman.mq4 |
//|                             Copyright ?-2005, by konKop & wellx |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2004, by konKop,wellx"
#property link      "http://www.metaquotes.net"

#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 Sienna
#property indicator_color2 DeepSkyBlue
#property indicator_color3 Gold

//---- input parameters
extern int       periodAMA=9;
extern int       nfast=2;
extern int       nslow=30;
extern double    G=2.0;
extern double    dK=2.0;

//---- buffers
double kAMAbuffer[];
double kAMAupsig[];
double kAMAdownsig[];

//+------------------------------------------------------------------+

int    cbars=0, prevbars=0, prevtime=0;
double slowSC,fastSC;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexStyle(1,DRAW_ARROW);
   SetIndexArrow(1,159);
   SetIndexStyle(2,DRAW_ARROW);
   SetIndexArrow(2,159);
   SetIndexBuffer(0,kAMAbuffer);
   SetIndexBuffer(1,kAMAupsig);
   SetIndexBuffer(2,kAMAdownsig);

   IndicatorDigits(4);

//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    i,pos=0;
   double noise=0.000000001,AMA,AMA0,signal,ER;
   double dSC,ERSC,SSC,ddK;

   if (prevbars==Bars) return(0);

//---- TODO: add your code here
   slowSC=(2.0 /(nslow+1));
   fastSC=(2.0 /(nfast+1));
   cbars=IndicatorCounted();
   if (Bars<=(periodAMA+2)) return(0);
//---- check for possible errors
   if (cbars<0) return(-1);
//---- last counted bar will be recounted
   if (cbars>0) cbars--;
   pos=Bars-periodAMA-2;
   AMA0=Close[pos+1];
   while (pos>=0)
     {
      if(pos==Bars-periodAMA-2) AMA0=Close[pos+1];
      signal=MathAbs(Close[pos]-Close[pos+periodAMA]);
      noise=0.000000001;
      for(i=0;i<periodAMA;i++)
       {
        noise=noise+MathAbs(Close[pos+i]-Close[pos+i+1]);
       };
      ER =signal/noise;
      dSC=(fastSC-slowSC);
      ERSC=ER*dSC;
      SSC=ERSC+slowSC;
      AMA=AMA0+(MathPow(SSC,G)*(Close[pos]-AMA0));
      kAMAbuffer[pos]=AMA;

      ddK=(AMA-AMA0);
      if ((MathAbs(ddK)) > (dK*Point) && (ddK > 0)) kAMAupsig[pos]  =AMA;
      if ((MathAbs(ddK)) > (dK*Point) && (ddK < 0)) kAMAdownsig[pos]=AMA;

      AMA0=AMA;
      pos--;
     };
//----
   prevbars=Bars;
   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 

WeightedCCI.mq4

//+------------------------------------------------------------------+
//|                                                Weighted WCCI.mq4 |
//|                         Copyright ?2005, Luis Guilherme Damiani |
//|                                      http://www.damianifx.com.br |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2005, Luis Guilherme Damiani"
#property link      "http://www.damianifx.com.br"

#property indicator_separate_window
#property indicator_buffers 8
#property indicator_color1 Red
#property indicator_color2 DodgerBlue
#property indicator_color3 CadetBlue
#property indicator_color4 Red
#property indicator_color5 Red
#property indicator_color6 RoyalBlue
#property indicator_color7 RoyalBlue
#property indicator_color8 PaleGreen

//---- input parameters
extern int       TCCIp=7;
extern int       CCIp=13;
extern double    overbslevel=200.0;
extern double    triglevel=50.0;
extern double    weight=1.0;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double ExtMapBuffer5[];
double ExtMapBuffer6[];
double ExtMapBuffer7[];
double ExtMapBuffer8[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexLabel(0,"Turbo CCI");
   SetIndexStyle(1,DRAW_LINE,1,3);
   SetIndexBuffer(1,ExtMapBuffer2);
   SetIndexLabel(2,"CCI");
   SetIndexStyle(2,DRAW_HISTOGRAM);
   SetIndexBuffer(2,ExtMapBuffer3);
   SetIndexStyle(3,DRAW_LINE,1,3);
   SetIndexLabel(3,"CCI");
   SetIndexBuffer(3,ExtMapBuffer4);
   SetIndexStyle(4,DRAW_LINE,1,3);
   SetIndexBuffer(4,ExtMapBuffer5);
   SetIndexStyle(5,DRAW_LINE,STYLE_DASH,1);
   SetIndexBuffer(5,ExtMapBuffer6);
   SetIndexStyle(6,DRAW_LINE,STYLE_DASH,1);
   SetIndexBuffer(6,ExtMapBuffer7);
   SetIndexStyle(7,DRAW_LINE,STYLE_DASH,1);
   SetIndexBuffer(7,ExtMapBuffer8);

   SetIndexDrawBegin(0,50);
   SetIndexDrawBegin(1,50);
   SetIndexDrawBegin(2,50);
   SetIndexDrawBegin(3,50);
   SetIndexDrawBegin(4,50);
   SetIndexDrawBegin(5,50);
   SetIndexDrawBegin(6,50);
   SetIndexDrawBegin(7,50);

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

//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int trend_counter=0;
string trend="ZERO";
int start()
  {

   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=-1;
   int limit=Bars-counted_bars;
   //if (limit>Bars-CCIp-1)limit=Bars-CCIp-1;
   //Comment(Bars+"    "+limit);
   double Kw=0.0;
   int alt=0;
//----
   for (int shift = 0; shift<=limit;shift++)
   {

      double CCI=iCCI(NULL,0,CCIp,PRICE_TYPICAL,shift);
      double TCCI=iCCI(NULL,0,TCCIp,PRICE_TYPICAL,shift);

      if (weight==0)Kw=0;
      else
      {  Kw=weight*iATR(NULL,0,7,shift)/iATR(NULL,0,49,shift);
         CCI=CCI*Kw;
         TCCI=TCCI*Kw;
      }
      if(TCCI>overbslevel+50)TCCI=overbslevel+50;
      if(CCI>overbslevel+50)CCI=overbslevel+50;
      if(CCI<-overbslevel-50)CCI=-overbslevel-50;
      if(TCCI<-overbslevel-50)TCCI=-overbslevel-50;
      ExtMapBuffer1[shift]=TCCI;
      ExtMapBuffer2[shift]=CCI;
      ExtMapBuffer3[shift]=CCI;
      ExtMapBuffer4[shift]=overbslevel;
      ExtMapBuffer5[shift]=-overbslevel;
      ExtMapBuffer6[shift]=triglevel;
      ExtMapBuffer7[shift]=-triglevel;
      ExtMapBuffer8[shift]=0;

      if (shift==0)
      {	if (CCI>0)
		    if (trend=="UP" && limit>1)trend_counter+=1; else {trend_counter=1;trend="UP";}
	        else if (trend=="DOWN" && Bars-counted_bars>1) trend_counter+=1; else {trend_counter=1;trend="DOWN";}

	      Comment("CCI is trending ",trend," during last ",trend_counter," bar(s)");
      }
   }
//----
   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 

WeeklyPivotOnly[1].mq4

//+------------------------------------------------------------------+
//|                                                  WeeklyPivot.mq4 |
//|                                                                  |
//+------------------------------------------------------------------+

#property indicator_chart_window
#property indicator_buffers 7
#property indicator_color1 Magenta
#property indicator_color2 RoyalBlue
#property indicator_color3 Crimson
#property indicator_color4 RoyalBlue
#property indicator_color5 Crimson
#property indicator_color6 SeaGreen
#property indicator_color7 SeaGreen
//---- input parameters

//---- buffers
double PBuffer[];
double S1Buffer[];
double R1Buffer[];
double S2Buffer[];
double R2Buffer[];
double S3Buffer[];
double R3Buffer[];
string Pivot="WeeklyPivotPoint",Sup1="W_S 1", Res1="W_R 1";
string Sup2="W_S 2", Res2="W_R 2", Sup3="W_S 3", Res3="W_R 3";
int fontsize=10;
double P,S1,R1,S2,R2,S3,R3;
double last_week_high, last_week_low, this_week_open, last_week_close;

//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//---- TODO: add your code here

   ObjectDelete("WeeklyPivot");
   ObjectDelete("Sup1");
   ObjectDelete("Res1");
   ObjectDelete("Sup2");
   ObjectDelete("Res2");
   ObjectDelete("Sup3");
   ObjectDelete("Res3");

//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   string short_name;

//---- indicator line
   SetIndexStyle(0,DRAW_LINE,0,2,Magenta);
   SetIndexStyle(1,DRAW_LINE,0,2,RoyalBlue);
   SetIndexStyle(2,DRAW_LINE,0,2,Crimson);
   SetIndexStyle(3,DRAW_LINE,0,2,RoyalBlue);
   SetIndexStyle(4,DRAW_LINE,0,2,Crimson);
   SetIndexStyle(5,DRAW_LINE,0,2,SeaGreen);
   SetIndexStyle(6,DRAW_LINE,0,2,SeaGreen);
   SetIndexBuffer(0,PBuffer);
   SetIndexBuffer(1,S1Buffer);
   SetIndexBuffer(2,R1Buffer);
   SetIndexBuffer(3,S2Buffer);
   SetIndexBuffer(4,R2Buffer);
   SetIndexBuffer(5,S3Buffer);
   SetIndexBuffer(6,R3Buffer);

//---- name for DataWindow and indicator subwindow label
   short_name="WeeklyPivotPoint";
   IndicatorShortName(short_name);
   SetIndexLabel(0,short_name);

//----
   SetIndexDrawBegin(0,1);
//----

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

//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()

  {
   int counted_bars=IndicatorCounted();

   int limit, i;
//---- indicator calculation
if (counted_bars==0)
{

   ObjectCreate("WeeklyPivot", OBJ_TEXT, 0, 0,0);
   ObjectSetText("WeeklyPivot", "                            Weekly Pivot Point",fontsize,"Arial",Red);
   ObjectCreate("Sup1", OBJ_TEXT, 0, 0, 0);
   ObjectSetText("Sup1", "        wS 1",fontsize,"Arial",Red);
   ObjectCreate("Res1", OBJ_TEXT, 0, 0, 0);
   ObjectSetText("Res1", "        wR 1",fontsize,"Arial",Red);
   ObjectCreate("Sup2", OBJ_TEXT, 0, 0, 0);
   ObjectSetText("Sup2", "        wS 2",fontsize,"Arial",Red);
   ObjectCreate("Res2", OBJ_TEXT, 0, 0, 0);
   ObjectSetText("Res2", "        wR 2",fontsize,"Arial",Red);
   ObjectCreate("Sup3", OBJ_TEXT, 0, 0, 0);
   ObjectSetText("Sup3", "        wS 3",fontsize,"Arial",Red);
   ObjectCreate("Res3", OBJ_TEXT, 0, 0, 0);
   ObjectSetText("Res3", "        wR 3",fontsize,"Arial",Red);
}
   if(counted_bars<0) return(-1);

   limit=(Bars-counted_bars)-1;

for (i=limit; i>=0;i--)
{

   // Monday
	if ( 1 == TimeDayOfWeek(Time[i]) && 1 != TimeDayOfWeek(Time[i+1]) )
	{
		last_week_close = Close[i+1];
		this_week_open = Open[i];

		// WeeklyPivot
		P = (last_week_high + last_week_low + this_week_open + last_week_close) / 4;

   //R1 = (2*P)-last_week_low;
   //S1 = (2*P)-last_week_high;
   //R2 = P+(last_week_high - last_week_low);
   //S2 = P-(last_week_high - last_week_low);
   //R3 = (2*P)+(last_week_high-(2*last_week_low));
   //S3 = (2*P)-((2* last_week_high)-last_week_low);

   last_week_low=Low[i]; last_week_high=High[i];

	ObjectMove("WeeklyPivot", 0, Time[i],P);
   ObjectMove("Sup1", 0, Time[i],S1);
   ObjectMove("Res1", 0, Time[i],R1);
   ObjectMove("Sup2", 0, Time[i],S2);
   ObjectMove("Res2", 0, Time[i],R2);
   ObjectMove("Sup3", 0, Time[i],S3);
   ObjectMove("Res3", 0, Time[i],R3);

}

    last_week_high = MathMax(last_week_high, High[i]);
 	 last_week_low = MathMin(last_week_low, Low[i]);
    PBuffer[i]=P;
    S1Buffer[i]=S1;
    R1Buffer[i]=R1;
    S2Buffer[i]=S2;
    R2Buffer[i]=R2;
    S3Buffer[i]=S3;
    R3Buffer[i]=R3;

}

//----
   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 

 Page 4 of 100  « First  ... « 2  3  4  5  6 » ...  Last » 

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