#property indicator_chart_window
#property indicator_buffers 6
#property indicator_color1 Red
#property indicator_color2 Green
#property indicator_color3 Red
#property indicator_color4 Green
extern int period_1=21;
extern int period_2=7;
double post1;
double post2;
double acus1;
double acus2;
double HighBuffer;
double LowBuffer;
datetime pretime=0;
void init()  {
   SetIndexBuffer(0, post1);
   SetIndexBuffer(1, post2);
   SetIndexBuffer(2, acus1);
   SetIndexBuffer(3, acus2);
   SetIndexBuffer(4, HighBuffer);
   SetIndexBuffer(5, LowBuffer);
   SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,3);
   SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,3);
   SetIndexStyle(2,DRAW_HISTOGRAM,STYLE_SOLID,0);
   SetIndexStyle(3,DRAW_HISTOGRAM,STYLE_SOLID,0);
   SetIndexStyle(4,DRAW_NONE);
   SetIndexStyle(5,DRAW_NONE);
}
void start()  {
   int limit;
   int counted_bars=IndicatorCounted();
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
   for(int t=0; t
0.1*Point){
         post1[t]=MathMin(Open[t],Close[t]);
         post2[t]=MathMax(Open[t],Close[t]);
         acus1[t]=Low[t];
         acus2[t]=High[t];
         if (Open[t]==Close[t]) post1[t]=Close[t]-0.01*Point;
      }
      if(temp<0.1*Point){
         post1[t]=MathMax(Open[t],Close[t]);
         post2[t]=MathMin(Open[t],Close[t]);
         acus1[t]=High[t];
         acus2[t]=Low[t];
         if (Open[t]==Close[t]) post2[t]=Close[t]-0.01*Point;
      }
      if(Time[0]>pretime) {
         if(acus1[0]>acus2[0] && acus1[1]acus2[1]) {Alert(Symbol(),Period(),"转阴");pretime=Time[0];}
      }
   }
}