logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
fiorenzo  
#1 Posted : Monday, November 9, 2020 1:49:59 PM(UTC)
fiorenzo

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 2/21/2005(UTC)
Posts: 44
Location: Genoa (Italy)

Thanks: 2 times
Was thanked: 3 time(s) in 3 post(s)

Hello. Is there a formula which counts the bars since the beginning of the year?

Not since the beginning of the data on the chart loaded, just of the year! I expect it to go back to 1 on the first trading session of the new year and increase + 1 for every trading session.

Thank you for your help.

F.

MS Support  
#2 Posted : Tuesday, November 10, 2020 3:15:54 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,929

Thanks: 85 times
Was thanked: 154 time(s) in 150 post(s)
Originally Posted by: fiorenzo Go to Quoted Post

Hello. Is there a formula which counts the bars since the beginning of the year?

Not since the beginning of the data on the chart loaded, just of the year! I expect it to go back to 1 on the first trading session of the new year and increase + 1 for every trading session.

Thank you for your help.

F.

Hi,

You might try the following formula to see if it gets what you are looking for:

Code:
BarsSince(ROC(Year(),1,$)<>0)

thanks 1 user thanked MS Support for this useful post.
fiorenzo on 11/10/2020(UTC)
fiorenzo  
#3 Posted : Tuesday, November 10, 2020 4:01:50 PM(UTC)
fiorenzo

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 2/21/2005(UTC)
Posts: 44
Location: Genoa (Italy)

Thanks: 2 times
Was thanked: 3 time(s) in 3 post(s)
You got it! :) Perfect. Thanks!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.