DefaultRandomProvider

StockSharp.Algo.Testing

Default random provider using system Random.

实现: IRandomProvider

构造函数

DefaultRandomProvider()

Initializes a new instance with current time seed.

DefaultRandomProvider(int)

Initializes a new instance with specified seed.

seed
Random seed.

方法

NextSpreadStep(int) : int

Gets next spread step multiplier for order book generation.

maxSpreadSize
Maximum spread size from settings.

返回值: Spread step multiplier (1 to maxSpreadSize).

NextVolume() : decimal

Gets next random volume for synthetic order book generation.

返回值: Random volume.

ShouldFail(double) : bool

Determines whether operation should fail (for failure simulation).

failingPercent
Failing percentage from settings (0-100).

返回值: True if should fail.

ShouldMatch() : bool

Determines whether order should be matched when processing order book changes.

返回值: True if should match.