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
BarNumber AND currentbar avalaibles?
-
- Posts: 174
- Joined: 31 Jan 2006
- Has thanked: 74 times
- Been thanked: 5 times
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007
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.
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.
-
- Posts: 174
- Joined: 31 Jan 2006
- Has thanked: 74 times
- Been thanked: 5 times
where can i modify maxbarsback
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
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
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007