Click or drag to resize

StrategyHelperLoadState Method

To restore the strategy state.

Namespace:  StockSharp.Algo.Strategies
Assembly:  StockSharp.Algo (in StockSharp.Algo.dll) Version: 4.4.16.0 (4.4.16)
Syntax
C#
public static void LoadState(
	this Strategy strategy,
	SettingsStorage storage
)

Parameters

strategy
Type: StockSharp.Algo.StrategiesStrategy
Strategy.
storage
Type: SettingsStorage
Market data storage.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Strategy. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
This method is used to load statistics, orders and trades. The data storage shall include the following parameters: 1. Settings (SettingsStorage) - statistics settings. 2. Statistics(SettingsStorage) - saved state of statistics. 3. Orders (IDictionary[Order, IEnumerable[MyTrade]]) - orders and corresponding trades. 4. Positions (IEnumerable[Position]) - strategy positions. If any of the parameters is missing, data will not be restored.
See Also