SmartQuant Discussion
http://www.smartquant.com/forums/

future dates to find week ends
http://www.smartquant.com/forums/viewtopic.php?f=43&t=9105
Page 1 of 1

Author:  ads78 [ Thu May 05, 2011 12:38 am ]
Post subject:  future dates to find week ends

Hi,
I am trying to backtest a strategy that evaluates once a week. I am currently having it execute only on Friday but sometimes there will be a trading holiday on Friday. Is there any way to see the date of the next bar to detect whether it is in a subsequent week. I tried using the Bars variable but it seems that the current bar will be the last in the collection.

Thanks,
Andrew

Author:  Dr. Anton Fokin [ Thu May 05, 2011 7:57 am ]
Post subject:  Re: future dates to find week ends

Hi,

I think you can use DataManager.GetHistoricalBars(...) method for this. Alternatively, you can create a calendar, fill it with holidays and use in your strategy.

Regards,
Anton

Page 1 of 1 All times are UTC + 3 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/