Difference Year and CurrentYear
Forums › ProRealTime foro Español › Soporte ProBuilder › Difference Year and CurrentYear
- This topic has 5 replies, 2 voices, and was last updated 3 years ago by robertogozzi.
-
-
05/21/2021 at 4:27 PM #170132
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!
05/21/2021 at 4:37 PM #17013505/21/2021 at 4:37 PM #17013705/21/2021 at 4:47 PM #170143When 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,…
05/24/2021 at 8:55 AM #170228When 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.”
https://www.prorealcode.com/documentation/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).”
https://www.prorealcode.com/documentation/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…
05/24/2021 at 10:56 AM #170246Do 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:
1RETURN 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.
-
AuthorPosts