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 .....
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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
and I get:
If I now re-launch the indicator I get this:
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!!