Search Framework:
IStrategyHost
Namespace: WealthLab.Backtest
Parent:

The IStrategyHost interface allows Performance Visualizers and other components to communicate with their host Strategy window. It provides access to the Strategy and its Backtester instances, methods for navigating and charting results, running the Strategy with Parameter overrides, and information about the selected Broker and account.

Members
Backtester
Backtester Backtester

Returns the Backtester instance for the Strategy window.


BenchmarkBacktester
Backtester BenchmarkBacktester

Returns the Backtester instance that ran the buy and hold benchmark comparison for the Strategy window.


ChartPosition
void ChartPosition(Position pos)

Causes the Strategy window to display the chart containing the Position specified in pos and navigate to the position on the chart.


ChartSymbolAtBar
void ChartSymbolAtBar(string symbol, int idx)

Causes the Strategy window to display the chart for the specified symbol and scroll to the bar specified by idx.


ChartThisSymbol
void ChartThisSymbol(string symbol, DataSet ds)

Causes the Strategy window to chart the specified symbol, using the preferred DataSet specified in ds.


ParameterDefaultsChanged
void ParameterDefaultsChanged()

Informs the Strategy window that the Strategy Parameter defaults have changed, typically as the result of an Optimization Visualizer or another component modifying them.


RunWithOverrides
void RunWithOverrides(List<double> overrides, string symbol = null)

Causes the Strategy window to run a backtest using the Parameter override values specified in overrides. Optionally pass a symbol to run the Strategy for a specific symbol.


SaveParameterDefaults
void SaveParameterDefaults(List<double> paramValues)

Causes the Strategy window to save the Parameter values specified in paramValues as the defaults for the Strategy.


SelectedAccount
string SelectedAccount

Returns the account identifier currently selected in the Strategy window.


SelectedBroker
BrokerBase SelectedBroker

Returns the BrokerBase instance currently selected in the Strategy window.


ShowTabPage
void ShowTabPage(StrategyWindowTab tab)

Causes the Strategy window to switch to the tab page specified by tab.


Strategy
Strategy Strategy

Gets or sets the Strategy instance associated with the host Strategy window.


WriteToStatusBar
void WriteToStatusBar(string txt, WLColor color = null)

Writes the specified txt to the Strategy window's status bar. Optionally pass a color to control the color used to display the text.