DayOfWeek() function return wrong value

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #161746 quote
    dbl007
    Participant
    Junior

    The DayOfWeek() function return wrong value when the local time of the chart data is not UTC +00.

    I attached 2 example charts with local time that is UTC +08.  The instruments are Hangseng index and Xinhua index.  In the bottom of the chart I added an indicator to display DayOfWeek().

    From the datetime time line you can see the dayOfweek() retun value is out of sync with the date by 8 hours.

    For chart with local time UTC +00,  the DayOfWeek() is in sync with the date. See XBTUSD .

    Is this a bug?

    #161795 quote
    Nicolas
    Keymaster
    Master

    It uses the market time of the contract not your own custom hours.

    #183592 quote
    Monobrow
    Participant
    Senior

    Ok,

    Is there a way we can code around this? or just have to use market time? thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

DayOfWeek() function return wrong value


ProBuilder support

New Reply
Author
author-avatar
dbl007 @dbl007 Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by Monobrow
4 years, 1 month ago.

Topic Details
Forum: ProBuilder support
Language: English
Started: 02/17/2021
Status: Active
Attachments: 3 files
Logo Logo
Loading...