Dear Team,
I seem to have a problem with the Barfactory for my substrategies in this setup:
I have a portfolio strategy which has two substrategies.
Once I start OQ2014 and my strategy – it loads the portfolio strategy and from within that, I setup my two substrategies with
Code:
this.AddStrategy(s);
The barfactory for one of the substrategies gets started right away (and works fine), but for the other, I do not need to barfactory for a few hours after I start.
Now, when I set an reminder from which I start this:
Code:
BarFactory.Add(Instrument, BarType.Time, BarSize.Minute);
I get all sort of
Quote:
System.NullReferenceExceptions
.
See below.
So, it seems to me, that I cannot have a substratgy start its Barfactory either there is some mandatory steps that I need to do, for the barfactory to work at init time.
Any idea would be welcome.
Mike
Quote:
EventManager::OnException Exception occured in EventHandler - id = 28 Error code = 354 Requested market data is not subscribed.HSI JAN'19/DEEP - System.NullReferenceException: Object reference not set to an instance of an object.
at OpenQuant.MyStrategy.OnProviderError(ProviderError error)
at SmartQuant.Strategy.OQUtsMwVdu0(ProviderError error)
at SmartQuant.Strategy.OQUtsMwVdu0(ProviderError error)
at SmartQuant.Strategy.OQUtsMwVdu0(ProviderError error)
at SmartQuant.StrategyManager.NvLbeZGRlY(ProviderError )
at SmartQuant.EventManager.IfHrNiEnOk(Event )
at SmartQuant.EventManager.OnEvent(Event e)
source EventHandler exception: at OpenQuant.MyStrategy.OnProviderError(ProviderError error)
at SmartQuant.Strategy.OQUtsMwVdu0(ProviderError error)
at SmartQuant.Strategy.OQUtsMwVdu0(ProviderError error)
at SmartQuant.Strategy.OQUtsMwVdu0(ProviderError error)
at SmartQuant.StrategyManager.NvLbeZGRlY(ProviderError )
at SmartQuant.EventManager.IfHrNiEnOk(Event )
at SmartQuant.EventManager.OnEvent(Event e) System.NullReferenceException: Object reference not set to an instance of an object.
at OpenQuant.MyStrategy.OnProviderError(ProviderError error)
at SmartQuant.Strategy.OQUtsMwVdu0(ProviderError error)
at SmartQuant.Strategy.OQUtsMwVdu0(ProviderError error)
at SmartQuant.Strategy.OQUtsMwVdu0(ProviderError error)
at SmartQuant.StrategyManager.NvLbeZGRlY(ProviderError )
at SmartQuant.EventManager.IfHrNiEnOk(Event )
at SmartQuant.EventManager.OnEvent(Event e) ev.TypeId 21