//buy MAXOU888 #property copyright "MAXOU888" #property link "" #property indicator_separate_window #property indicator_buffers 4 #property indicator_color1 Red #property indicator_color2 Blue //up band #property indicator_color3 Blue //mid band #property indicator_color4 Blue //lowband band extern int RsiPeriod = 8; extern int BBperiod = 20; extern double Dev = 2; double ExtMapBuffer1[]; double ExtMapBuffer2[]; double ExtMapBuffer3[]; double ExtMapBuffer4[]; int init() { SetIndexStyle(0,DRAW_LINE); SetIndexStyle(1,DRAW_LINE); SetIndexStyle(2,DRAW_LINE); SetIndexStyle(3,DRAW_LINE); SetIndexBuffer(0,ExtMapBuffer1); // Indic SetIndexBuffer(1,ExtMapBuffer2); // BB Up SetIndexBuffer(2,ExtMapBuffer3); // BB Mid SetIndexBuffer(3,ExtMapBuffer4); // BB LowUp return(0); } //---- int start() { int counted_bars=IndicatorCounted(); int i,limit; limit=Bars-counted_bars; if (counted_bars<0) return(-1); if (counted_bars>0) counted_bars--; for(i=limit; i>=0; i--) ExtMapBuffer1[i]=iRSI(NULL,0,RsiPeriod,PRICE_CLOSE,i); for(i=limit; i>=0; i--) { ExtMapBuffer2[i]=iBandsOnArray(ExtMapBuffer1,0,BBperiod,Dev,0,MODE_UPPER,i); ExtMapBuffer3[i]=iBandsOnArray(ExtMapBuffer1,0,BBperiod,Dev,0,MODE_MAIN, i); ExtMapBuffer4[i]=iBandsOnArray(ExtMapBuffer1,0,BBperiod,Dev,0,MODE_LOWER,i); } return(0); } //----