MarketDataGenerator

StockSharp.Algo.Testing.Generation

The market data generator.

继承自: Cloneable<MarketDataGenerator>

构造函数

MarketDataGenerator(SecurityId)

Initialize MarketDataGenerator.

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

属性

DataType : DataType

Market data type.

Interval : TimeSpan

The data generation interval.

LastGenerationTime : DateTime

The time of last data generation.

MaxPriceStepCount : int

The maximal number of price increments PriceStep to be returned through massive Steps.

MaxVolume : int

The maximal volume. The volume will be selected randomly from MinVolume to MaxVolume.

MinVolume : int

The minimal volume. The volume will be selected randomly from MinVolume to MaxVolume.

RandomArrayLength : int

The length of massive of preliminarily generated random numbers. The default is 100.

SecurityDefinition : SecurityMessage

Information about the trading instrument.

SecurityId : SecurityId

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

Steps : RandomArray<int>

The massive of random price increments in the range from 1 to MaxPriceStepCount.

Volumes : RandomArray<int>

The massive of random volumes in the range from MinVolume to MaxVolume.

方法

CopyTo(MarketDataGenerator)

Copy the message into the .

destination
The object, to which copied information.
Init()

To initialize the generator state.

IsTimeToGenerate(DateTime) : bool

Is new data generation required.

time
The current time.

返回值: , if data shall be generated, Otherwise, .

OnProcess(Message) : Message

Process message.

message
Message.

返回值: The result of processing. If is returned, then generator has no sufficient data to generate new message.

Process(Message) : Message

Process message.

message
Message.

返回值: The result of processing. If is returned, then generator has no sufficient data to generate new message.