FIBO time zone end Date and Time

 

Hello Mates

I Need to Get the Date and Time of the Fibo Time Zone vertical line NO 4 as shown on the Attached photo

I am Using the Blow Code to the Get the Time and date for the first and 2nd vertical Line


datetime Time&Date()
  {
   datetime end_Time1;
   datetime end_Time2;
   datetime end_Time4;
   for(int i=0;i<=ObjectsTotal();i++)
     {
      string onjname1=ObjectName(i);
      if(ObjectType(onjname1)==OBJ_FIBOTIMES && onjname1=="Fibo1")
        {
         //this line to get the line Date 
         end_Time1=ObjectGet(onjname1,OBJPROP_TIME1);
         end_Time2=ObjectGet(onjname1,OBJPROP_TIME1);
         end_Time4=((((end_Time2-end_Time1))*4/60)+end_Time1);
         Comment("Value  :",end_Time4);
        }
     }
   return(end_Time4);
  }
 

Hi,

So it would be such :

datetime Time_Date(int get_num)
  {
   int end_Time1;
   int end_Time2;
   datetime end_Time_num=0;
   for(int i=0;i<=ObjectsTotal();i++)
     {
      string onjname1=ObjectName(i);
      if(ObjectType(onjname1)==OBJ_FIBOTIMES && StringFind(onjname1,"Fibo1")>-1)
        {
         //this line to get the line Date 
         end_Time1=iBarShift(_Symbol,PERIOD_CURRENT,(datetime)ObjectGet(onjname1,OBJPROP_TIME1),true);
         end_Time2=iBarShift(_Symbol,PERIOD_CURRENT,(datetime)ObjectGet(onjname1,OBJPROP_TIME2),true);
         end_Time_num=iTime(_Symbol,PERIOD_CURRENT,end_Time1-(end_Time1-end_Time2)*get_num);
         Comment("Value  :",end_Time_num);
        }
     }

   return(end_Time_num);
  }
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
   Comment(Time_Date(4));
  
   return(rates_total);
  }

Regards!

 

first thanks for your feedback

something is wrong it is not working it gives error , check attached

any one can help 

Files:
ganntime.mq4  3 kb
 
Ahmed Tawfik:

first thanks for your feedback

something is wrong it is not working it gives error , check attached

any one can help 

Try this new one:

Files:
ganntime.mq4  3 kb