//+------------------------------------------------------------------+ //| BEEP_v1.0.mq4 | //| Copyright © 2010, Khlystov Vladimir | //| cmillion@narod.ru | //+------------------------------------------------------------------+ #property copyright "Copyright © 2010, Khlystov Vladimir" #property link "cmillion@narod.ru" //-------------------------------------------------------------------- #property indicator_separate_window #property indicator_level1 0 #property indicator_levelcolor Silver #property indicator_levelwidth 0 #property indicator_levelstyle 2 #property indicator_buffers 8 #property indicator_color1 Yellow #property indicator_color2 Aqua #property indicator_color3 Lime #property indicator_color4 Red #property indicator_color5 Gold #property indicator_color6 DarkOrange #property indicator_color7 DeepPink #property indicator_color8 Red extern int period_1 = 1; extern int period_2 = 50; extern int period_3 = 100; extern int period_4 = 150; extern int period_5 = 200; extern int width = 1; extern int TF = 0; double Buffer1[]; double Buffer2[]; double Buffer3[]; double Buffer4[]; double Buffer5[]; double Buffer6[]; double Buffer7[]; double Buffer8[]; //+------------------------------------------------------------------+ int init() { SetIndexStyle(0,DRAW_LINE,EMPTY,width); SetIndexBuffer(0,Buffer1); SetIndexLabel(0,DoubleToStr(period_1,0)); SetIndexStyle(1,DRAW_LINE,EMPTY,width); SetIndexBuffer(1,Buffer2); SetIndexLabel(1,DoubleToStr(period_2,0)); SetIndexStyle(2,DRAW_LINE,EMPTY,width); SetIndexBuffer(2,Buffer3); SetIndexLabel(2,DoubleToStr(period_3,0)); SetIndexStyle(3,DRAW_LINE,EMPTY,width); SetIndexBuffer(3,Buffer4); SetIndexLabel(3,DoubleToStr(period_4,0)); SetIndexStyle(4,DRAW_HISTOGRAM,EMPTY,2); SetIndexBuffer(4,Buffer5); SetIndexLabel(4,"Веер"); SetIndexStyle(5,DRAW_LINE,EMPTY,width); SetIndexBuffer(5,Buffer6); SetIndexLabel(5,""); SetIndexStyle(6,DRAW_LINE,EMPTY,width); SetIndexBuffer(6,Buffer7); SetIndexLabel(6,""); SetIndexStyle(7,DRAW_LINE,EMPTY,3); SetIndexBuffer(7,Buffer8); SetIndexLabel(7,""); if (TF!=0) TF = next_period(TF); IndicatorShortName("Веер "+string_per(TF)); return(0); } //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ int start() { int i,j,limit,counted_bars=IndicatorCounted(); if(counted_bars<0) return(-1); if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; double DeltaMA1,DeltaMA2,DeltaMA3,DeltaMA4; int bar; for(i=0; i 43200) return(0); if (per > 10080) return(43200); if (per > 1440) return(10080); if (per > 240) return(1440); if (per > 60) return(240); if (per > 30) return(60); if (per > 15) return(30); if (per > 5) return(15); if (per > 1) return(5); } //+------------------------------------------------------------------+