//------------------------------------------------------------------ #property copyright "Copyright © 2006, Kim Igor V. aka KimIV" #property link "http://www.kimiv.ru" #property description "The iParamon WorkTime indicator originally made by Kim Igor V" #property description "This version made by Mladen" //------------------------------------------------------------------ #property indicator_chart_window #property indicator_buffers 0 #property indicator_plots 0 input int NumberOfDays = 10; // Number of days input string Begin_1 = "07:00"; // Start of first session input string End_1 = "11:00"; // End of first session input color Color_1 = clrBisque; // Color of first session input string Begin_2 = "13:00"; // Start of second session input string End_2 = "17:00"; // End of second session input color Color_2 = clrPaleTurquoise; // Color of second session input string Begin_3 = "19:00"; // Start of third session input string End_3 = "23:00"; // End of third session input color Color_3 = clrMistyRose; // Color of third session input string UniqueID = "workTimes1"; // Unique ID for objects //------------------------------------------------------------------ // //------------------------------------------------------------------ // // // // // void OnInit() { } void OnDeinit(const int& reason ) { ObjectsDeleteAll(0,UniqueID+":",-1,OBJ_RECTANGLE); } int OnCalculate(const int rates_total, const int prev_calculated, const datetime& time[], const double& open[], const double& high[], const double& low[], const double& close[], const long& tick_volume[], const long& volume[], const int& spread[]) { if (_Period>=PERIOD_D1 || Bars(_Symbol,_Period)