Problem currentBar is not correct  [SOLVED]

Questions about MultiCharts and user contributed studies.
turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 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.63 KiB) Downloaded 640 times
Immagine.png
(156.92 KiB) Downloaded 640 times

User avatar
Smoky
Posts: 507
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 97 times
Been thanked: 115 times

Re: Problem currentBar is not correct

Postby Smoky » 07 Apr 2018

Try Symbol_CurrentBar ...

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 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: 213
Joined: 11 May 2013
Has thanked: 67 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: 75
Joined: 06 Jan 2017
Has thanked: 9 times
Been thanked: 25 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: 213
Joined: 11 May 2013
Has thanked: 67 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”