#property copyright "arrozaq by Codot bin Kampret 16 Nopember 2008 "
#property link      "http://www.nggakpunyaweb.com"
//Jangan dilink canda aja !!!!
#property indicator_separate_window
#property indicator_buffers 4
#property indicator_color1 Green
#property indicator_color2 Green
#property indicator_color3 Brown
#property indicator_color4 Brown
extern int oye1 =8;
extern int oye2 =11;

double g_ibuf_76[];
double g_ibuf_80[];
double g_ibuf_84[];
double g_ibuf_88[];

int init() {

   SetIndexStyle(0, DRAW_NONE, STYLE_SOLID, 3,Green);
   SetIndexStyle(1, DRAW_NONE, STYLE_SOLID, 3,Brown);
   
   SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID, 3, Green);
   SetIndexBuffer(0, g_ibuf_76);
   SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 3, Green);
   SetIndexBuffer(1, g_ibuf_80);
   SetIndexStyle(2, DRAW_HISTOGRAM, STYLE_SOLID, 3);
   SetIndexBuffer(2, g_ibuf_84);
   SetIndexStyle(3, DRAW_HISTOGRAM, STYLE_SOLID, 3);
   SetIndexBuffer(3, g_ibuf_88);
   
  
   
   return (0);
}

int deinit() {
   return (0);
}

int start() {
   double l_ima_8;
   double l_ima_16;
   int l_ind_counted_0 = IndicatorCounted();
   int li_4 = Bars - l_ind_counted_0;
   for (int li_24 = li_4; li_24 >= 0; li_24--) {
      l_ima_8 = iMA(NULL, 0, oye1, 0, MODE_LWMA, PRICE_TYPICAL, li_24);
      l_ima_16 = iMA(NULL, 0, oye2, 1, MODE_LWMA, PRICE_TYPICAL, li_24);
      if (l_ima_8 >= l_ima_16) {
         g_ibuf_76[li_24] = l_ima_8;
         g_ibuf_80[li_24] = l_ima_16;
         g_ibuf_76[li_24 + 1] = l_ima_8;
         g_ibuf_80[li_24 + 1] = l_ima_16;
      } else {
         g_ibuf_84[li_24] = l_ima_8;
         g_ibuf_88[li_24] = l_ima_16;
         g_ibuf_84[li_24 + 1] = l_ima_8;
         g_ibuf_88[li_24 + 1] = l_ima_16;
      }
   }
   return (0);
}