//_PVD$FLv1.mq4_______________\¦/
//_http://www.forex-tsd.com__(ò ó)
//______________________o0o___(_)___o0o__
//___¦_____¦_____¦_____¦_____¦_____¦_____¦
//¦_____¦_____¦_____¦_____¦_____¦_____¦__
//___¦_____¦_____¦_____¦_____¦_____¦_____¦
//¦_____¦_____¦_____¦_____¦_____¦_____¦__
#property copyright "Baba_master"
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 Red      
#property indicator_color2 Green
#property indicator_color3 Tomato
#property indicator_color4 DodgerBlue
extern int GmtShift;
extern int MA_Period = 2;
extern int MA_Method = MODE_SMMA;
extern int PriceMode = PRICE_WEIGHTED;
double EXBUFFER[];
double EXBUFFER1[];
double EXBUFFER2[];
double EXBUFFER3[];
double OPening,Buf;
int init()
 { SetIndexStyle(0,DRAW_LINE,STYLE_SOLID);
   SetIndexStyle(1,DRAW_LINE,STYLE_SOLID);
   SetIndexStyle(2,DRAW_LINE,STYLE_SOLID);
   SetIndexStyle(3,DRAW_LINE,STYLE_SOLID);
   SetIndexBuffer(0, EXBUFFER);
   SetIndexBuffer(1, EXBUFFER1);
   SetIndexBuffer(2, EXBUFFER2);
   SetIndexBuffer(3, EXBUFFER3);
return(0);}
int start()
 {
int counted_bars = IndicatorCounted();
int limit, i;
if(counted_bars == 0)
 { if(Period() > PERIOD_H4) return(-1);}
   if(counted_bars < 0) return(-1);
   limit = (Bars - counted_bars) - 1;
   for(i = limit; i >= 0; i--)
 { if (TimeDayOfWeek(Time[i+1])!=0)
 { if(TimeDay(Time[i]) != TimeDay(Time[i+1]))
 { OPening = Open[i-GmtShift];}}
   Buf = iMA(Symbol(),0,MA_Period,0,MA_Method,PriceMode,i);
   EXBUFFER[i-GmtShift] = OPening;
   EXBUFFER1[i-GmtShift] = OPening;
   EXBUFFER2[i] = Buf;
   EXBUFFER3[i] = Buf;
   if ((OPening>Buf)){EXBUFFER1[i]=EMPTY_VALUE;EXBUFFER3[i]=EMPTY_VALUE;}}
return(0);
 }