- ago
Three questions related to StrategyRunner.

1. StrategyRunner.BacktestSettings - If no value is specified, will StrategyRunner use the user defined backtest preferences?



2. StrategyRunner.PositionSize - If no value is set, will StrategyRunner use the saved position size values of the strategy being backtested?



3. StrategyRunner Backtest Data - If no value is specified for dataset, scale, benchmark, etc, will StrategyRunner use the saved backtest data settings of the strategy being backtested?

0
168
Solved
2 Replies

Reply

Bookmark

Sort
Cone8
 ( 5.78% )
- ago
#2
BacktestSettings - yes, those come from the current instance.
For everything else, you should make those assignments so that you're not guessing, but it's easy to find the defaults -
CODE:
public override void Initialize(BarHistory bars) {          StrategyRunner sr = new();          //2. StrategyRunner.PositionSize - If no value is set, will StrategyRunner use the saved position size values of the strategy being backtested?          WriteToDebugLog($"{sr.PositionSize.ToString()}, Starting Cap: {sr.PositionSize.StartingCapital}");          //3. StrategyRunner Backtest Data - If no value is specified for dataset, scale, benchmark, etc, will StrategyRunner use the saved backtest data settings of the strategy being backtested?          if (sr?.Data is null)             WriteToDebugLog($"No data assigned");          else             WriteToDebugLog($"BarHistories loaded: {sr.Data.Count}");          }
1
Best Answer

Reply

Bookmark

Sort