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), 652 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
Page 1 of 2 1 2
How to set global Asset,Bar Zone or AssetFrame? #480507
06/11/20 23:38
06/11/20 23:38
Joined: Oct 2019
Posts: 27
Germany
TedMar Offline OP
Newbie
TedMar  Offline OP
Newbie

Joined: Oct 2019
Posts: 27
Germany
Hi, i looking for resolve a simple resolution to set Zone,Bars and Market in EST (New York)
i.e.
load History t.6 from SPY with UTC Time Stamps
Local Maschine is CEST (UTC +2)

Code
function run() 
{
	
	StartDate = 20200301;
        EndDate = 20200314;
	
        AssetZone = EST;
	AssetMarket = EST;
	BarZone = EST;
	
	StartMarket = 0930;
	EndMarket = 1600;
	
	BarMode = BR_MARKET;


	set(LOGFILE+PLOTNOW);
	setf(PlotMode, PL_FINE);
	
	// HistoryZone = UTC;
	
        BarPeriod = 5;
	
	asset("SPY");

	vars Prices = series(priceClose());


}


code NOT WORKS for me...

i would like see every Day start Market at 9:30 before and after Daylight Saving switch too (9 March)

How i can set SPY in EST zone?




v2.27.7b





Last edited by TedMar; 06/11/20 23:40.
Re: How to set global Asset,Bar Zone or AssetFrame? [Re: TedMar] #480517
06/12/20 09:43
06/12/20 09:43
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
Variables beginning with "Asset..." are for the selected asset, so they make not much sense in your code before selecting an asset. But BarZone is ok.

https://manual.zorro-project.com/assetzone.htm


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

Joined: Oct 2019
Posts: 27
Germany
Originally Posted by Spirit
Variables beginning with "Asset..." are for the selected asset, so they make not much sense in your code before selecting an asset. But BarZone is ok.

https://manual.zorro-project.com/assetzone.htm


im not clear about it, if i set AssetZone in Asset block , can't see any changes.
is possible u write down an example?
THX

Re: How to set global Asset,Bar Zone or AssetFrame? [Re: TedMar] #480521
06/12/20 12:37
06/12/20 12:37
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 this...
Code
function run() 
{
	
	StartDate = 20200301;
        EndDate = 20200314;
	
	BarZone = EST;
        BarPeriod = 5;
	BarMode = BR_MARKET;
	
	StartMarket = 0930;
	EndMarket = 1600;
	set(LOGFILE+PLOTNOW);
	setf(PlotMode, PL_FINE);
	
	// HistoryZone = UTC;
	
	
	asset("SPY");
        AssetZone = EST;
	AssetMarket = EST;

	vars Prices = series(priceClose());
}

Last edited by Grat; 06/12/20 12:37.
Re: How to set global Asset,Bar Zone or AssetFrame? [Re: TedMar] #480522
06/12/20 12:38
06/12/20 12:38
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline
Senior Member
Grat  Offline
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
AssetZone

Time zone of the current asset, used for setting AssetFrame to a daily TimeFrame that begins at FrameOffset in local time. When your strategy contains a portfolio of different assets that you want to trade daily at different times, use this parameter to define the time frames of individual assets.

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

Joined: Oct 2019
Posts: 27
Germany
Originally Posted by Grat
AssetZone

Time zone of the current asset, used for setting AssetFrame to a daily TimeFrame that begins at FrameOffset in local time. When your strategy contains a portfolio of different assets that you want to trade daily at different times, use this parameter to define the time frames of individual assets.

Grat u code not works , i changed time frame to 30 for better log.
Code

[169: Thu 20-03-05 20:00] (302.34)
[170: Thu 20-03-05 20:30] (300.65)
[171: Fri 20-03-06 14:30] (293.18)  // pre Daylight Saving    (14:30)
[172: Fri 20-03-06 15:00] (293.34)
[173: Fri 20-03-06 15:30] (296.42)
[174: Fri 20-03-06 16:00] (297.09)
[175: Fri 20-03-06 16:30] (295.14)
[176: Fri 20-03-06 17:00] (294.94)
[177: Fri 20-03-06 17:30] (293.21)
[178: Fri 20-03-06 18:00] (294.56)
[179: Fri 20-03-06 18:30] (295.59)
[180: Fri 20-03-06 19:00] (293.66)
[181: Fri 20-03-06 19:30] (293.46)
[182: Fri 20-03-06 20:00] (291.01)
[183: Fri 20-03-06 20:30] (292.19)
[184: Sat 20-03-07 14:30] (282.81)  //  Sat?
[185: Mon 20-03-09 13:30] (275.30) // after Daylight Saving (13:30)
[186: Mon 20-03-09 14:00] (279.87)
[187: Mon 20-03-09 14:30] (280.75)
[188: Mon 20-03-09 15:00] (278.62)
[189: Mon 20-03-09 15:30] (281.06)
[190: Mon 20-03-09 16:00] (282.70)
[191: Mon 20-03-09 16:30] (281.02)
[192: Mon 20-03-09 17:00] (279.72)
[193: Mon 20-03-09 17:30] (278.61)
[194: Mon 20-03-09 18:00] (275.83)
[195: Mon 20-03-09 18:30] (274.95)
[196: Mon 20-03-09 19:00] (276.62)
[197: Mon 20-03-09 19:30] (277.91)
[198: Tue 20-03-10 13:30] (284.64)   // after Daylight Saving 
[199: Tue 20-03-10 14:00] (282.64)


How i get 9:30 start Session?

Last edited by TedMar; 06/12/20 15:11.
Re: How to set global Asset,Bar Zone or AssetFrame? [Re: TedMar] #480532
06/13/20 08:43
06/13/20 08:43
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
All this is wrong, here is it fixed:

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

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

Joined: Oct 2019
Posts: 27
Germany
Originally Posted by Spirit
All this is wrong, here is it fixed:


?? Result is same , No session start @ 9:30 , and shift @ Daylight Saving

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());
}



Log
Code
End of lookback period

[143: Thu 20-03-05 14:30] (304.99)
[144: Thu 20-03-05 15:00] (304.59)
[145: Thu 20-03-05 15:30] (305.55)
[146: Thu 20-03-05 16:00] (306.03)
[147: Thu 20-03-05 16:30] (307.94)
[148: Thu 20-03-05 17:00] (305.75)
[149: Thu 20-03-05 17:30] (304.47)
[150: Thu 20-03-05 18:00] (302.49)
[151: Thu 20-03-05 18:30] (303.08)
[152: Thu 20-03-05 19:00] (303.50)
[153: Thu 20-03-05 19:30] (301.43)
[154: Thu 20-03-05 20:00] (302.34)
[155: Thu 20-03-05 20:30] (300.65)
[156: Fri 20-03-06 14:30] (293.18)       //14:30 Winter (Daylight Saving)
[157: Fri 20-03-06 15:00] (293.34)
[158: Fri 20-03-06 15:30] (296.42)
[159: Fri 20-03-06 16:00] (297.09)
[160: Fri 20-03-06 16:30] (295.14)
[161: Fri 20-03-06 17:00] (294.94)
[162: Fri 20-03-06 17:30] (293.21)
[163: Fri 20-03-06 18:00] (294.56)
[164: Fri 20-03-06 18:30] (295.59)
[165: Fri 20-03-06 19:00] (293.66)
[166: Fri 20-03-06 19:30] (293.46)
[167: Fri 20-03-06 20:00] (291.01)
[168: Fri 20-03-06 20:30] (292.19)
[169: Mon 20-03-09 13:30] (275.30)  //13:30 Summer (Daylight Saving)
[170: Mon 20-03-09 14:00] (279.87)
[171: Mon 20-03-09 14:30] (280.75)
[172: Mon 20-03-09 15:00] (278.62)
[173: Mon 20-03-09 15:30] (281.06)
[174: Mon 20-03-09 16:00] (282.70)
[175: Mon 20-03-09 16:30] (281.02)
[176: Mon 20-03-09 17:00] (279.72)
[177: Mon 20-03-09 17:30] (278.61)
[178: Mon 20-03-09 18:00] (275.83)
[179: Mon 20-03-09 18:30] (274.95)
[180: Mon 20-03-09 19:00] (276.62)
[181: Mon 20-03-09 19:30] (277.91)
[182: Tue 20-03-10 13:30] (284.64)
[183: Tue 20-03-10 14:00] (282.64)
[184: Tue 20-03-10 14:30] (282.36)
[185: Tue 20-03-10 15:00] (278.61)
[186: Tue 20-03-10 15:30] (274.91)
[187: Tue 20-03-10 16:00] (275.47)
[188: Tue 20-03-10 16:30] (277.59)
[189: Tue 20-03-10 17:00] (278.37)


Any idea more to resolve them?

Attached Files 2020-06-13 16_32_26-Window.png
Re: How to set global Asset,Bar Zone or AssetFrame? [Re: TedMar] #480537
06/13/20 17:39
06/13/20 17:39
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline
Senior Member
Grat  Offline
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
Ok,

question, you are downloaded data from?

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

Joined: Oct 2019
Posts: 27
Germany
Originally Posted by Grat
Ok,

question, you are downloaded data from?


https://zorro-project.com/download.php

Historical Data Archives

SPY M1 & EOD Options 2011+ - Price & option chain history (t6/t8 formats, 150 MB, free)

Page 1 of 2 1 2

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1