I few of us were discussing the performance of a recent strategy, and we realized the performance report and equity curve were starting on the first bar on the chart when we'd like it to start on the first bar we were able to trade on. For example, our strategy had a SMA(Close,200) indicator so we had to start the for loop on the 200th bar whereas performance measurements were based on the first bar. The buy and hold versus trades on the performance report would be a lot more meaningful if they started on the same bar.
Is there a way to specify the starting bar for performance measurement (in the strategy code preferred)? Or, is there a way to specify a pre-range (ex: 200 for our strategy) so the indicators are stabilized for the first bar in the test range? The latter would be the best solution in my opinion.
Size:
Color:
Size:
Color:
Thanks. I poked around looking for a similar post, but I missed that one.
Size:
Color:
Just an update to this old thread. The
GetAllDataForSymbol method in Community Components is the solution. Using this technique, you can create indicators that are valid from bar 0, and therefore can start the trading loop from bar 1.
Size:
Color: