Wednesday, April 30, 2014

thinkscript included: sdi_seasonalstgy rev: 1.0.1 released



previously sdi_seasonalstgy held the sim-trade 1 bar too long. this is corrected.

previously sdi_seasonalstgy would not initiate a sim-trade on first bar of the chart. it is typical that an n-year chart commences on the trigger bar and, because tos strategies always simulate trading on the next bar after a trigger, this meant that a potential data point was lost. now, if bar #1 is a trigger then sdi_seasonalstgy will add the sim-trade on bar #2 but with bar#1's closing price and the exit sim-trade will occur wrt bar#1.

previously sdi_seasonalstgy would not initiate a sim-trade before the first new-year on the chart. this resulted in a loss of a data point in an already small data-set. now sdi_seasonalstgy uses the countTradingDays function to calculate the trading day number of the year. most notably this will account for the missing trading days in some years such as 2012 when the market was closed for two days because of hurricane sandy. consequently, when the trading days corresponding to october 29 and 30 become the target of this strategy sim-trades for 2012 will not be initiated.

as always the updated revision is maintained on the original release page here.

No comments:

Post a Comment