Difference Year and CurrentYear

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #170132 quote
    prtdbdbprtdbdb
    Participant
    New

    Hi there!

    I thought that the CurrentYear gives the PRESENT dat year (2021 right now), but it doesn’t, it gives me the exact same result as Year, so… what is supposed to be the difference?

    I attach a capture that shows that it gives the same result. It happens the same with every Current*** variable.

    Thanks in advance!

    captura.png captura.png
    #170135 quote
    prtdbdbprtdbdb
    Participant
    New

    This are two captures, the first one is from the Manual, and the next one is the same test I did on my machine.

    Why is it different??

    Thank you very much for the confussion ProBuilder…

    captura3.png captura3.png
    #170137 quote
    prtdbdbprtdbdb
    Participant
    New

    I couldnt upload 2 pics in the same post, here is the 2nd one (the one with MY test)!

    captura2.png captura2.png
    #170143 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    When you deal with YEAR, MONTH, DAY, DAYOFWEEK,TIME,… it’s that when a bar CLOSES.

    When you deal with OPENYEAR, OPENMONTH, OPENDAY, OPENDAYOFWEEK, OPENTIME,… it’s that when a bar OPENS.

    CURRENT is an optional prefix for YEAR, MONTH, DAY, DAYOFWEEK,TIME,…

    #170228 quote
    prtdbdbprtdbdb
    Participant
    New

    When you deal with YEAR, MONTH, DAY, DAYOFWEEK,TIME,… it’s that when a bar CLOSES.

    When you deal with OPENYEAR, OPENMONTH, OPENDAY, OPENDAYOFWEEK, OPENTIME,… it’s that when a bar OPENS.

    CURRENT is an optional prefix for YEAR, MONTH, DAY, DAYOFWEEK,TIME,…

    Open or close is irrelevant.

    Current is supposed to return “Get the current time in HHMMSS format.”

    CurrentTime

    Whilst time is supposed to return “Represents the time of each bar loaded in the chart (24h format). Value may be divided by 10.000 to get the human reading : 131.500 / 10.000 = 13:15 (example of a N bar selected on the 15 minutes timeframe).”

    TIME

    Therefore, time is supposed to return the time on each bar and currenttime the present time, independent on the bar we are on, but this doesnt work as expected…

    #170246 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    @prtdbdb

    Do not use quote when not needed, as it makes posts longer and more difficult to read. It’s just the two of us.

    To better know what those keywords return you may add this indicator to your chart:

    RETURN Time AS "Time",OpenTime AS "OpenTime",CurrentTime AS "CurrentTime"

    In case of discrepancies between the returned values and documentation you should hit Ctrl+M to open a ticket with the Assistance, as I cannot deal that issue.

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Difference Year and CurrentYear


ProBuilder: Indicadores y Herramientas

New Reply
Author
author-avatar
prtdbdb @prtdbdb Participant
Summary

This topic contains 5 replies,
has 2 voices, and was last updated by robertogozzirobertogozzi
5 years, 5 months ago.

Topic Details
Forum: ProBuilder: Indicadores y Herramientas
Language: Spanish
Started: 05/21/2021
Status: Active
Attachments: 3 files
ProRealCode ProRealCode
Loading...