script stop working after updates

 

Hi, after the recent updates in mt4 one script I've been using for 2 years now doesn't work anymore. The script prints server time on charts and I used it to check by eyes if the price is updated to the current time, if server time on chart is not matching computer clock time then I know some disconnection occurred (I live in a place with bad connection). Can some one help me to understand what's wrong? Thanks



//+------------------------------------------------------------------+
//|                                                   ServerTime.mq4 |
//|                                      Copyright © 2005, komposter |
//|                                      mailto:komposterius@mail.ru |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, komposter"
#property link      "mailto:komposterius@mail.ru"

#property indicator_chart_window

extern color TextColor = Black;
//----

int init()
  {
                  ObjectCreate( "ServerTime", OBJ_LABEL, 0,0,0,0,0,0,0);
                  ObjectSet( "ServerTime", OBJPROP_CORNER, 0);
                  ObjectSet( "ServerTime", OBJPROP_XDISTANCE, 0);
                  ObjectSet( "ServerTime", OBJPROP_YDISTANCE, 12);
                  ObjectSetText(  "ServerTime", "", 12, "Arial", TextColor);
    return(0);
  }
//----
int deinit() 
  { 
    ObjectDelete("ServerTime"); 
    return(0); 
  }
//----
int start() 
  { 
    ObjectSetText("ServerTime", TimeToStr( CurTime(), TIME_SECONDS ), 12, "Arial", TextColor ); 
    return(0); 
  }
//+------------------------------------------------------------------+


 
yellowcat:

Hi, after the recent updates in mt4 one script I've been using for 2 years now doesn't work anymore. The script prints server time on charts and I used it to check by eyes if the price is updated to the current time, if server time on chart is not matching computer clock time then I know some disconnection occurred (I live in a place with bad connection). Can some one help me to understand what's wrong? Thanks

You didn't actually say what your issue/malfunction is ?

CurTime() has been Obsolete for a long time . . . you shouldn't be using it, see if changing it to TimeCurrent() helps . . .
 
"Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here.
 
yellowcat:

Hi, after the recent updates in mt4 one script I've been using for 2 years now doesn't work anymore. The script prints server time on charts and I used it to check by eyes if the price is updated to the current time, if server time on chart is not matching computer clock time then I know some disconnection occurred (I live in a place with bad connection). Can some one help me to understand what's wrong? Thanks


What is the background color of your chart ?
Reason: