neocount » Tue Mar 15, 2016 10:49 pm wrote:So this is driving me crazy. I CANNOT get the time settings to work on my VPS. Any ideas at all from the group here? I use NY time and I have the EA set to turn on 30m after Frankfurt open (3:30) and turn off 2 hours after New York open(10:00). Broker time that is 9 to 18:00.
Here we go again, and you know that posts about the time are strictly prohibited on SHF?
Let's get down to basics. Empty4 is only aware of two different times (1) The server (broker) time (This time is obtained using the TimeCurrent() function) and the (2) The local PC time (This time is obtained using the TimeLocal() function).
On a VPS, the TimeLocal() returns the time of the VPS instance you are running. It has of course no clue of
your local time, wherever you may be living. In the screen image you attached to your post, it was 7:54AM on the 15th of March, 2016. How do I know this: just look at the bottom right of the screen ... that's the local PC (or VPS) time.
In the documentation of MAD-EA, it is specified that MAD-EA uses the
Local PC time (i.e. the TimeLocal() time) to compare times against the given "Trading Times" input parameter. Why? Why did I not choose to use TimeCurrent()? I could have, but this was a choice and Steve's EAs are using the Local PC time as well, so I thought that for consistency I do the same. This, however, requires a little attention on your part, as you need to change the Trading Times parameter if you transfer a set-file that has been running on your local PC to your VPS, as now you have to deal with the VPS Local times.
Finally, to comment on
the following:
The times listed by Empty4 under the 'Time' column of the Trade-tab and Account History-tab, are in server (broker) time. So, in order to see whether these times fall in the given time period, you will need to convert the broker times to local times (or convert local times to broker times).
Believe me, the time filter code in MAD-EA
is correct. If you think it is not, most likely you have given it incorrect input.