CandleHelper

StockSharp.Algo.Candles

Extension class for candles.

Методы

BuyVolAbovePoC(VolumeProfileBuilder) : decimal

The total volume of bids which was above VolumeProfileBuilder).

volumeProfile
Volume profile.

Возвращает: The total volume of bids.

BuyVolBelowPoC(VolumeProfileBuilder) : decimal

The total volume of bids which was below VolumeProfileBuilder).

volumeProfile
Volume profile.

Возвращает: The total volume of bids.

Compress(IAsyncEnumerable<CandleMessage>, BiggerTimeFrameCandleCompressor, bool) : IAsyncEnumerable<CandleMessage>

Compress candles to bigger time-frame candles.

source
Smaller time-frame candles.
compressor
Compressor of candles from smaller time-frames to bigger.
includeLastCandle
Output last active candle as finished.

Возвращает: Bigger time-frame candles.

Compress(IEnumerable<CandleMessage>, BiggerTimeFrameCandleCompressor, bool) : IAsyncEnumerable<CandleMessage>

Compress candles to bigger time-frame candles.

source
Smaller time-frame candles.
compressor
Compressor of candles from smaller time-frames to bigger.
includeLastCandle
Output last active candle as finished.

Возвращает: Bigger time-frame candles.

ConvertToTrades(ICandleMessage, decimal, int, ValueTuple<Sides?, decimal, decimal, DateTime>[])

To create tick trades from candle.

candleMsg
Candle.
volumeStep
Volume step.
decimals
The number of decimal places for the volume.
ticks
Array to tick trades.
Delta(VolumeProfileBuilder) : decimal

The difference between VolumeProfileBuilder) and VolumeProfileBuilder).

volumeProfile
Volume profile.

Возвращает: Delta.

DeltaAbovePoC(VolumeProfileBuilder) : decimal

The total Delta which was above VolumeProfileBuilder).

volumeProfile
Volume profile.

Возвращает: Delta.

DeltaBelowPoC(VolumeProfileBuilder) : decimal

The total Delta which was below VolumeProfileBuilder).

volumeProfile
Volume profile.

Возвращает: Delta.

FilterSmallerTimeFrames(IEnumerable<TimeSpan>, TimeSpan) : IEnumerable<TimeSpan>

Filter time-frames to find multiple smaller time-frames.

timeFrames
All time-frames.
original
Original time-frame.

Возвращает: Multiple smaller time-frames.

GetBody(ICandleMessage) : decimal

To get the candle body.

candle
The candle for which you need to get the body.

Возвращает: The candle body.

GetBottomShadow(ICandleMessage) : decimal

To get the candle lower shadow length.

candle
The candle for which you need to get the lower shadow length.

Возвращает: The candle lower shadow length. If 0, there is no shadow.

GetCandleBounds(TimeSpan, DateTime, BoardMessage) : Range<DateTime>

To get candle time frames relatively to the exchange working hours.

timeFrame
The time frame for which you need to get time range.
currentTime
The current time within the range of time frames.
board
The information about the board from which WorkingTime working hours will be taken.

Возвращает: The candle time frames.

GetCandleBounds(TimeSpan, DateTime, ExchangeBoard) : Range<DateTime>

To get candle time frames relatively to the exchange working hours.

timeFrame
The time frame for which you need to get time range.
currentTime
The current time within the range of time frames.
board
The information about the board from which WorkingTime working hours will be taken.

Возвращает: The candle time frames.

GetLength(ICandleMessage) : decimal

To get the candle length.

candle
The candle for which you need to get a length.

Возвращает: The candle length.

GetMiddlePrice(ICandleMessage, decimal?) : decimal

To get the candle middle price.

candle
The candle for which you need to get a length.
priceStep
PriceStep

Возвращает: The candle length.

GetTimeFrameCount(Range<DateTime>, TimeSpan, BoardMessage) : long

To get the number of time frames within the specified time range.

range
The specified time range for which you need to get the number of time frames.
timeFrame
The time frame size.
board
BoardMessage.

Возвращает: The received number of time frames.

GetTimeFrameCount(Range<DateTime>, TimeSpan, ExchangeBoard) : long

To get the number of time frames within the specified time range.

range
The specified time range for which you need to get the number of time frames.
timeFrame
The time frame size.
board
ExchangeBoard.

Возвращает: The received number of time frames.

GetTopShadow(ICandleMessage) : decimal

To get the candle upper shadow length.

candle
The candle for which you need to get the upper shadow length.

Возвращает: The candle upper shadow length. If 0, there is no shadow.

GetValueArea``1(IEnumerable<T>)

To calculate the area for the candles group.

candles
Candles.

Возвращает: The area.

IsSame``1(T, T)

Determines the specified candles are same.

candle1
First.
candle2
Second.

Возвращает: Check result.

MaxPriceLevel(ICandleMessage) : CandlePriceLevel?

PriceLevels with maximum TotalVolume.

candle
ICandleMessage

Возвращает: PriceLevels with maximum TotalVolume.

MinPriceLevel(ICandleMessage) : CandlePriceLevel?

PriceLevels with minimum TotalVolume.

candle
ICandleMessage

Возвращает: PriceLevels with minimum TotalVolume.

PoC(VolumeProfileBuilder) : CandlePriceLevel

POC (Point Of Control) returns CandlePriceLevel which had the maximum volume.

volumeProfile
Volume profile.

Возвращает: The CandlePriceLevel which had the maximum volume.

PriceLevelOfMaxDelta(VolumeProfileBuilder) : CandlePriceLevel

It returns the price level at which the maximum VolumeProfileBuilder) is passed.

volumeProfile
Volume profile.

Возвращает: CandlePriceLevel.

PriceLevelOfMinDelta(VolumeProfileBuilder) : CandlePriceLevel

It returns the price level at which the minimum VolumeProfileBuilder) is passed.

volumeProfile
Volume profile.

Возвращает: The price level.

SellVolAbovePoC(VolumeProfileBuilder) : decimal

The total volume of asks which was above VolumeProfileBuilder).

volumeProfile
Volume profile.

Возвращает: The total volume of asks.

SellVolBelowPoC(VolumeProfileBuilder) : decimal

The total volume of asks which was below VolumeProfileBuilder).

volumeProfile
Volume profile.

Возвращает: The total volume of asks.

ToCandles(IEnumerable<ExecutionMessage>, MarketDataMessage, CandleBuilderProvider) : IAsyncEnumerable<CandleMessage>

To create candles from the tick trades collection.

executions
Tick data.
mdMsg
Market data subscription.
candleBuilderProvider
Candle builders provider.

Возвращает: Candles.

ToCandles(IAsyncEnumerable<ExecutionMessage>, Subscription, CandleBuilderProvider) : IAsyncEnumerable<CandleMessage>

To create candles from the tick trades collection.

executions
Tick data.
subscription
Market data subscription.
candleBuilderProvider
Candle builders provider.

Возвращает: Candles.

ToCandles(IAsyncEnumerable<ExecutionMessage>, MarketDataMessage, CandleBuilderProvider) : IAsyncEnumerable<CandleMessage>

To create candles from the tick trades collection.

executions
Tick data.
mdMsg
Market data subscription.
candleBuilderProvider
Candle builders provider.

Возвращает: Candles.

ToCandles(IEnumerable<QuoteChangeMessage>, MarketDataMessage, Level1Fields, CandleBuilderProvider) : IAsyncEnumerable<CandleMessage>

To create candles from the order books collection.

depths
Market depths.
mdMsg
Market data subscription.
type
Type of candle depth based data.
candleBuilderProvider
Candle builders provider.

Возвращает: Candles.

ToCandles(IAsyncEnumerable<QuoteChangeMessage>, Subscription, Level1Fields, CandleBuilderProvider) : IAsyncEnumerable<CandleMessage>

To create candles from the order books collection.

depths
Market depths.
subscription
Market data subscription.
type
Type of candle depth based data.
candleBuilderProvider
Candle builders provider.

Возвращает: Candles.

ToCandles(IEnumerable<QuoteChangeMessage>, Subscription, Level1Fields, CandleBuilderProvider) : IAsyncEnumerable<CandleMessage>

To create candles from the order books collection.

depths
Market depths.
subscription
Market data subscription.
type
Type of candle depth based data.
candleBuilderProvider
Candle builders provider.

Возвращает: Candles.

ToCandles(IAsyncEnumerable<QuoteChangeMessage>, MarketDataMessage, Level1Fields, CandleBuilderProvider) : IAsyncEnumerable<CandleMessage>

To create candles from the order books collection.

depths
Market depths.
mdMsg
Market data subscription.
type
Type of candle depth based data.
candleBuilderProvider
Candle builders provider.

Возвращает: Candles.

ToCandles(IEnumerable<ExecutionMessage>, Subscription, CandleBuilderProvider) : IAsyncEnumerable<CandleMessage>

To create candles from the tick trades collection.

executions
Tick data.
subscription
Market data subscription.
candleBuilderProvider
Candle builders provider.

Возвращает: Candles.

TotalBuyCount(VolumeProfileBuilder) : decimal

The total number of bids in the VolumeProfileBuilder.

volumeProfile
Volume profile.

Возвращает: The total number of bids.

TotalBuyVolume(VolumeProfileBuilder) : decimal

The total volume of bids in the VolumeProfileBuilder.

volumeProfile
Volume profile.

Возвращает: The total volume of bids.

TotalSellCount(VolumeProfileBuilder) : decimal

The total number of asks in the VolumeProfileBuilder.

volumeProfile
Volume profile.

Возвращает: The total number of asks.

TotalSellVolume(VolumeProfileBuilder) : decimal

The total volume of asks in the VolumeProfileBuilder.

volumeProfile
Volume profile.

Возвращает: The total volume of asks.

ToTickMessage(ValueTuple<Sides?, decimal, decimal, DateTime>, SecurityId, DateTime) : ExecutionMessage

Convert tick info into ExecutionMessage.

tick
Tick info.
securityId
SecurityId
localTime
LocalTime

Возвращает: ExecutionMessage

ToTrades``1(IEnumerable<T>, decimal)

To create tick trades from candles.

candles
Candles.
volumeStep
Volume step.

Возвращает: Tick trades.

ToTrades``1(IAsyncEnumerable<T>, decimal)

To create tick trades from candles.

candles
Candles.
volumeStep
Volume step.

Возвращает: Tick trades.

TryGetCandlesBuildFromAsync(IMessageAdapter, MarketDataMessage, CandleBuilderProvider, CancellationToken) : ValueTask<DataType>

Try get suitable market-data type for candles compression.

adapter
Adapter.
subscription
Subscription.
provider
Candle builders provider.
cancellationToken
CancellationToken

Возвращает: Which market-data type is used as a source value. if compression is impossible.

Update(VolumeProfileBuilder, ICandleBuilderValueTransform)

To update the profile with new value.

volumeProfile
Volume profile.
transform
The data source transformation.
VolumeAbovePoC(VolumeProfileBuilder) : decimal

The total volume which was above VolumeProfileBuilder).

volumeProfile
Volume profile.

Возвращает: Total volume.

VolumeBelowPoC(VolumeProfileBuilder) : decimal

The total volume which was below VolumeProfileBuilder).

volumeProfile
Volume profile.

Возвращает: Total volume.