Start/EndMarket are not copied from AssetMarketStart/AssetMarket

Posted By: aelagha

Start/EndMarket are not copied from AssetMarketStart/AssetMarket - 01/28/23 11:32

Hi there,

I am limiting the bar generation for intraday to certain hours. My understanding based on the BR_LOCAL flag help, is that if it is set, AssetMarketStart/AssetMarketEnd will be automatically copied to StartMarket/EndMarket. However, unless I uncomment the two lines to set StartMarket/EndMarket, the bars start generating at 9:30 and end at 15:59, suggesting StartMArket/EndMarket are at their default values and are not copied from AssetMarketStart/AssetMarketEnd. Am I missing something or is there a bug? The historical data is 1-min for SP500 futures so there are bars for each single min. even off hours. I am using zorro 2.53.9 rc. Appreciate your help.

BarPeriod = 1;
BarZone = EST;
//StartMarket = 0930;
//EndMarket = 1700;
BarMode = BR_LOCAL | BR_WEEKEND | BR_MARKET;
AssetMarketStart = 0930;
AssetMarketEnd = 1700;
AssetMarketZone = EST;
StartWeek = 10001;
EndWeek = 52359;
Posted By: aelagha

Re: Start/EndMarket are not copied from AssetMarketStart/AssetMarket - 01/29/23 06:13

Some futher testing, as it may help someione else

The above code actually does set StartMarket/EndMarket to the new hours (if you inspect/print StartMarket/EndMarket, they are set to the new values). However, for some reason, bars are still generated according to the default market hours (9:30-15:59).

Setting StartMarket/EndMarket in the assitList file does work, and bars are limited to these hours (in this case of course yuou do not need to use AssetMarketStart/AssetMarketEnd/AssetMarketZone)

I am still not sure if this is a bug or if I am missing something.
© 2024 lite-C Forums