DAYOFWEEK delayed by one hour

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #177147 quote
    gfx
    Participant
    Average

    Hi,

    I added the DAYOFWEEK function in a money management routine;

    I was very surprised that it increases by one after 01:00 am.

    Though it is already Thursday 00:30 AM on the graphique, DAYOFWEEK  returns 3 as if it was based on UTC+1 whereas chart prices displays on UTC+2.

    Any solution ?

    Thks

    #177154 quote
    robertogozzi
    Moderator
    Master

    There’s no pic attached.

    In any case, DayOfWeek is the day of the week when a candle closes, while OpenDayOfWeek is the day of the week when a candle opens.

    On DAX, 1h, Thursday is returned when the 00:00 (Utc+2) candle closes (at 01:00).

    On DAX, 4h, Thursday is returned when the 21:00 (Utc+2) of the previous day candle closes (at 01:00 of the next day).

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

DAYOFWEEK delayed by one hour


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
gfx @gfx Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
4 years, 5 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/09/2021
Status: Active
Attachments: No files
Logo Logo
Loading...