SamplingUtils SynthesizeCandles Method (IEnumerable ITimeSeriesSample , UInt32, Action CandleSample, SecDBFileReader QuoteSample, Int32 , Action CandleSample, 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 the market (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<CandleSample> SynthesizeCandles(
	this IEnumerable<ITimeSeriesSample> source,
	uint secSamplingPeriod,
	Action<CandleSample, SecDBFileReader..::..QuoteSample, int> funcQuote = null,
	Action<CandleSample, SecDBFileReader..::..TradeSample, int> funcTrade = null
)

Parameters

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

Return Value

Type: OnlineIEnumerable CandleSample 
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