//+------------------------------------------------------------------+ //| Sessions.mq5 | //| Copyright 2022, MetaQuotes Ltd. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2022, MetaQuotes Ltd." #property link "https://www.mql5.com" #property version "1.00" //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ input int NumberOfDays = 50; // Êîëè÷åñòâî äíåé input string AsiaBegin = "01:00"; // Îòêðûòèå àçèàòñêîé ñåññèè input string AsiaEnd = "10:00"; // Çàêðûòèå àçèàòñêîé ñåññèè input color AsiaColor = Goldenrod; // Öâåò àçèàòñêîé ñåññèè input string EurBegin = "07:00"; // Îòêðûòèå åâðîïåéñêîé ñåññèè input string EurEnd = "16:00"; // Çàêðûòèå åâðîïåéñêîé ñåññèè input color EurColor = Tan; // Öâåò åâðîïåéñêîé ñåññèè input string USABegin = "14:00"; // Îòêðûòèå àìåðèêàíñêîé ñåññèè input string USAEnd = "23:00"; // Çàêðûòèå àìåðèêàíñêîé ñåññèè input color USAColor = PaleGreen; // Öâåò àìåðèêàíñêîé ñåññèè int OnInit() { //--- DeleteObjects(); for(int i=0; i5) dt=decDateTradeDay(dt); } } //+------------------------------------------------------------------+ void CreateObjects(string no, color cl) { ObjectCreate(0, no, OBJ_RECTANGLE, 0, 0,0, 0,0); ObjectSetInteger(0, no, OBJPROP_STYLE, STYLE_SOLID); ObjectSetInteger(0, no, OBJPROP_COLOR, cl); ObjectSetInteger(0, no, OBJPROP_BACK, true); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void DeleteObjects() { for(int i=0; i