Problem currentBar is not correct  [SOLVED]

Questions about MultiCharts and user contributed studies.
turbofib
Posts:184
Joined:11 May 2013
Has thanked: 56 times
Been thanked: 1 time
Problem currentBar is not correct

Postby turbofib » 07 Apr 2018

Hi, look this pics
I print CurrentBar in all bar chart but the BarNumber( is egual to currentBar) =1 does not correspond to the first bar of the day
Attachments
Immagine1.png
(10.63KiB)Downloaded 640 times
Immagine.png
(156.92KiB)Downloaded 640 times

User avatar
Smoky
Posts:435
Joined:03 Dec 2010
Location:Thailand
Has thanked: 69 times
Been thanked: 106 times

Re: Problem currentBar is not correct

Postby Smoky » 07 Apr 2018

Try Symbol_CurrentBar ...

User avatar
TJ
Posts:7354
Joined:29 Aug 2006
Location:Global Citizen
Has thanked: 993 times
Been thanked: 2100 times

Re: Problem currentBar is not correct

Postby TJ » 07 Apr 2018

Hi, look this pics
I print CurrentBar in all bar chart but the BarNumber( is egual to currentBar) =1 does not correspond to the first bar of the day

Have you looked up the definition of CurrentBar ?

It is in the wiki under

PowerLanguage Keyword Reference
> Data Information/General‎ (77 P)

turbofib
Posts:184
Joined:11 May 2013
Has thanked: 56 times
Been thanked: 1 time

Re: Problem currentBar is not correct

Postby turbofib » 07 Apr 2018

yes..i read it

I try to set MAx number of study will reference to 0
but it start to calcularte him from 8 currentBar....


i think the problem is that i must to start to 1 (not to 0)

MAZINGUER
Posts:57
Joined:06 Jan 2017
Has thanked: 5 times
Been thanked: 21 times

Re: Problem currentBar is not correct

Postby MAZINGUER » 07 Apr 2018

Hi turbofib.
Currentbar is the first bar on the left after the Maxbarsback. That is, if maxbarsback = 20, after 20 bars it will return the currentbar and it will be currentbar = 1 and it is the bar that is currently being evaluated.
It means that if Currentbar = 8, bar 8 is evaluated after the maxbarsback.
But I do not understand what you want to do ... do you want to refer to the first bar of the day?

turbofib
Posts:184
Joined:11 May 2013
Has thanked: 56 times
Been thanked: 1 time

Re: Problem currentBar is not correct  [SOLVED]

Postby turbofib » 07 Apr 2018

Okok..now i understand..thank


Return to “MultiCharts”