Class BruteForceOptimizer
- Namespace
- StockSharp.Algo.Strategies.Optimization
- Assembly
- StockSharp.Algo.dll
The brute force optimizer of strategies.
public class BruteForceOptimizer : BaseOptimizer, IPersistable, ILogReceiver, ILogSource, IDisposable
- Inheritance
-
BruteForceOptimizer
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
BruteForceOptimizer(ISecurityProvider, IPortfolioProvider, IStorageRegistry)
Initializes a new instance of the BruteForceOptimizer.
public BruteForceOptimizer(ISecurityProvider securityProvider, IPortfolioProvider portfolioProvider, IStorageRegistry storageRegistry)
Parameters
securityProviderISecurityProviderThe provider of information about instruments.
portfolioProviderIPortfolioProviderThe portfolio to be used to register orders. If value is not given, the portfolio with default name Simulator will be created.
storageRegistryIStorageRegistryMarket data storage.
BruteForceOptimizer(ISecurityProvider, IPortfolioProvider, IExchangeInfoProvider, IStorageRegistry, StorageFormats, IMarketDataDrive)
Initializes a new instance of the BruteForceOptimizer.
public BruteForceOptimizer(ISecurityProvider securityProvider, IPortfolioProvider portfolioProvider, IExchangeInfoProvider exchangeInfoProvider, IStorageRegistry storageRegistry, StorageFormats storageFormat = StorageFormats.Binary, IMarketDataDrive drive = null)
Parameters
securityProviderISecurityProviderThe provider of information about instruments.
portfolioProviderIPortfolioProviderThe portfolio to be used to register orders. If value is not given, the portfolio with default name Simulator will be created.
exchangeInfoProviderIExchangeInfoProviderExchanges and trading boards provider.
storageRegistryIStorageRegistryMarket data storage.
storageFormatStorageFormatsThe format of market data. Binary is used by default.
driveIMarketDataDriveThe storage which is used by default. By default, DefaultDrive is used.
BruteForceOptimizer(IEnumerable<Security>, IEnumerable<Portfolio>, IStorageRegistry)
Initializes a new instance of the BruteForceOptimizer.
public BruteForceOptimizer(IEnumerable<Security> securities, IEnumerable<Portfolio> portfolios, IStorageRegistry storageRegistry)
Parameters
securitiesIEnumerable<Security>Instruments, the operation will be performed with.
portfoliosIEnumerable<Portfolio>Portfolios, the operation will be performed with.
storageRegistryIStorageRegistryMarket data storage.
Methods
GetProgress()
Get progress value. 0..100 or null if progress is unknown.
protected override int? GetProgress()
Returns
- int?
Operation result.
Start(DateTime, DateTime, IEnumerable<(Strategy strategy, IStrategyParam[] parameters)>, int)
Start optimization.
public void Start(DateTime startTime, DateTime stopTime, IEnumerable<(Strategy strategy, IStrategyParam[] parameters)> strategies, int iterationCount)
Parameters
startTimeDateTimeDate in history for starting the paper trading.
stopTimeDateTimeDate in history to stop the paper trading (date is included).
strategiesIEnumerable<(Strategy strategy, IStrategyParam[] parameters)>The strategies and parameters used for optimization.
iterationCountintIteration count.
Start(DateTime, DateTime, Func<IPortfolioProvider, (Strategy strategy, IStrategyParam[] parameters)?>, int)
Start optimization.
public void Start(DateTime startTime, DateTime stopTime, Func<IPortfolioProvider, (Strategy strategy, IStrategyParam[] parameters)?> tryGetNext, int iterationCount)
Parameters
startTimeDateTimeDate in history for starting the paper trading.
stopTimeDateTimeDate in history to stop the paper trading (date is included).
tryGetNextFunc<IPortfolioProvider, (Strategy strategy, IStrategyParam[] parameters)?>Handler to try to get next strategy object.
iterationCountintIteration count.