I am working on a WL6 code that buys 52 week highs + uses other indicators. This means that I must set the strategy so that the trading loop does not start for 53 bars (i.e. to allow for indicators + lookback period for buying a 52 week high). I do this by using the following:
CODE:
Please log in to see this code.
The end result, however, is that the first year of data from the code is $0 as there are no trades but when I look at the portfolio simulation results the portfolio starts a year earlier, the performance results are averaged down by the year of missing data and the same for the profit distribution results.
To only work around this that I have found is that I have to manually average results to exclude the year of no data. Does anybody know a better way of addressing this issue? There is data in the files before the 52 week period but if I start the loop any earlier than a 53 week lookback period the code for buying the highs does not work for any subsequent years at all for that component.
Thanks in advance.
Jim
Size:
Color:
Size:
Color:
Thanks Eugene, I thought that might be the answer but still work asking the question.
Size:
Color:
Just an update to the old thread. Now there is an easy workaround (referred to in the same FAQ):
GetAllDataForSymbol
Size:
Color: