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/2023:40.
Re: How to set global Asset,Bar Zone or AssetFrame?
[Re: TedMar]
#480517 06/12/2009:4306/12/2009:43
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/2015:0806/12/2015:08
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.
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/2016:1506/14/2016:15
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.