BarNumber AND currentbar avalaibles?

Questions about MultiCharts and user contributed studies.
nuno-online
Posts: 166
Joined: 31 Jan 2006
Has thanked: 72 times
Been thanked: 3 times

BarNumber AND currentbar avalaibles?

Postby nuno-online » 26 Apr 2008

hi,

are the functions Barnumber and currently avalaible?

for example, in a chart
with this INDICATOR:
Value1 = BarNumber;
Plot1(Value1, "BarNum");

for the date 10/01/2001 i have Value1=1 instead of BarNumber=7
Attachments
BARNUMBER.png
BARNUMBER.png (29.4 KiB) Viewed 153 times

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 29 Apr 2008

Hi,

Please see an excerpt from our help file below. If after reading it you still have questions, I will be happy to answer them.

The BarNumber function is similar to the reserved word CurrentBar. However, CurrentBar does not allow previous bar references: BarNumber[5](of five bars ago) is correct, however, Currentbar[5] is incorrect and does not work.
---
Since BarNumber is based on MaxBarsBack, if there are 500 bars in a chart, with a MaxBarsBack setting of 50, the next bar after the 50th bar on the chart moving left to right, will be BarNumber = 1. The last bar on the chart (most recent) will be BarNumber = 451.

nuno-online
Posts: 166
Joined: 31 Jan 2006
Has thanked: 72 times
Been thanked: 3 times

where can i modify maxbarsback

Postby nuno-online » 30 Apr 2008

oK WITH YOU HELP FILE

But where can i modify maxbarsback ?
when i print this , i have maxbarsback = 1218
i had never choose this value
In "Max number of bars study will reference" , "Auto-detect" is checked

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 06 May 2008

Hi nuno-online,

If you have the auto-detect funtion for Max Number of Bars the Study will Reference enabled, the program defines the necessary number of bars itself.

If you want to change this number, you would need enable the option 'User Specified' first.


Return to “MultiCharts”