Time_periodseparator_Satop





//+------------------------------------------------------------------+
//|                                                      Time_H1.mq4 |
//|                                                     Yuriy Tokman |
//|                                            yuriytokman@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Yuriy Tokman"
#property link      "yuriytokman@gmail.com"

#property indicator_chart_window


extern int     TF = 60; 

extern color   LineColir = DimGray;
extern int     LineStyle = 4;
extern int     LineWidth = 1;

extern bool    LineOnBckgrnd = true;
extern int     barsToProcess = 24;

extern string  TimeFrames = "M1;5,15,30,60H1;240H4;1440D1;10080W1;43200MN";
extern string  LineStyles = "line0 dash1 dot2 dashdot3 dashdotdot4";

string name;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   int i;
  
  
  
   for (i=0;i<Bars;i++)
    {
    ObjectDelete(name+DoubleToStr(i,0));
    }   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted(),
//----
   limit,
   i=0; 
   if(counted_bars>0)
      counted_bars--;
   
   limit=Bars-counted_bars;
   
   if(limit>barsToProcess)
      limit=barsToProcess;



      name = "TimeVLine M" +TF +" "+DoubleToStr(i,0);

   while (i<limit)
   {           
      datetime t = iTime(NULL,TF,i)+60*TF;
      if (t>0)
       {
        ObjectCreate (name +DoubleToStr(i,0),OBJ_VLINE,0,t,0);
        ObjectSet    (name +DoubleToStr(i,0),OBJPROP_STYLE,LineStyle);
        ObjectSet    (name +DoubleToStr(i,0),OBJPROP_COLOR,LineColir);
        ObjectSet    (name +DoubleToStr(i,0),OBJPROP_WIDTH,LineWidth);
        ObjectSet    (name +DoubleToStr(i,0),OBJPROP_BACK, LineOnBckgrnd);
//      ObjectSet    (name +DoubleToStr(i,0),OBJPROP_TIMEFRAMES,NULL);
       }            
     i++;  
   }  
//----
   return(0);
  }
//+------------------------------------------------------------------+



Sample





Analysis



Market Information Used:



Indicator Curves created:


Indicators Used:



Custom Indicators Used:

Order Management characteristics:

Other Features: