IsDaylightSavingTime

Created at 29 Oct 2017, 12:31
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
DA

daniloscipioni

Joined 08.10.2017

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


@daniloscipioni
Replies

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

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