How to get DateTime offset specified in cTrader desktop chart?
How to get DateTime offset specified in cTrader desktop chart?
24 Feb 2020, 05:32
HI all:
While I can obtain the Server time offset, and the local computer's datetime offset, is it possible to obtain the datetime offset the user has specified looking at their charts? If so, how?
For example, my local computer's time might be UTC - 5, but the chart displayed in cTrader desktop is set for UTC + 8.
Thank you.
Replies
firemyst
24 Feb 2020, 10:12
RE:
PanagiotisCharalampous said:
Hi firemyst,
Here it is.
Best Regards,
Panagiotis
Thanks @Panagiotis!
For anyone looking for a code sample, this will return the time as specified on the chart regardless of local user's computer's timezone:
DateTime.UtcNow + Application.UserTimeOffset
@firemyst
trading.ternet
10 Sep 2020, 12:08
RE: RE:
firemyst said:
PanagiotisCharalampous said:
Hi firemyst,
Here it is.
Best Regards,
Panagiotis
Thanks @Panagiotis!
For anyone looking for a code sample, this will return the time as specified on the chart regardless of local user's computer's timezone:
DateTime.UtcNow + Application.UserTimeOffset
Hi,
I am a newbie in cAlgo,
many thanks for informations.
But I don't understand how I can get hour value from UserTimeOffset (to use in a Bot Time filter for example)Many thanks for help
Michel
@trading.ternet
trading.ternet
10 Sep 2020, 12:30
RE: RE: RE:
trading.ternet said:
firemyst said:
PanagiotisCharalampous said:
Hi firemyst,
Here it is.
Best Regards,
Panagiotis
Thanks @Panagiotis!
For anyone looking for a code sample, this will return the time as specified on the chart regardless of local user's computer's timezone:
DateTime.UtcNow + Application.UserTimeOffset
Hi,
I am a newbie in cAlgo,
many thanks for informations.
But I don't understand how I can get hour value from UserTimeOffset (to use in a Bot Time filter for example)Many thanks for help
MichelOh sorry
I have found
Thank you
@trading.ternet
PanagiotisCharalampous
24 Feb 2020, 09:23
Hi firemyst,
Here it is.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous