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)
Initialize MarketDepthGenerator.
protected MarketDepthGenerator(SecurityId securityId)
Parameters
securityId
SecurityIdThe identifier of the instrument, for which data shall be generated.
Properties
DataType
Market data type.
public override DataType DataType { get; }
Property Value
GenerateDepthOnEachTrade
Shall order books be generated after each trade. The default is false.
public bool GenerateDepthOnEachTrade { get; set; }
Property Value
GenerateOrdersCount
Generate OrdersCount.
public bool GenerateOrdersCount { get; set; }
Property Value
MaxAsksDepth
The maximal depth of offers.
public int MaxAsksDepth { get; set; }
Property Value
Remarks
The default value is 10.
MaxBidsDepth
The maximal depth of bids.
public int MaxBidsDepth { get; set; }
Property Value
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
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
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
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
Remarks
The default value is true.
Methods
CopyTo(MarketDepthGenerator)
Copy the message into the destination
.
protected void CopyTo(MarketDepthGenerator destination)
Parameters
destination
MarketDepthGeneratorThe object, to which copied information.
CreateQuote(decimal, Sides)
To create the quote using random method.
protected QuoteChange CreateQuote(decimal startPrice, Sides side)
Parameters
startPrice
decimalThe initial price, based on which a quote price shall be got using random method.
side
SidesThe quote direction.
Returns
- QuoteChange
The random quote.