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.