//+------------------------------------------------------------------+ //| CHART_BRING_TO_TOP.mq5 | //| Copyright © 2014, Vladimir Karputov | //| http://wmua.ru/slesar/ | //+------------------------------------------------------------------+ #property copyright "Copyright © 2014, Vladimir Karputov" #property link "http://wmua.ru/slesar/" #property version "1.02" #property description "The script switches all open charts after a certain interval." //--- покажем окно входных параметров при запуске скрипта //--- show window of input parameters when you run the script #property script_show_inputs //--- входные параметры скрипта //--- the script input parameters input int milliseconds=3000; // интервал // interval input string name_symbol="RTS-9.16"; // активировать только // activate only //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { //--- // variables for chart ID long currChart,prevChart=ChartFirst(); //--- обрабатываем первый график // process the first graph if(name_symbol!="") { if(ChartSymbol(prevChart)==name_symbol) { // Print(i," ",ChartSymbol(currChart)," ID =",currChart); ChartBringToTop(prevChart); Sleep((int)MathAbs(milliseconds)); } } else { // Print(i," ",ChartSymbol(currChart)," ID =",currChart); ChartBringToTop(prevChart); Sleep((int)MathAbs(milliseconds)); } //--- int i=0,limit=100; // Print("ChartFirst = ",ChartSymbol(prevChart)," ID = ",prevChart); // У нас наверняка не больше 100 открытых графиков // We have certainly not more than 100 open charts while(i