MarketDepthGenerator

StockSharp.Algo.Testing.Generation

The order book generator using random method.

Inherits: MarketDataGenerator

Constructors

MarketDepthGenerator
protected MarketDepthGenerator(SecurityId securityId)
marketDepthGenerator = MarketDepthGenerator(securityId)

The order book generator using random method.

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

Properties

DataType
public override DataType DataType { get; }
value = marketDepthGenerator.DataType

Market data type.

GenerateDepthOnEachTrade
public bool GenerateDepthOnEachTrade { get; set; }
value = marketDepthGenerator.GenerateDepthOnEachTrade
marketDepthGenerator.GenerateDepthOnEachTrade = value

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

GenerateOrdersCount
public bool GenerateOrdersCount { get; set; }
value = marketDepthGenerator.GenerateOrdersCount
marketDepthGenerator.GenerateOrdersCount = value

Generate OrdersCount.

MaxAsksDepth
public int MaxAsksDepth { get; set; }
value = marketDepthGenerator.MaxAsksDepth
marketDepthGenerator.MaxAsksDepth = value

The maximal depth of offers.

MaxBidsDepth
public int MaxBidsDepth { get; set; }
value = marketDepthGenerator.MaxBidsDepth
marketDepthGenerator.MaxBidsDepth = value

The maximal depth of bids.

MaxGenerations
public int MaxGenerations { get; set; }
value = marketDepthGenerator.MaxGenerations
marketDepthGenerator.MaxGenerations = value

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

MaxSpreadStepCount
public int MaxSpreadStepCount { get; set; }
value = marketDepthGenerator.MaxSpreadStepCount
marketDepthGenerator.MaxSpreadStepCount = value

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.

MinSpreadStepCount
public int MinSpreadStepCount { get; set; }
value = marketDepthGenerator.MinSpreadStepCount
marketDepthGenerator.MinSpreadStepCount = value

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.

UseTradeVolume
public bool UseTradeVolume { get; set; }
value = marketDepthGenerator.UseTradeVolume
marketDepthGenerator.UseTradeVolume = value

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

Methods

CopyTo
protected void CopyTo(MarketDepthGenerator destination)
marketDepthGenerator.CopyTo(destination)

Copy the message into the .

destination
The object, to which copied information.
CreateQuote
protected QuoteChange CreateQuote(decimal startPrice, Sides side)
result = marketDepthGenerator.CreateQuote(startPrice, side)

To create the quote using random method.

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

Returns: The random quote.

Init
public override void Init()
marketDepthGenerator.Init()

To initialize the generator state.