Source/NFX/Financial/Market/SecDb/SecDBFileReader.cs
/// <summary>
/// Tries to find a candle stream returned as CandleSamples with the specified exact resolution starting at the specified start time and returns it, or
/// returns an empty enumerable if resolution is not available
/// </summary>
Tries to find a candle stream returned as CandleSamples with the specified exact resolution starting at the specified start time and returns it, or
returns an empty enumerable if resolution is not available
Tries to find a candle stream returned as CandleSamples with the specified exact resolution starting at the specified start time and returns it or returns an empty enumerable if resolution is not available
public IEnumerable<CandleSample> GetCandleDataAsCandleSamples(uint resolutionSec, DateTime startTimeUTC)
      {
        var hdr = GetCandleHeader(resolutionSec);
        if (!hdr.IsAssigned) return Enumerable.Empty<CandleSample>();
        return this.GetCandleData(hdr, hdr.GetSkipSecondsUntil(startTimeUTC))
                   .Select( cd =>
                           {
                            var cs = cd.ToCandleSample();
                            cs.TimeSpanMs = hdr.ResolutionSec * 1000;
                            return cs;
                           });
      }
public IEnumerable < CandleSample > GetCandleDataAsCandleSamples ( uint resolutionSec , DateTime startTimeUTC ) { var hdr = GetCandleHeader ( resolutionSec ) ; if ( ! hdr . IsAssigned ) return Enumerable . Empty < CandleSample > ( ) ; return this . GetCandleData ( hdr , hdr . GetSkipSecondsUntil ( startTimeUTC ) ) . Select ( cd => { var cs = cd . ToCandleSample ( ) ; cs . TimeSpanMs = hdr . ResolutionSec * 1000 ; return cs ; } ) ; }
Tries to find a candle stream returned as CandleSamples with the specified exact resolution starting at the specified start time and returns it, or
returns an empty enumerable if resolution is not available
Tries to find a candle stream returned as CandleSamples with the specified exact resolution starting at the specified start time and returns it or returns an empty enumerable if resolution is not available
resolutionSec
uint
startTimeUTC
DateTime