IsDaylightSavingTime
IsDaylightSavingTime
29 Oct 2017, 12:31
Good morning everybody,
can someone suggest how to use the property IsDaylightSavingTime in order to know in backtest if we are within a daylight saving time period or not?
Thanks in advance.
Danilo
Replies
daniloscipioni
02 Nov 2017, 12:46
Hi Panagiotis,
thanks a lot for replying.
My intention was to have a bit more control in my backtest. For instance, when the bot makes a market order at 9:00 in summer days, it will do the same in winter, but at 10:00. I tried to use this boolean function but without success. Now I believe I solved the problem by using TimeZone = TimeZones.WEuropeStandardTime. It seems to work fine.
Thanks again, have a good day.
Danilo
@daniloscipioni
PanagiotisCharalampous
01 Nov 2017, 09:55
Hi Danilo,
IsDaylightSavingTime is just a boolean function that returns true if the time in within a daylight saving time period and false if it is not. But it is not very clear to me how you would like to exploit this information in backtesting. Could you please elaborate a bit more on your question? Is there a specific problem you would like to solve?
Best Regards,
Panagiotis
@PanagiotisCharalampous