Parent: Object
Contains the information saved from an optimization run.
Use the appropriate constructor to instantiate an instance based on a standard or a WFO optimization.
Returns a new instance from an encoded string that was the result of calling an instance's Persist method.
using WealthLab.Backtest; using System; using WealthLab.Core; using WealthLab.Data; using WealthLab.Indicators; using System.Collections.Generic; using System.IO; namespace WealthScript1 { public class MyStrategy : UserStrategyBase { public override void Initialize(BarHistory bars) { //load a saved optimization results file string dir = Path.Join(WLHost.Instance.DataFolder, "SavedOptimizations"); string[] files = Directory.GetFiles(dir, "*.WL8Opt"); if (files.Length > 0) { string fileName = files[0]; string s = File.ReadAllText(fileName); SavedOptimizationResults sor = SavedOptimizationResults.Parse(s); WriteToDebugLog("Saved Optimization File has " + sor.Results.Count + " results."); } } public override void Execute(BarHistory bars, int idx) { } } }
Returns a string that contains the instance's information in an encoded format that can be reconstituted by calling Parse.
Returns the backtest settings used during the optimization's backtest runs.
The benchmark symbol that was used during the optimization's backtest runs.
Returns the data range used during the optimization's backtest runs.
If SingleSymbol is false, indicates the name of the DataSet that was used for the backtests.
Indicates whether the saved run was a completed, as opposed to a paused, optimization.
The OptimizerBase derived instance, indicates which optimization method was used.
The parameters that were used for the Optimizer instance.
The position sizing that was used during the optimization's backtest runs.
If RunType was Standard or WFO, returns an OptimizationResultList instance that contains the optimization results.
Indicates the type of optimization results, Standard, WFO, or SymbolBySymbol.
Returns the data scale used during the optimization's backtest runs.
Indicates whether single symbol or DataSet (portfolio) backtests were used during the optimization.
If SingleSymbol was true, indicates which symbol was used for the backtests.
If the RunType was SymbolBySymbol, contains each symbol's OptimizationResultList results in a Dictionary keyed by symbol.
The WFOOptimizer instance used if the optimization was WFO.