Class MarketDataGenerator
- Namespace
- StockSharp.Algo.Testing
- Assembly
- StockSharp.Algo.dll
The market data generator.
public abstract class MarketDataGenerator : Cloneable<MarketDataGenerator>
- Inheritance
-
MarketDataGenerator
- Derived
- Extension Methods
Constructors
MarketDataGenerator(SecurityId)
Initialize MarketDataGenerator.
protected MarketDataGenerator(SecurityId securityId)
Parameters
securityId
SecurityIdThe identifier of the instrument, for which data shall be generated.
Properties
DataType
Market data type.
public abstract DataType DataType { get; }
Property Value
Interval
The data generation interval.
public TimeSpan Interval { get; set; }
Property Value
LastGenerationTime
The time of last data generation.
protected DateTimeOffset LastGenerationTime { get; set; }
Property Value
MaxPriceStepCount
public int MaxPriceStepCount { get; set; }
Property Value
Remarks
The default value is 10.
MaxVolume
public int MaxVolume { get; set; }
Property Value
Remarks
The default value equals 20.
MinVolume
public int MinVolume { get; set; }
Property Value
Remarks
The default value is 1.
RandomArrayLength
The length of massive of preliminarily generated random numbers. The default is 100.
public int RandomArrayLength { get; set; }
Property Value
SecurityDefinition
Information about the trading instrument.
protected SecurityMessage SecurityDefinition { get; }
Property Value
SecurityId
The identifier of the instrument, for which data shall be generated.
public SecurityId SecurityId { get; }
Property Value
Steps
The massive of random price increments in the range from 1 to MaxPriceStepCount.
public RandomArray<int> Steps { get; protected set; }
Property Value
- RandomArray<int>
Volumes
public RandomArray<int> Volumes { get; protected set; }
Property Value
- RandomArray<int>
Methods
CopyTo(MarketDataGenerator)
Copy the message into the destination
.
protected void CopyTo(MarketDataGenerator destination)
Parameters
destination
MarketDataGeneratorThe object, to which copied information.
Init()
To initialize the generator state.
public virtual void Init()
IsTimeToGenerate(DateTimeOffset)
Is new data generation required.
protected bool IsTimeToGenerate(DateTimeOffset time)
Parameters
time
DateTimeOffsetThe current time.
Returns
OnProcess(Message)
Process message.
protected abstract Message OnProcess(Message message)
Parameters
message
MessageMessage.
Returns
- Message
The result of processing. If null is returned, then generator has no sufficient data to generate new message.
Process(Message)
Process message.
public virtual Message Process(Message message)
Parameters
message
MessageMessage.