//+------------------------------------------------------------------+ //| Beno_System.mq4 | //| Plamen | //| http://127.0.0.1 | //+------------------------------------------------------------------+ #property copyright "Plamen" #property link "http://127.0.0.1" #property indicator_chart_window #property indicator_buffers 4 #property indicator_color1 Lime #property indicator_color2 Red #property indicator_color3 Lime #property indicator_color4 Red #property indicator_width1 1 #property indicator_width2 1 #property indicator_width3 2 #property indicator_width4 2 //---- options extern string UpSignal="===== Up Signal Settings ====="; extern bool ShowUpArrows=true; extern color UpArrowsColor=Lime; extern bool ShowLowerHighs=true; extern color LowerHighsColor=Lime; extern bool ShowCloseToCloseLines=true; extern color CloseToCloseLinesColor=Lime; extern string EndUpSignalSettings="=============================="; extern string DownSignal="==== Down Signal Settings ===="; extern bool ShowDownArrows=true; extern color DownArrowsColor=Red; extern bool ShowHigherLows=true; extern color HigherLowsColor=Red; extern bool ShowOpenToOpenLines=true; extern color OpenToOpenLinesColor=Red; extern string EndDownSignalSettings="=============================="; //---- buffers double Buffer1[]; double Buffer2[]; double Buffer3[]; double Buffer4[]; int CloseToCloseLinesCounter=0; int OpenToOpenLinesCounter=0; int pos=0; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_ARROW, EMPTY, EMPTY, HigherLowsColor); SetIndexArrow(0,217); SetIndexBuffer(0,Buffer1); SetIndexDrawBegin(0, 7); SetIndexStyle(1,DRAW_ARROW, EMPTY, EMPTY, LowerHighsColor); SetIndexArrow(1,218); SetIndexBuffer(1,Buffer2); SetIndexDrawBegin(1,7); SetIndexStyle(2,DRAW_ARROW, EMPTY, EMPTY, UpArrowsColor); SetIndexArrow(2,67); SetIndexBuffer(2, Buffer3); SetIndexDrawBegin(2,7); SetIndexStyle(3,DRAW_ARROW, EMPTY, EMPTY, DownArrowsColor); SetIndexArrow(3,68); SetIndexBuffer(3,Buffer4); SetIndexDrawBegin(3,7); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { int i; for(i=0; i<=CloseToCloseLinesCounter; i++) ObjectDelete("CloseToCloseLines"+i); for(i=0; i<=OpenToOpenLinesCounter; i++) ObjectDelete("OpentoOpenLines"+i); return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); if(counted_bars<0) return(-1); if(counted_bars>0) counted_bars--; pos=Bars-counted_bars; while(pos>0) { if( (High[pos+1]Close[pos+10]) && (High[pos]>High[pos+1]) ) { if(ShowCloseToCloseLines) DisplayCloseToCloseLines(); if(ShowUpArrows) DisplayUpArrows(); if(ShowLowerHighs) DisplayLowerHighs(); } if( (Low[pos+1]>Low[pos+2])&&(Low[pos+2]>Low[pos+3]) && (Open[pos]