Gamestudio Links
Zorro Links
Newest Posts
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AndrewAMD, Ayumi, PeWi, Quad, VoroneTZ), 513 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: How to set global Asset,Bar Zone or AssetFrame? [Re: TedMar] #480540
06/14/20 04:32
06/14/20 04:32
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline
Senior Member
Grat  Offline
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
Try source data with ZhistoryEditor

Re: How to set global Asset,Bar Zone or AssetFrame? [Re: Grat] #480541
06/14/20 07:45
06/14/20 07:45
Joined: Oct 2019
Posts: 27
Germany
TedMar Offline OP
Newbie
TedMar  Offline OP
Newbie

Joined: Oct 2019
Posts: 27
Germany
Originally Posted by Grat
Try source data with ZhistoryEditor

sorry i not understand, what is your idea. Hunderts of assets to Edit?

in fact the quest is very simple. I'm surprised it's so hard to set such simple adjustments.

Re: How to set global Asset,Bar Zone or AssetFrame? [Re: TedMar] #480542
06/14/20 08:06
06/14/20 08:06
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
Maybe its unclear what you want to adjust. Bar zone and market time are already set, so what is still the problem?

If there is a bar or not at a certain hour has nothing to do with your code, but with the historical data.

Re: How to set global Asset,Bar Zone or AssetFrame? [Re: TedMar] #480543
06/14/20 08:16
06/14/20 08:16
Joined: Oct 2019
Posts: 27
Germany
TedMar Offline OP
Newbie
TedMar  Offline OP
Newbie

Joined: Oct 2019
Posts: 27
Germany
@Spirt , u have idea why i don't get bar Result Session start 9:30? U have result 9:30 with this code and SPY datafeed from Zorro Download page?

Re: How to set global Asset,Bar Zone or AssetFrame? [Re: TedMar] #480544
06/14/20 08:21
06/14/20 08:21
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
Do you mean 9:30 in the log? The log is UTC.

Re: How to set global Asset,Bar Zone or AssetFrame? [Re: Spirit] #480545
06/14/20 08:59
06/14/20 08:59
Joined: Oct 2019
Posts: 27
Germany
TedMar Offline OP
Newbie
TedMar  Offline OP
Newbie

Joined: Oct 2019
Posts: 27
Germany
Originally Posted by Spirit
Do you mean 9:30 in the log? The log is UTC.

Result log, yes

I confused now laugh , if i leave BarZone from code , result is TimeStamp is ok, but DATA is UTC + 1 ,+2 (wrong)

Code

function run() 
{
	StartDate = 20200305;
        EndDate = 20200311;
	
	// BarZone = EST;       
        BarPeriod = 30;
	setf(BarMode,BR_MARKET);
	
	StartMarket = 0930;
	EndMarket = 1600;
	set(LOGFILE+PLOTNOW);
	
	asset("SPY");
	vars Prices = series(priceClose());
}






Code
154: Thu 20-03-05 15:00] (304.59)
[155: Thu 20-03-05 15:30] (305.55)
[156: Fri 20-03-06 09:30] (298.14) // ok
[157: Fri 20-03-06 10:00] (295.84)
[158: Fri 20-03-06 10:30] (294.21)
[159: Fri 20-03-06 11:00] (294.40)
[160: Fri 20-03-06 11:30] (293.79)
[161: Fri 20-03-06 12:00] (294.51)
[162: Fri 20-03-06 12:30] (293.79)
[163: Fri 20-03-06 13:00] (293.32)
[164: Fri 20-03-06 13:30] (293.35)
[165: Fri 20-03-06 14:00] (293.34)
[166: Fri 20-03-06 14:30] (293.18)
[167: Fri 20-03-06 15:00] (293.34)
[168: Fri 20-03-06 15:30] (296.42)
[169: Mon 20-03-09 09:30] (281.97)  // ok
[170: Mon 20-03-09 10:00] (279.99)
[171: Mon 20-03-09 10:30] (280.70)
[172: Mon 20-03-09 11:00] (279.75)
[173: Mon 20-03-09 11:30] (278.30)
[174: Mon 20-03-09 12:00] (278.49)
[175: Mon 20-03-09 12:30] (276.18)
[176: Mon 20-03-09 13:00] (277.38)
[177: Mon 20-03-09 13:30] (275.30)
[178: Mon 20-03-09 14:00] (279.87)
[179: Mon 20-03-09 14:30] (280.75)
[180: Mon 20-03-09 15:00] (278.62)
[181: Mon 20-03-09 15:30] (281.06)
[182: Tue 20-03-10 09:30] (286.40) 
[183: Tue 20-03-10 10:00] (288.05)
[184: Tue 20-03-10 10:30] (287.35)
[185: Tue 20-03-10 11:00] (288.01)
[186: Tue 20-03-10 11:30] (286.20)
[187: Tue 20-03-10 12:00] (286.00)
[188: Tue 20-03-10 12:30] (283.78)
[189: Tue 20-03-10 13:00] (284.38)
[190: Tue 20-03-10 13:30] (284.64)
[191: Tue 20-03-10 14:00] (282.64)
[192: Tue 20-03-10 14:30] (282.36)
[193: Tue 20-03-10 15:00] (278.61)



i try now with other Instrument and history

Last edited by TedMar; 06/14/20 17:03.
Re: How to set global Asset,Bar Zone or AssetFrame? [Re: TedMar] #480546
06/14/20 09:41
06/14/20 09:41
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
The log is in UTC, while StartMarket/EndMarket are in EST (BarZone=ET). So, all is *mostly* correct in the log.

Except Zorro treats end times as "exclusive of" the specified time, i.e. EndMarket=1600 will NOT include the bar ending at 16:00; you have to set EndMarket=1601 to include the last 30-min bar into the day. (this logic is technically correct for ticks, but not for bars- which are timestamped by Zorro itself by the end time "inclusive of ").

Also, StartMarket=9:30 does NOT mean that your trading day will start from 9:30 (as you would expect). Rather, this is a timestamp(=END) of the first bar in a trading day.
And where it starts depends on the BarMode, EndMarket and available price history in the file (with the current script you get an "overnight" bar spanning 15:30-9:30).

Set Verbose=3 to see bar open and close prices and construct the "price candles" the way you need .

Re: How to set global Asset,Bar Zone or AssetFrame? [Re: TedMar] #480551
06/14/20 16:15
06/14/20 16:15
Joined: Oct 2019
Posts: 27
Germany
TedMar Offline OP
Newbie
TedMar  Offline OP
Newbie

Joined: Oct 2019
Posts: 27
Germany
The Session Start  @9:30 is in Zorro default , then TimeStamp in log is correct , but data is from local Machine (CET +1 /CEST +2) @9:30  
if set BarZone to EST , this changed session start in UTC.
Im totally confused. 
Please.... I would like set EST Zone Time+Data (New York) MARKET i environment with correct Data  from UTC History only. 

 How?

Last edited by TedMar; 06/15/20 19:28.
Page 2 of 2 1 2

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1