Navigation´╝ÜHome > Content >

InsideBar_histo_mtf.mq4

Time: 2015-03-17 | Download file:InsideBar_histo_mtf.mq4

//+------------------------------------------------------------------+
//|                                                    DOSR_Dots.mq4 |
//|                                                          Kalenzo |
//| InnBar mtf                               http://www.fxservice.eu |
//+------------------------------------------------------------------+
//mod2008 fxtsd  ki

#property copyright "Kalenzo"
#property link      "http://www.fxservice.eu"
#property indicator_buffers 4
#property indicator_color1 Maroon
#property indicator_color2 CLR_NONE
#property indicator_color3 MediumVioletRed
#property indicator_color4 CLR_NONE

#property indicator_width3 3

double val1[];
double val2[];
double val11[];
double val12[];

extern int TimeFrame =60;
extern string  TimeFrames="M1;5,15,30,60H1;240H4;1440D1;10080W1;43200MN|0-CurrTF";

#property indicator_chart_window

//+---


int init()
  {
//---

   IndicatorBuffers (4);

   SetIndexBuffer(0,val11);
   SetIndexBuffer(1,val12);
   SetIndexBuffer(2,val1);
   SetIndexBuffer(3,val2);


   SetIndexStyle(0,DRAW_HISTOGRAM);
   SetIndexStyle(2,DRAW_HISTOGRAM);

   TimeFrame=MathMax(TimeFrame,Period());
   if (TimeFrame>Period())
      {
   SetIndexShift(0,1);
   SetIndexShift(2,TimeFrame/Period()-1);
      }
   else
      {
      SetIndexShift(0,0);
      SetIndexShift(2,0);
      }
   
   SetIndexEmptyValue(0,EMPTY_VALUE);
   SetIndexEmptyValue(1,EMPTY_VALUE);
   SetIndexEmptyValue(2,EMPTY_VALUE);
   SetIndexEmptyValue(3,EMPTY_VALUE);


   SetIndexLabel(0,"insideBar hi lo");
   SetIndexLabel(1,"prev Bar hi lo");


   return(0);
  }
//+--

int deinit()
  {

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

int start()
  {
      datetime TimeArray[];

      int i,y,limit;
      int counted_bars=IndicatorCounted();
      
      if(counted_bars<0) return(-1);
      if(counted_bars>0) counted_bars--;


      limit=Bars-counted_bars;
      limit=MathMax(limit,TimeFrame/Period());
  
      ArrayCopySeries(TimeArray, MODE_TIME,Symbol(),TimeFrame); 

      
      for( i=0, y=0; iH && L1        

Recommend