if (State == State.Realtime)
Can you please elaborate in laymans term what you mean by "transition from historical to real-time?" I mean I can guess what it might mean but why is this necessary? Please give an example of an issue it may cause if it's not used. I'm trying to understand the benefit of me adding this to my strategy and what changes it may cause to a strategy?
side note;
if(State == State.Historical && Times[0][0].Date <= new DateTime(2018, 01, 8)) return;
if(State == State.Historical) return;
Say today is 8/30/2018 and I start a strategy with daily data and is COBC and that has the below
if(State == State.Historical && Times[0][0].Date <= new DateTime(2018, 08, 29)) return;
Close[10]>Close[20]
Question 3)
I basically have a condition that becomes true once every few months and then stays true for various months. It's a bool that becomes true/false. For this condition, I want the strategy to look at all historical data. But then there are other parts of the strategy (position/account values) that I do not want to look at all historical data, therefore, I have this condition: (but this causes an issue b/c the bool could be true today)
if(State == State.Historical && Times[0][0].Date <= new DateTime(2018, 08, 29))
if(State == State.Historical) {Set the conditions for my bool;}
if(State == State.Historical && Times[0][0].Date <= new DateTime(2018, 08, 29)) return;
Comment