However, it seems to be impossible to use that indicator within the Realtime scanner.
I get a message "Range.From must be specified and must be less then 31.12.2078"
Right now I use the following call to determine the dataset range:
Code: Select all
m_Req = Bars.Request;
DateTime ToTime = m_Req.To;
ToTime.AddHours(23-ToTime.Hour);
Output.WriteLine(m_dictDict.ContainsKey(m_Req.Symbol).ToString());
if( m_dictDict.ContainsKey(m_Req.Symbol) == false )
{
m_Req = Bars.Request;
if(Bars.Request.From == null )
m_Req.Range = DataRequest.CreateBarsBack(ToTime,1000);
else
m_Req.Range = DataRequest.CreateFromTo(Bars.Request.From,ToTime);