Reading the last bar BarNumber: How to  [SOLVED]

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Reading the last bar BarNumber: How to

Postby arjfca » 13 Aug 2014

Hello

I'm trying to get in a variable the value of the last bar bar number. to do so, I do

Code: Select all

If LastBarOnChart_s then BarNumberOfTheLastBar = BarNumber;
I don't get the proper value

Martin

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Reading the last bar BarNumber: How to  [SOLVED]

Postby TJ » 13 Aug 2014

Hello

I'm trying to get in a variable the value of the last bar bar number. to do so, I do

Code: Select all

If LastBarOnChart_s then BarNumberOfTheLastBar = BarNumber;
I don't get the proper value

Martin
How's is that wrong?

Did you add on the MaxBarsBack ?

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Reading the last bar BarNumber: How to

Postby arjfca » 13 Aug 2014

Hello

I'm trying to get in a variable the value of the last bar bar number. to do so, I do

Code: Select all

If LastBarOnChart_s then BarNumberOfTheLastBar = BarNumber;
I don't get the proper value

Martin
How's is that wrong?

Did you add on the MaxBarsBack ?
Hello again TJ

MaxBarsBack was the solution
Another Montreal Smoke Meat Sandwich for you...

Unfortunately, MouseClickBarNumber does only returned the value of the Last bar number on the chart for a click on the right free margin on the chart. So my idea was worthless.

Martin


Return to “MultiCharts”