0 registered members (),
1,459
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: bar aggregation problem + Download from FXCM problem
[Re: Grat]
#470809
02/07/18 12:17
02/07/18 12:17
|
Joined: Jul 2017
Posts: 785
Zheka
User
|
User
Joined: Jul 2017
Posts: 785
|
If using the TimeFrame you got different. Try without Timeframe and change only BarPeriod. I tried and with BarPeriod=5 it works as expected. It seems TimeFrame formation simply begins from the first available bar in a data file. Timeframes have to be manually coded around anyway to work properly.
|
|
|
Re: bar aggregation problem + Download from FXCM problem
[Re: kujo]
#470812
02/07/18 13:43
02/07/18 13:43
|
Joined: Jul 2017
Posts: 785
Zheka
User
|
User
Joined: Jul 2017
Posts: 785
|
JCL, this is my communication with support that shows everything: thank you for your email. The Zorro MT4 plugin uses the iTime function for M1 bars, which returns the bar close time according to MQ support.
If you have MT4 data that has different timestamps than the same data from IB, can you send us both? ----------------------------------------------------------- Me: iTime returns the bar open time!
This is indeed vague in the English version of MQL manual, but is stated clearly in the Russian.
MT4 in general operates with bar open times. https://docs.mql4.com/predefined/time ----------------------------------------------------------- Hi, if you have any evidence that the MQ support was wrong with the iTime function, you can anytime forward it us.1. Why does a user need to get involved in the implementation of a software? What matters is if it works correctly. 2. To establish that, why can't Support do the quick QA check between MT4 and IB's data? 3. What do I do now after the last message? - I indicated there is a problem - I specified the process to replicate (compare to IB data) - I went to MQL4 manual to confirm that MT4 in general works with bar open times AND that iTime works with bar open times... IF this is not enough to get someone to simply download both IB's data and MT4's and do the checking firsthand - what else?? (who would blindly trust some files from a user anyway) My understanding now is that there is a bar formation bug with MT4 plug-in.
Last edited by Zheka; 02/07/18 13:44.
|
|
|
Re: bar aggregation problem + Download from FXCM problem
[Re: jcl]
#470824
02/07/18 17:22
02/07/18 17:22
|
Joined: Jul 2017
Posts: 785
Zheka
User
|
User
Joined: Jul 2017
Posts: 785
|
The problem - again - is with the attitude.
I did not want to send the data this time as a matter of principle - because last time I did it (with IB plug-in), it was not taken seriously, and because this time it is really elementary.
IB's and MT4's data(from any STP/ECN broker) differ by only 0.1-0.3pip per side, but price direction is 100% the same. So, comparing direction and range of bars with the same timestamp between sources will show if there is a problem... Nothing mysterious. Just needs good, constructive attitude.
Secondly, Support believe(!) iTime function returns bar close time. But MT4 works with bar open times. It is written in the MQL manual in numerous places, but also specifically for this function.
So, this looks like a possible reason for the error and should be checked and truth found, right?
Instead, I am asked to provide proof of communication with MQ support. Attitude?
Messages from support like above, absence of QA, support refusing to read the forum - are not normal for people switching from other software. In the same way, as Zorro's EndMarket=1900 excludes 19:00, while the whole world around (from exchanges to cafes) operates otherwise.
|
|
|
Re: bar aggregation problem + Download from FXCM problem
[Re: Zheka]
#470829
02/07/18 22:53
02/07/18 22:53
|
Joined: Dec 2017
Posts: 129 Halifax, NS
kujo
Member
|
Member
Joined: Dec 2017
Posts: 129
Halifax, NS
|
No speculation, only facts. Broker: !Global Prime Pty Ltd EURUSD M1 history from MT4: Let's look at this tick: 2018.02.07,23:55,1.22700,1.22705,1.22683,1.22683,170 Now Zorro's history downloaded from this MT4 (time zone shift is 2h): The same tick: 2018.02.07 21:55 1.227 1.22705 1.22683 1.22683 0 263.8 The timestamp is identical BUT Zorro uses bar close time while MT4 uses bar open time. So, obviously it's a bug. If there is a doubt that MT4 uses bar open time, well... here comes the proof: Proof1:The bar closing time is not considered in the online trading system MetaTrader 4 (formally, the time of the last tick coming within a timeframe or the beginning time of the next timeframe can be considered as the bar closing time, as shown in Fig. 143). Source: https://book.mql4.com/functions/datetime. Please read the full article if there are still doubts. Proof2Let's check iTime function definition but in Russian since MetaQuotes is a Russian company and their RnD is in Russia. I guess tutorial was translated from Russian to English. But in English version it's not directly said that it returns open bar time only indirectly. However, the Russian version explicitly says that it's an open bar time. Russian version: https://docs.mql4.com/ru/series/itimeTranslated with Google: link Translated section with Google: Return value The value of the opening time of the bar (indicated by the shift parameter) of the corresponding chart or 0 in case of an error. For more information about the error, you need to call the GetLastError () function.
I forward the link to this post to Support. Thank you!
|
|
|
Re: bar aggregation problem + Download from FXCM problem
[Re: kujo]
#470830
02/08/18 01:06
02/08/18 01:06
|
Joined: Dec 2017
Posts: 129 Halifax, NS
kujo
Member
|
Member
Joined: Dec 2017
Posts: 129
Halifax, NS
|
Quick check of FXCM data shows the similar issue. FXCM has an open bar timestamp but Zorro treats it as a close bar timestamp. I assume you will be able to conduct a detailed examination if you need.
Maybe data from the other sources needs to be checked as well.
Last edited by kujo; 02/08/18 01:09.
|
|
|
Re: bar aggregation problem + Download from FXCM problem
[Re: kujo]
#470835
02/08/18 09:20
02/08/18 09:20
|
Joined: Jul 2000
Posts: 27,986 Frankfurt
jcl
Chief Engineer
|
Chief Engineer
Joined: Jul 2000
Posts: 27,986
Frankfurt
|
We received today several data files and logs from various users with bar issues. So, no need for Zheka's mystery data anymore.
No bar aggregation problem could be found with any of the received data files. So we must still conclude that Zorro bar aggregation is fine.
As to FXCM, it is clearly stated in the API manual that the time stamp is the bar start. However, we received today 2 different FXCM .t6 files, both also different to our own .t6 file, so it appears that the FXCM servers have slightly different history files. Maybe they are generating them local. We will look into this. Until then we will stick to treating FXCM time stamp as bar start.
As to MT4, when we developed the bridge we received a description by MetaQuotes how historical bars are generated. From this description the time stamp is the bar end. We'll contact them again for clarification. Inbetween, if you want to treat it as start time, just edit the Zorro.mq4 and add 60 to the iTime return value. Maybe we'll make this optional.
That's all info that I have about bar aggregation issues and worries.
|
|
|
|