Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (ozgur, EternallyCurious, howardR, 1 invisible), 623 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 4 1 2 3 4
Re: Zorro's Quality [Re: Zheka] #471252
02/25/18 13:24
02/25/18 13:24
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
I just tested the latest beta with the "fixed" MT4 bridge.

Timestamps of data downloaded from MT4 do not make sense at all:
they seem to reflect "local time" for a time zone with the shift of 13hrs to UTC (a "leftover" by the developer from Asia?).

QA?

Attached Files Zorro_MT4_zoneshift_13_hist.PNGZorro_MT4_zoneshift_13.PNG
Re: Zorro's Quality [Re: Zheka] #471256
02/25/18 14:15
02/25/18 14:15
Joined: Dec 2017
Posts: 129
Halifax, NS
K
kujo Offline OP
Member
kujo  Offline OP
Member
K

Joined: Dec 2017
Posts: 129
Halifax, NS
Zheka, I don't see this bug with Global Prime and the latest MT4 bridge. Maybe MT4 server glitch? Can you try another MT4 broker?

Also, as I remember, messages starting with ! mark are from a broker. So, it's likely the broker's issue...

Last edited by kujo; 02/25/18 14:23.
Re: Zorro's Quality [Re: kujo] #471263
02/25/18 16:01
02/25/18 16:01
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
I just re-downloaded the data again - both into Zorro and into MT4 terminal database (see pic).

Interestingly:
- as time passed from my first post, Zorro's time zone offset changed as well from 13 to 16 hrs to UTC! MT4 timestamps are as they should.
- prices in Zorro (Ask) and MT4 database(Bid) are the same!?
- what does Zorro request from MT4 for Volume? These 2 columns are completely different between MT4 and Zorro..

P.s: i just redownloaded again: there was no !message on time zone shift this time, but the data are still getting timestamped at +16hrs to UTC.

Attached Files Zorro_MT4_zoneshift_16_hist.PNG
Last edited by Zheka; 02/25/18 16:07.
Re: Zorro's Quality [Re: Zheka] #471264
02/25/18 16:08
02/25/18 16:08
Joined: Dec 2017
Posts: 129
Halifax, NS
K
kujo Offline OP
Member
kujo  Offline OP
Member
K

Joined: Dec 2017
Posts: 129
Halifax, NS
- I've seen once that broker changed the time zone from 2 to 3 without any reason. Then returned back. Have no explanation of this.

- Correct. Zorro uses MT4 Bid prices as Ask prices. Support confirmed this.

- Noticed as well. Have no idea

Re: Zorro's Quality [Re: kujo] #471266
02/25/18 17:17
02/25/18 17:17
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
Re-tested with Gain/Forex.com: same story.

This time, when downloading data into MT4 History center, I had been warned that historical data would be coming from the MetaQuotes server, not Gain server.

Quote:
Correct. Zorro uses MT4 Bid prices as Ask prices
WOW. I rechecked and it is true!
Quote:
The Metatrader client terminal displays prices as Bid prices, while Zorro always uses Ask prices. So you'll see different prices on the Metatrader chart and in the Zorro window
So, these statements in the manual are not true for historical data?

And historical data MUST NOT be pre-loaded/backfilled from MT4 before turning on Live trading?
How is one supposed to handle this in practice?

Do prices get adjusted/used correctly in Live trading with MT4?




Attached Files Gain_MT4_zoneshift_19_hist.PNG
Last edited by Zheka; 02/25/18 17:46.
Re: Zorro's Quality [Re: Zheka] #471279
02/26/18 13:35
02/26/18 13:35
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
I tried to re-download the data from both Alpari and Gain right now, and the bars now have correct timestamps.
No weird time zone shift.
Is this a typical behavior of MT4 broker servers over the weekend?

Still, the questions about Bid treated as Ask remain.

Re: Zorro's Quality [Re: Zheka] #471281
02/26/18 14:44
02/26/18 14:44
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Disclosure: I am an MQL5.com vendor.

Here's a possible explanation: If you program in MQL language and request the time, MT4 only gives you the latest timestamp of the latest tick in the market for a given asset. This means that after-hours and weekends will mess with the value. There's not much a plugin writer can do about it, other than complain to MetaQuotes.

Re: Zorro's Quality [Re: AndrewAMD] #471284
02/26/18 15:45
02/26/18 15:45
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
OK, thank you!
I get that it is unreliable outside market hours.
But out of curiosity: can you give an example of how exactly does time get reported/adjusted by MT4 over the weekends?

Re: Zorro's Quality [Re: Zheka] #471285
02/26/18 16:46
02/26/18 16:46
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Quote:
can you give an example of how exactly does time get reported/adjusted by MT4 over the weekends?
Server time comes from the TimeCurrent function:
https://docs.mql4.com/dateandtime/timecurrent

Zorro's API uses BrokerTime to verify that the clocks are synchronized. The plugin is supposed to forward the server clock.

Re: Zorro's Quality [Re: AndrewAMD] #471304
02/27/18 16:39
02/27/18 16:39
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
Thanks, Andrew.
Dug a little deeper to see how it actually works.

1) From what I could read, historical data requests in MT4 return UTC time. This is also confirmed by downloading data into MT4 itself.
Whether to adjust them during "synchronization" in BrokerTime is up to the plug-in implementation. Behavior can differ for historical requests vs rt updates.

Though, correct me, if I am wrong.

2) MQL4 update introduced new data structs: MqlTick and MqlRates.
https://docs.mql4.com/constants/structures/mqlrates

Besides efficiency, MqlRates also provides historical Spreads.
This should allow Zorro to save all MT4 price data as Ask, be consistent and actually make historical MT4 data usable.

How are other users working around this now when auto-trading their systems?

Page 3 of 4 1 2 3 4

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1