Navigation:Home > Content >

#MTF_BollinderBands_(2).mq4

Time: 2018-10-25 | Download file:#MTF_BollinderBands_(2).mq4

/*
   Generated by EX4-TO-MQ4 decompiler V4.0.224.1 []
   Website: http://purebeam.biz
   E-mail : purebeam@gmail.com
*/
#property copyright "Copyright © 2006, Keris2112"
#property link      "http://www.forex-tsd.com"

#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 MediumSeaGreen
#property indicator_color2 MediumSeaGreen
#property indicator_color3 MediumSeaGreen

extern int TimeFrame = 0;
extern int MAPeriod = 20;
extern int BandsShift = 0;
extern int StdDev = 2;
double g_ibuf_92[];
double g_ibuf_96[];
double g_ibuf_100[];

int init() {
   string ls_0;
   string ls_12;
   SetIndexBuffer(0, g_ibuf_92);
   SetIndexStyle(0, DRAW_LINE);
   SetIndexBuffer(1, g_ibuf_96);
   SetIndexStyle(1, DRAW_LINE);
   SetIndexBuffer(2, g_ibuf_100);
   SetIndexStyle(2, DRAW_LINE);
   switch (TimeFrame) {
   case 1:
      ls_12 = "Period_M1";
      break;
   case 5:
      ls_12 = "Period_M5";
      break;
   case 15:
      ls_12 = "Period_M15";
      break;
   case 30:
      ls_12 = "Period_M30";
      break;
   case 60:
      ls_12 = "Period_H1";
      break;
   case 240:
      ls_12 = "Period_H4";
      break;
   case 1440:
      ls_12 = "Period_D1";
      break;
   case 10080:
      ls_12 = "Period_W1";
      break;
   case 43200:
      ls_12 = "Period_MN1";
      break;
   default:
      ls_12 = "Current Timeframe";
   }
   IndicatorShortName(ls_0 + MAPeriod + ") " + ls_12);
   return (0);
}

int start() {
   int lia_0[];
   int l_shift_16 = 0;
   int l_ind_counted_20 = IndicatorCounted();
   ArrayCopySeries(lia_0, 5, Symbol(), TimeFrame);
   int li_12 = Bars - l_ind_counted_20;
   int l_index_4 = 0;
   l_shift_16 = 0;
   while (l_index_4 < li_12) {
      if (Time[l_index_4] < lia_0[l_shift_16]) l_shift_16++;
      g_ibuf_92[l_index_4] = iBands(NULL, TimeFrame, MAPeriod, StdDev, BandsShift, PRICE_CLOSE, MODE_BASE, l_shift_16);
      g_ibuf_96[l_index_4] = iBands(NULL, TimeFrame, MAPeriod, StdDev, BandsShift, PRICE_HIGH, MODE_UPPER, l_shift_16);
      g_ibuf_100[l_index_4] = iBands(NULL, TimeFrame, MAPeriod, StdDev, BandsShift, PRICE_LOW, MODE_LOWER, l_shift_16);
      l_index_4++;
   }
   return (0);
}

Recommend