SamplingUtils SynthesizeCandles T  Method (IEnumerable ITimeSeriesSample , UInt32, Action T, SecDBFileReader QuoteSample, Int32 , Action T, SecDBFileReader TradeSample, Int32 )NFX Class Library

[This is preliminary documentation and is subject to change.]

Synthesizes a stream of candle samples from Quote and Trade samples coming from a market data source (i.e SecDB file)

Namespace: NFX.Financial.Market
Assembly: NFX (in NFX.dll) Version: 3.0.0.1 (3.0.0.1)
Syntax

public static IEnumerable<T> SynthesizeCandles<T>(
	this IEnumerable<ITimeSeriesSample> source,
	uint secSamplingPeriod,
	Action<T, SecDBFileReader..::..QuoteSample, int> funcQuote,
	Action<T, SecDBFileReader..::..TradeSample, int> funcTrade
)
where T : ITimedSample

Parameters

source
Type: OnlineSystem.Collections.Generic IEnumerable ITimeSeriesSample 
Source of market data
secSamplingPeriod
Type: OnlineSystem UInt32
The output sampling period
funcQuote
Type: OnlineSystem Action T, SecDBFileReader QuoteSample, OnlineInt32 
Aggregation func for Quote, if null default is used which aggregates best bid
funcTrade
Type: OnlineSystem Action T, SecDBFileReader TradeSample, OnlineInt32 
Aggregation func for Quote, if null default is used which aggregates buy and sell volumes
Type Parameters

T

Return Value

Type: OnlineIEnumerable T 
Synthesized candle stream

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type OnlineIEnumerable ITimeSeriesSample . When you use instance method syntax to call this method, omit the first parameter. For more information, see OnlineExtension Methods (Visual Basic) or OnlineExtension Methods (C# Programming Guide).
See Also