i_GAP





//+------------------------------------------------------------------+
//|                            Èíäèêàòîð ãýïîâ                       |
//|                              FOREX&STOX                          |
//|                           ram-kr@krastalk.ru                     |
//+------------------------------------------------------------------+
#property copyright "ram-kr@krastalk.ru"
#property link      ""
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
#property indicator_width1 2
#property indicator_width2 2

double ExtMapBuffer1[];
double ExtMapBuffer2[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   IndicatorBuffers(2);
   SetIndexStyle(0,DRAW_HISTOGRAM);
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexLabel(0,"Blue");
   SetIndexStyle(1,DRAW_HISTOGRAM);
   SetIndexBuffer(1,ExtMapBuffer2);
   SetIndexLabel(1,"Red");
//----
   IndicatorShortName("Èíäèêàòîð ãýïîâ FOREX&STOX");
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted();
   double BandsMode,BandsPrice,PowerPrice;
   
   //+----Main Section--------------------------------------------------+
   double value1, value2;
   for(int i=0;i<=Bars;i++)
    {
     value1=0;   value2=0;
//  ãýï ÂÍÈÇ \---------------------------------------------     
       if(   (Open[i]-Close[i+1])>0  ) value1=(Open[i]-Close[i+1])/Point;
//  ãýï ÂÂÅÐÕ /----------------------------------------------      
       if(   (Open[i]-Close[i+1])<0    )   value2=(Open[i]-Close[i+1])/Point;
//--------------------------------------------------------      
     ExtMapBuffer1[i]=value1;
     ExtMapBuffer2[i]=value2;
     } //end for
   //+------------------------------------------------------------------+
  return(0);
  }
//+------------------------------------------------------------------+



Sample





Analysis



Market Information Used:

Series array that contains close prices for each bar
Series array that contains open prices of each bar


Indicator Curves created:

Implements a curve of type DRAW_HISTOGRAM


Indicators Used:



Custom Indicators Used:

Order Management characteristics:

Other Features: