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
1 registered members (SBGuy), 712 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Inconsistency between SierraChart and Zorro bars #483066
04/29/21 20:23
04/29/21 20:23
Joined: Apr 2021
Posts: 41
Slovakia
T
tomna1993 Offline OP
Newbie
tomna1993  Offline OP
Newbie
T

Joined: Apr 2021
Posts: 41
Slovakia
Hello,

I run into a strange problem. I exported 1min NASDAQ (NQM21) bar data from Sierrachart and loaded it to Zorro, first I converted the data to T6 then checked the data with history editor between the two platforms. The 1min bars are generated correctly, I see the same bars as they are in SierraCharts. But when I change the bar period in Zorro to greather than 1min then the bars will look different from the SierraChart bars. There is a 15 minutes break in data from 21:15 to 21:30 (UTC), there are no bars generated during this break. At first I thought that will be the problem, but can't confirm it.

Then I checked the time stamps and it looks like the 60min bars generated by zorro are one hour late from the time stamps in sierra. Maybe because the time stamps for bars in Sierra are the opening times and not the closing times? I tried to add 1 minute offset to the bars with BarOffset but got the same result as before.

I tried various option as set the Start and EndMarket, Start and EndWeek with the corresponding flags but no luck yet.
Can you give me some advice where to start with this kind of problem? What should I read in the documentation? Which options can cause this type of inconsistency? Or is it a normal behavior with data from another platforms? I attached two pictures where you can see the problem.

Code
function run() 
{
	if(is(INITRUN))
	{
		BarOffset = 60;
	}
	asset("NQ_2020_1min_UTC");
	set(PLOTNOW);
}


Thank you for your help!

Attached Files
1min_bars.png (88 downloads)
60min_bars.png (70 downloads)
Re: Inconsistency between SierraChart and Zorro bars [Re: tomna1993] #483094
05/04/21 03:55
05/04/21 03:55
Joined: May 2021
Posts: 3
C
contactmmfx Offline
Guest
contactmmfx  Offline
Guest
C

Joined: May 2021
Posts: 3
I actually am having a very similar problem myself... I will post the pictures here. I upload a data set from Refinitiv 1M bar data for spot FX into Zorro (properly configured and in correct folders) I dont get any errors but when I run my strategy over the data i get completely different returns / drawdowns etc then I do when i run the strategy on Zorro back test with Dukascopy Data. When I analyze the charts and review the entries and exits the bars seem to not overlay properly for OHLC, many bars open beyond or within the previous bar not at its last close price which I think may be skewing my results from my strategy as its plotted in the data. I thought at first it was an aggregation issue within Zorro since my strategy runs off of 5M bars not 1M so I thought it was aggregating the 1M bars into 5M candles but then when I uploaded 5M bars to validate this I still had the same issue. Please let me know if anyone can recommend anything. The data set should be clean as possible as it is directly from Datascope Refinitiv data which is top of industry standards. "Forum" picture shows left side as Refinitiv data and right side is live Oanda data from trades taken this week (the bars are plotting differently aswell)

Attached Files Forum.jpgForum 2.jpgForum 3.PNG
Re: Inconsistency between SierraChart and Zorro bars [Re: tomna1993] #483139
05/05/21 19:03
05/05/21 19:03
Joined: Apr 2021
Posts: 41
Slovakia
T
tomna1993 Offline OP
Newbie
tomna1993  Offline OP
Newbie
T

Joined: Apr 2021
Posts: 41
Slovakia
I bought the Zorro S and I tested different bar periods with tick data and it works fine. Doesn't matter the bar period Zorro draws exactly the same bars as I see in SierraCharts. So something messing with me in Zorro.

Re: Inconsistency between SierraChart and Zorro bars [Re: tomna1993] #483141
05/05/21 19:19
05/05/21 19:19
Joined: Dec 2019
Posts: 53
ozgur Offline
Junior Member
ozgur  Offline
Junior Member

Joined: Dec 2019
Posts: 53
Normally timestamp in data should be UTC.

Can you try this code in the INITRUN and see if it helps (just to debug, not the final solution)

resf(BarMode, BR_WEEKEND);
resf(BarMode, BR_MARKET);


Last edited by ozgur; 05/05/21 19:20.
Re: Inconsistency between SierraChart and Zorro bars [Re: tomna1993] #483144
05/05/21 20:49
05/05/21 20:49
Joined: Apr 2021
Posts: 41
Slovakia
T
tomna1993 Offline OP
Newbie
tomna1993  Offline OP
Newbie
T

Joined: Apr 2021
Posts: 41
Slovakia
I exported the data in UTC. I tried your code but it's the same.

Re: Inconsistency between SierraChart and Zorro bars [Re: tomna1993] #483150
05/06/21 10:46
05/06/21 10:46
Joined: Apr 2021
Posts: 41
Slovakia
T
tomna1993 Offline OP
Newbie
tomna1993  Offline OP
Newbie
T

Joined: Apr 2021
Posts: 41
Slovakia
So it looks like I found the trick to correct this. I corrected the time stamps of the bars and it works. The time stamps from SierraChart are show the open time, in Zorro time stamps show close time. It's a little bit confusing because all of the platforms what I used are used the open time for bars. I don't know if there is an option in Zorro to correct this automatically, because with more data this excel work just not worth it. I hope something like a flag or switch will be implemented in Zorro to be able to switch between open or close time stamps.

Thanks for the help guys!
You all have a wonderful day!

Re: Inconsistency between SierraChart and Zorro bars [Re: tomna1993] #483187
05/08/21 14:48
05/08/21 14:48
Joined: Dec 2019
Posts: 53
ozgur Offline
Junior Member
ozgur  Offline
Junior Member

Joined: Dec 2019
Posts: 53
If you are using CSVtoHistory script then you can change timestamp before exporting to t6. Actually I just realised I do this with Dukascopy data:

Code
	
        int i;
	for(i=0; i<Records; i++)
		dataSet(1,i,0,dataVar(1,i,0)+(1/(24.0*60))); // Add a minute to change from open bar dates to close bar dates

Re: Inconsistency between SierraChart and Zorro bars [Re: ozgur] #483188
05/08/21 19:11
05/08/21 19:11
Joined: Apr 2021
Posts: 41
Slovakia
T
tomna1993 Offline OP
Newbie
tomna1993  Offline OP
Newbie
T

Joined: Apr 2021
Posts: 41
Slovakia
It works! Thank you very much this code! smile


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1