DATE statement returns WRONG VALUE in MONTHLY Timeframe

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #161725 quote
    robocop
    Participant
    Average

    since a few days 2021/02/16 DATE statement returns wrong value in MONTHLY Timeframe.

    DAY statements must return the last day of the candle (timeframe Weekly the date of friday, in Monthly the date of the last working day of the month).
    but its’ a few day that DAY statement returns random date in monthly statement, sometime first date of the month, sometime first day of the next month, sometime the right date.

    #161729 quote
    robertogozzi
    Moderator
    Master

    DATE returns the date when the candle closes (OpenMonth when it opens, instead).

    So when the monthly candle closes it returns:

    • the first day of the new month if it’s a trading day
    • the current date if the next day is NOT a trading day
    • the current date LIVE

    You can add this indicator to your Monthly chart to spot differences:

    return date AS "Date",opendate AS "OpenDate"
    #161764 quote
    Robocop2
    Participant
    New

    Good Morning RobertoGozzi,

    I don’t agree with you, we use DATE in indicator since a year, an DATE always returned the very last working day of the candle.
    DATE change his behavior, it’s a few day, we noticed it yesterday, that

    In my opinion, the behaviour you write is not rational: for example, a MONTHLY candle for Ita 40 MIB november 2020, close at 17.30 on the evening of 2020/11/30, not on 2020/12/01.

    we expect that in this scenario, DATE returns 2020/11/30, CLOSE return the fixing value registered at close auction end at 17:30 on 2020/11/30 (and in opposition, OPENDATE retursn 2020/11/02 first working date for november and OPEN returns the open value registered at 9:00 on 2020/11/02).

    I attach an image that show wrong values returned (see image that show errors and incosistencies) and the simple code use to show it.

     

    workdate = date
    mesegiorno = workdate mod 10000
    
    drawtext("MMGG:#mesegiorno#" ,barindex,low-100)
    
    e = OpenDay
    k = OpenMonth
    
    drawtext("OpenDay:#e# OpenMonth:#k#",barindex,high+100)
    
    return
    

     

     


    FTSEMIB-Mensile_1.png FTSEMIB-Mensile_1.png
    #161769 quote
    Nicolas
    Keymaster
    Master

    Indeed, this date problem exists but only with a short list of instruments. It is about to be fixed.

    #161770 quote
    robertogozzi
    Moderator
    Master

    MIB does NOT closes at 17:30.

    It’s IG’s CFD, you can trade it continuously. it’s the broker’s decision when trading stops and when a candle closes.

    #161771 quote
    robertogozzi
    Moderator
    Master

    Ok, sorry, I did not know that.

    #161784 quote
    Robocop2
    Participant
    New

    Indeed, this date problem exists but only with a short list of instruments. It is about to be fixed.


    @Nicolas
    : i have found this date issue in a lof of instruments, not a few.


    @RobertoGozzi
    : INDEX ITA official market, that i use to example, is open MON-FRY from 9:00 AM to 5:30 PM.
    We USE NOT IG DATA, BUT OFFICIAL DATA. OFFICIAL DATA IS OFFICIAL DATA.

    @all: i expect that all of us agree that CLOSE DATE, in official data market, MUST IS the date-time of the last exchange on official market, not the date of next working date!

    in my example, candle of n0vember 2020 time frame monthly, DATE MUST return “20201130” and CLOSE MUST return the official close rate of the instrument at 20201130 at 17:30 (if the official market close at 17:30), as is been for a long time.

    #161786 quote
    Nicolas
    Keymaster
    Master

    Yes I should not have used “short” but “limited” 🙂

    It is about some index Futures and NYSE shares, as far as i know.

    #161788 quote
    Robocop2
    Participant
    New

    Yes I should not have used “short” but “limited” 🙂

    It is about some index Futures and NYSE shares, as far as i know.

    European markets (index and share) too.
    Do you have a time to fix it?
    Do you know a workaround to discover the last working day in a month, while PRT resolve issue?

    #161798 quote
    Nicolas
    Keymaster
    Master
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.

DATE statement returns WRONG VALUE in MONTHLY Timeframe


Platform Support: Charts, Data & Broker Setup

New Reply
Author
author-avatar
robocop @robocop Participant
Summary

This topic contains 9 replies,
has 4 voices, and was last updated by Nicolas
4 years, 12 months ago.

Topic Details
Forum: Platform Support: Charts, Data & Broker Setup
Language: English
Started: 02/16/2021
Status: Active
Attachments: 1 files
Logo Logo
Loading...