CLOSE ONE YEAR BEFORE  [SOLVED]

Questions about MultiCharts and user contributed studies.
nuno-online
Posts: 174
Joined: 31 Jan 2006
Has thanked: 74 times
Been thanked: 5 times

CLOSE ONE YEAR BEFORE  [SOLVED]

Postby nuno-online » 30 Jun 2016

Hi
is there a function to know the close one year before?

ex today : 30 /06/2016 one year before 30/06/2015

thank you
Nuno

User avatar
Henry MultiСharts
Posts: 9066
Joined: 25 Aug 2011
Has thanked: 1256 times
Been thanked: 2911 times

Re: CLOSE ONE YEAR BEFORE

Postby Henry MultiСharts » 30 Jun 2016

Hello Nuno,

Do you want to know the price values of a bar with the same Day and Month but 1 year before current?
What is your chart resolution?

nuno-online
Posts: 174
Joined: 31 Jan 2006
Has thanked: 74 times
Been thanked: 5 times

Re: CLOSE ONE YEAR BEFORE

Postby nuno-online » 30 Jun 2016

yes, i want to know the price values of a bar with the same Day and Month but 1 year before current
This is a daily chart

User avatar
TJ
Posts: 7151
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 988 times
Been thanked: 2041 times

Re: CLOSE ONE YEAR BEFORE

Postby TJ » 30 Jun 2016

yes, i want to know the price values of a bar with the same Day and Month but 1 year before current
This is a daily chart

What if the day is a holiday or weekend?
Should it return "zero"?

nuno-online
Posts: 174
Joined: 31 Jan 2006
Has thanked: 74 times
Been thanked: 5 times

Re: CLOSE ONE YEAR BEFORE

Postby nuno-online » 30 Jun 2016

is it possible to have the day after 1 year if the day is a holiday?

is it much easy to have the close mini 365 days before?

User avatar
TJ
Posts: 7151
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 988 times
Been thanked: 2041 times

Re: CLOSE ONE YEAR BEFORE

Postby TJ » 30 Jun 2016

is it possible to have the day after 1 year if the day is a holiday?

is it much easy to have the close mini 365 days before?

What if that is a Saturday? and the day after is a Sunday?


In the case of a long weekend, the Monday is a holiday.
In the case of Easter, Friday, Saturday and Sunday are non-trading days.
For some markets, the Easter Monday is a day off as well.


You have to think your question through.



The easiest method is to estimate the number of trading days in a year.

eg if there are 250 trading days in a year,
then the close of 250 days prior would be:

Close[250]

nuno-online
Posts: 174
Joined: 31 Jan 2006
Has thanked: 74 times
Been thanked: 5 times

Re: CLOSE ONE YEAR BEFORE

Postby nuno-online » 30 Jun 2016

TJ
One year = 250 days so close[250] is the easiest solution
Thank you


Return to “MultiCharts”