Navigation:Home > Content >

Goen_FIBO_EXP.mq4

Time: 2010-08-27 | Download file:Goen_FIBO_EXP.mq4

//+------------------------------------------------------------------+
//|                                                Goen FIBO EXP.mq4 |
//|                                           Copyright © 2008, GOEN |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2008, GOEN"

#property indicator_chart_window
//---- input parameters
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+

int init()
  {
//---- indicators
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   for(int i = ObjectsTotal() - 1; i >= 0; i--)
     {
       string ObjName = ObjectName(i);
       if(StringSubstr(ObjName, 0, 7) != "GOEN FE")
           continue;
       ObjectDelete(ObjName);   
     }

//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {int FH1S, FH2S, FL1S, FL2S, Shift=1;
   double FH1=0, FH2=0, FL1=0, FL2=0;  
   
   FH1S=0;
   while (FH1==0)
   { FH1S++;
     FH1=iFractals(NULL, 0, MODE_UPPER, FH1S);
   }
   FL1S=FH1S;
   while (FL1==0)
   { FL1S++;
     FL1=iFractals(NULL, 0, MODE_LOWER, FL1S);
   }
   FH2S=FL1S;
   while (FH2==0)
   { FH2S++;
     FH2=iFractals(NULL, 0, MODE_UPPER, FH2S);
   }
   string FiboExp = "GOEN FE";
   ObjectDelete(FiboExp);
   ObjectCreate(FiboExp, OBJ_EXPANSION, 0, Time[FH2S], FH2, Time[FL1S], FL1, Time[FH1S], FH1);
   ObjectSet(FiboExp, OBJPROP_WIDTH, 0);
//----
   return(0);
  }
//+------------------------------------------------------------------+

Recommend