//+------------------------------------------------------------------+ //| Beginner.mq4 | //| Copyright © 2007 | //| | //+------------------------------------------------------------------+ #property copyright "Copyright © 2007, Heaven" #property link "http://Beginner.com" //---- #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Blue #property indicator_color2 Red #define SH_BUY 1 #define SH_SELL -1 //---- Входные параметры extern bool SoundON=true; extern int AllBars=0;//Для скольки баров считать. 0 - для всех. extern int Otstup=30;//Отступ. extern double Per=9;//Период. //---- int SH,NB,i,UD; double R,SHMax,SHMin; double BufD[]; double BufU[]; int flagval1=0; int flagval2=0; //+------------------------------------------------------------------+ //| Функция инициализации | //+------------------------------------------------------------------+ int init() { //В NB записываем количество баров для которых считаем индикатор if (BarsBars-CB) NB=Bars-CB; for(SH=1;SH