Table of Contents

Class MarketDepthGenerator

Namespace
StockSharp.Algo.Testing
Assembly
StockSharp.Algo.dll

The order book generator using random method.

public abstract class MarketDepthGenerator : MarketDataGenerator
Inheritance
MarketDepthGenerator
Derived
Inherited Members
Extension Methods

Constructors

MarketDepthGenerator(SecurityId)

protected MarketDepthGenerator(SecurityId securityId)

Parameters

securityId SecurityId

The identifier of the instrument, for which data shall be generated.

Properties

DataType

Market data type.

public override DataType DataType { get; }

Property Value

DataType

GenerateDepthOnEachTrade

Shall order books be generated after each trade. The default is false.

public bool GenerateDepthOnEachTrade { get; set; }

Property Value

bool

GenerateOrdersCount

Generate OrdersCount.

public bool GenerateOrdersCount { get; set; }

Property Value

bool

MaxAsksDepth

The maximal depth of offers.

public int MaxAsksDepth { get; set; }

Property Value

int

Remarks

The default value is 10.

MaxBidsDepth

The maximal depth of bids.

public int MaxBidsDepth { get; set; }

Property Value

int

Remarks

The default value is 10.

MaxGenerations

The maximal number of generations after last occurrence of source data for the order book.

public int MaxGenerations { get; set; }

Property Value

int

Remarks

The default value equals 20.

MaxSpreadStepCount

The maximal value of spread between the best quotes in units of price increments number. The spread value will be selected randomly between MinSpreadStepCount and MaxSpreadStepCount.

public int MaxSpreadStepCount { get; set; }

Property Value

int

Remarks

The default value is MaxValue.

MinSpreadStepCount

The minimal value of spread between the best quotes in units of price increments number. The spread value will be selected randomly between MinSpreadStepCount and MaxSpreadStepCount.

public int MinSpreadStepCount { get; set; }

Property Value

int

Remarks

The default value is 1.

UseTradeVolume

To use to generate best quotes in the order book volume of history trades.

public bool UseTradeVolume { get; set; }

Property Value

bool

Remarks

The default value is true.

Methods

CopyTo(MarketDepthGenerator)

Copy the message into the destination.

protected void CopyTo(MarketDepthGenerator destination)

Parameters

destination MarketDepthGenerator

The object, to which copied information.

CreateQuote(decimal, Sides)

To create the quote using random method.

protected QuoteChange CreateQuote(decimal startPrice, Sides side)

Parameters

startPrice decimal

The initial price, based on which a quote price shall be got using random method.

side Sides

The quote direction.

Returns

QuoteChange

The random quote.