Problem currentBar is not correct  [SOLVED]

Questions about MultiCharts and user contributed studies.
turbofib
Posts: 164
Joined: 11 May 2013
Has thanked: 48 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: 419
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 68 times
Been thanked: 105 times

Re: Problem currentBar is not correct

Postby Smoky » 07 Apr 2018

Try Symbol_CurrentBar ...

User avatar
TJ
Posts: 7250
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 991 times
Been thanked: 2058 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: 164
Joined: 11 May 2013
Has thanked: 48 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: 164
Joined: 11 May 2013
Has thanked: 48 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”