Having troubles with the strategy analyzer backtest type optimization eating up all my memory, often stalling at 99% physical memory, and not releasing RAM once reached the upper 90% memory level.
One way to partly work around this issue is deactivating parts of the code not required for optimization purposes, but required for live trading and the backtest type standard mode. These are among others:
- AddChartIndicator()
- Draw.Text()
- ChartIndicators[0].Plots[0].Brush
Is there a way to detect (like if (State == State.Configure) if the strategy is running in live trading, backtest Standard or backtest Optimization mode, to switch parts of the code on or off?
Comment