indicators fails on terminal-start - what about VPS and an automated start of mt4 ??

 

Hi,

I realized something odd that I hope it'll disappear soon!

I have on mt4-b610+ one chart (EURUSD) and one indicator.

If I kill the mt4 and launch it again ou of its editor (F4, both in /portable - I checked Mt4-> Files-> Open data Folder) the indicator does not show any of its lines or values and Comments - it simply fails working!!

If I now open the Indicator-Option-Window (ctrl-i) and press ok the indicator disappears completely from the indicator-window and I have to re-apply it on the chart window. Now my indi works again without any problem?

My concerns is my VPS where a Powershell-script chaeck that the terminals are running and responding otherwise they are (killed and) restarted - but if then nothing is working????

Any idea what to do except wait?

Gooly


PS: Now I tried it again - it seems to work, but what was shown, was not that what is shown after a re-run.


I think I found at least 1 problem:

At init() I do

   datetime gmt = TimeGMT();
   checkTime(gmt);
   Print("TimeCheck, Server:",TimeToStr(TimeCurrent())," Local: ",TimeToStr(TimeLocal())," GMT: ",TimeToStr(gmt)," offSet: ",sGMTShift);

and I get:

TimeCheck, Server:2014.02.24 01:15 Local: 2014.02.26 16:53 GMT: 2014.02.26 15:53 offSet: -223200

If I now re-launch the indicator I get this:

2014.02.26 16:56:46.870 myIndi EURUSD,M1: TimeCheck, Server:2014.02.26 17:56 Local: 2014.02.26 16:56 GMT: 2014.02.26 15:56 offSet: 7200

This is correct.

Even if I put the time setting in start it'll produce the wrong value!!

PLEASE MetaTrader try to have a correct sequence of launching the various parts!!

Otherwise all time-sensible strategies will be busted!!

 

Even if I put this in start():

   if ( TerminalInfoInteger(TERMINAL_CONNECTED) ) {
           gmt = TimeGMT();
           checkTime(gmt);
           Print("connected - TimeCheck, Server:",TimeToStr(TimeCurrent())," Local: ",TimeToStr(TimeLocal())," GMT: ",TimeToStr(gmt)," offSet: ",sGMTShift);
   } else {
           gmt = TimeGMT();
           //checkTime(gmt);
           Print("not connected - TimeCheck, Server:",TimeToStr(TimeCurrent())," Local: ",TimeToStr(TimeLocal())," GMT: ",TimeToStr(gmt));   
           return(0);
   }

(don't set gmt-Offset unless you are connected) gives totally wrong values:

2014.02.26 17:23:06.333 myIndi EURUSD,M1: connected - TimeCheck, Server:2014.02.24 01:15 Local: 2014.02.26 17:23 GMT: 2014.02.26 16:23 offSet: -226800
2014.02.26 17:23:04.591 myIndi EURUSD,M1: not connected - TimeCheck, Server:2014.02.24 01:15 Local: 2014.02.26 17:23 GMT: 2014.02.26 16:23

PLEASE .....

 

This is how the indicator looks (and has wrong values) after the terminal b610* was launched by the editors F4:


and this is how it looks like after I opened its option-window and cause a re-launch of only the indicator in its chart:


The values are different - how can I (we) get control on that??

Reason: