
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 DodgerBlue
#property indicator_color2 Red

double g_ibuf_76[];
double g_ibuf_80[];
extern int DisplayDistance = 15;
extern int GapSize = 20;

int init() {
   SetIndexStyle(0, DRAW_ARROW, EMPTY, 2);
   SetIndexArrow(0, 233);
   SetIndexBuffer(0, g_ibuf_76);
   SetIndexStyle(1, DRAW_ARROW, EMPTY, 2);
   SetIndexArrow(1, 234);
   SetIndexBuffer(1, g_ibuf_80);
   return (0);
}

int deinit() {
   return (0);
}

int start() {
   double l_close_88;
   double l_open_96;
   double ld_104;
   double ld_112;
   int li_76 = IndicatorCounted();
   if (li_76 < 0) return (-1);
   if (li_76 > 0) li_76--;
   int li_0 = Bars - li_76;
   int li_unused_80 = 0;
   int li_unused_84 = 0;
   for (int l_index_4 = 0; l_index_4 <= li_0; l_index_4++) {
      l_close_88 = Close[l_index_4 + 1];
      l_open_96 = Open[l_index_4];
      ld_104 = 0;
      ld_112 = 0;
      if (l_close_88 < l_open_96) {
         ld_104 = (l_open_96 - l_close_88) / Point;
         if (ld_104 > GapSize) g_ibuf_80[l_index_4] = High[l_index_4] + DisplayDistance * Point;
      }
      if (l_close_88 > l_open_96) {
         ld_112 = (l_close_88 - l_open_96) / Point;
         if (ld_112 > GapSize) g_ibuf_76[l_index_4] = Low[l_index_4] - DisplayDistance * Point;
      }
   }
   return (0);
}