#property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Lime #property indicator_color2 Red extern int buyzone=-100; extern int sellzone=100; extern bool EmailAlert=false; extern bool AudioAlert=false; extern bool useCCI=true; //---- buffers double ExtMapBuffer1[]; double ExtMapBuffer2[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_ARROW,STYLE_SOLID, 2); SetIndexArrow(0,233); SetIndexBuffer(0,ExtMapBuffer1); SetIndexEmptyValue(0,0.0); SetIndexStyle(1,DRAW_ARROW,STYLE_SOLID, 2); SetIndexArrow(1,234); SetIndexBuffer(1,ExtMapBuffer2); SetIndexEmptyValue(1,0.0); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int i; for(i=Bars-1;i>=0;i--) { ExtMapBuffer1[i] = 0; ExtMapBuffer2[i] = 0; // double MeanYellow = iCustom(NULL, 0, "Past Regression Deviated",0, 55,0.809, 1.618,2.618, 0,i); // double High1Lime = iCustom(NULL, 0, "Past Regression Deviated",0, 55,0.809, 1.618,2.618, 1,i); // double Low1Lime = iCustom(NULL, 0, "Past Regression Deviated",0, 55,0.809, 1.618,2.618, 2,i); double High2Orange = iCustom(NULL, 0, "Past Regression Deviated",0, 55,0.809, 1.618,2.618, 3,i); double Low2Orange = iCustom(NULL, 0, "Past Regression Deviated",0, 55,0.809, 1.618,2.618, 4,i); // double High3Red = iCustom(NULL, 0, "Past Regression Deviated",0, 55,0.809, 1.618,2.618, 5,i); // double Low3Red = iCustom(NULL, 0, "Past Regression Deviated",0, 55,0.809, 1.618,2.618, 6,i); // double MeanYellow2 = iCustom(NULL, 0, "Past Regression Deviated",0, 55,0.809, 1.618,2.618, 0,i+1); // double High1Lime2 = iCustom(NULL, 0, "Past Regression Deviated",0, 55,0.809, 1.618,2.618, 1,i+1); // double Low1Lime2 = iCustom(NULL, 0, "Past Regression Deviated",0, 55,0.809, 1.618,2.618, 2,i+1); double High2Orange2 = iCustom(NULL, 0, "Past Regression Deviated",0, 55,0.809, 1.618,2.618, 3,i+1); double Low2Orange2 = iCustom(NULL, 0, "Past Regression Deviated",0, 55,0.809, 1.618,2.618, 4,i+1); // double High3Red2 = iCustom(NULL, 0, "Past Regression Deviated",0, 55,0.809, 1.618,2.618, 5,i+1); // double Low3Red2 = iCustom(NULL, 0, "Past Regression Deviated",0, 55,0.809, 1.618,2.618, 6,i+1); // double cci=iCCI(NULL,0,55,PRICE_TYPICAL,i); double cci=iCCI(NULL,0,14,PRICE_TYPICAL,i); if (Close[i]>Low2Orange && Close[i+1]buyzone)) {ExtMapBuffer1[i] = Low[i] - 15 * Point; } else if (useCCI==false) {ExtMapBuffer1[i] = Low[i] - 15 * Point; } if (Close[i]High2Orange2) if ((useCCI) && (cci