IncludeTradeHistoryInBacktest
<< Click to Display Table of Contents >> IncludeTradeHistoryInBacktest |
Determines if the strategy will save orders, trades, and execution history. When this property is set to false you will see significant memory savings at the expense of having access to the detailed trading information.
Notes: •Since trade information is not stored you will only see entry/exit executions plotted on the chart with no connecting PnL trade lines. •This property is set to true by default when a strategy is applied to a chart. However, in any other window (Strategies tab, Strategy Analyzer), it will be set to false by default. If you are working with a strategy outside of a chart, and would like to save orders, trades, and execution history for reference in your code, you will need to set IncludeTradeHistoryInBacktest to true in your script. •During Strategy Analyzer Optimization in a 32-bit process, the IncludeTradeHistoryInBacktest property is forced to false due to the limited resources available in a 32-bit environment. You must use a 64-bit process if trade history is needed during optimization. |
This property returns true if the strategy will include trade history; otherwise, false. Default is set to true. Always false during a strategy analyzer optimization on a 32-bit process.
Warning: This property should ONLY bet set from the OnStateChange() method during State.SetDefaults or State.Configure |
IncludeTradeHistoryInBacktest
protected override void OnStateChange() |