Is there a way to isolate the closing time trade time as a variable?
-
Hi all,
I was wondering if there was a way to isolate the closing time of a given market as a variable?
I am looking for this as I keep having issues with time filters when trading indices as a daily timeframe trader, especilaly when daylight saving comes into affect and messes up my entrytime for my algos.
Another rwason I am lookin for this is because I use multiple brokers and particularly for indices, the trading times close hours apart, even for the same asset. For example, the UK closes at 12Am servertime on 8CAP, and 11PM On ICMarkets.
This has an impact on my results from backtesting and so if anyone has any solutions I would really appreciate it
-
Can't help, I have previously tried to get this, but server time changes with daylight saving time.
-
Understood... Have you been able to come up with another solution? I have been using time filters and simply setting real life reminders when its near DST adjustment
I have thought about possibly using webrequest, like many here have done with news avoidance, as well as some sort of on timer function but all have been failed attempts
-
TimeDaylightSavings
Returns correction for daylight saving time in seconds, if the switch to summer time has been made. It depends on the time settings of your computer.int TimeDaylightSavings();
Return Value
If switch to winter (standard) time has been made, it returns 0.
Doesn't work on back test though, have never tried it but will possibly help.