//+------------------------------------------------------------------+ //| MTF-Dinapoli_Target.mq4 | //+------------------------------------------------------------------+ //MTF == Muliple Time Frame #property copyright "klot" //Basic code #property link "klot@mail.ru" #property indicator_chart_window #property indicator_buffers 1 #property indicator_color1 Yellow //---- input parameters extern int UpperPeriod=15; //---- buffers double ExtMapBuffer1[]; datetime daytimes[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,159); SetIndexBuffer(0,ExtMapBuffer1); SetIndexEmptyValue(0,0.0); //---- if (Period()>UpperPeriod) { Alert("UpperPeriod0) counted_bars--; limit=Bars-counted_bars; for (int i=0; i=daytimes[0]) bigshift=0; else { bigshift = ArrayBsearch(daytimes,Time[i-1],WHOLE_ARRAY,0,MODE_DESCEND); if(Period()<=UpperPeriod) bigshift++; } ExtMapBuffer1[i]=iCustom(NULL,UpperPeriod,"DinapoliTargets",0,bigshift); } //---- return(0); } //+------------------------------------------------------------------+