How to get the barnumber of the first displayed bar on the screen  [SOLVED]

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1283
Joined: 23 Nov 2010
Has thanked: 724 times
Been thanked: 222 times

How to get the barnumber of the first displayed bar on the screen

Postby arjfca » 25 Apr 2017

Hello

Is there a way to know what is the BarNumber of the first bar displayed (visible) on the screen?
I want to evenly space info on an horizontal line across my chart. I can't use a date/time reference because it won't be applicable to a tick charts

Martin

User avatar
TJ
Posts: 7158
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 988 times
Been thanked: 2042 times

Re: How to get the barnumber of the first displayed bar on the screen

Postby TJ » 25 Apr 2017

Hello

Is there a way to know what is the BarNumber of the first bar displayed (visible) on the screen?
I want to evenly space info on an horizontal line across my chart. I can't use a date/time reference because it won't be applicable to a tick charts

Martin

What do you mean by "evenly space info on an horizontal line across my chart."?

arjfca
Posts: 1283
Joined: 23 Nov 2010
Has thanked: 724 times
Been thanked: 222 times

Re: How to get the barnumber of the first displayed bar on the screen

Postby arjfca » 25 Apr 2017

See the picture. Manually draw what I'm looking to do
Horizontal menu.png
Horizontal menu.png (82.93 KiB) Viewed 792 times

maxmax68
Posts: 160
Joined: 20 Nov 2012
Has thanked: 52 times
Been thanked: 47 times

Re: How to get the barnumber of the first displayed bar on the screen

Postby maxmax68 » 25 Apr 2017

Hello arjfca,
please vote for this feature request.

https://www.multicharts.com/pm/public/m ... es/MC-2218

In my opinion the possibility to draw boxes at fixed pixels is far more easier than using barnumber or datetime !!!

In next release of Multicharts it would be nice to have x and y pixels coordinates to draw in every chart.

I invite every user that draws text boxes in his signals to vote for this feature request.

Best regards.

Massimo

User avatar
TJ
Posts: 7158
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 988 times
Been thanked: 2042 times

Re: How to get the barnumber of the first displayed bar on the screen  [SOLVED]

Postby TJ » 26 Apr 2017

Hello

Is there a way to know what is the BarNumber of the first bar displayed (visible) on the screen?
I want to evenly space info on an horizontal line across my chart. I can't use a date/time reference because it won't be applicable to a tick charts

Martin
Please create a Project Management request to add

aiLeftDispBarNumber

to the GetAppInfo keyword

https://www.multicharts.com/trading-sof ... GetAppInfo

arjfca
Posts: 1283
Joined: 23 Nov 2010
Has thanked: 724 times
Been thanked: 222 times

Re: How to get the barnumber of the first displayed bar on the screen

Postby arjfca » 27 Apr 2017

Hello

Is there a way to know what is the BarNumber of the first bar displayed (visible) on the screen?
I want to evenly space info on an horizontal line across my chart. I can't use a date/time reference because it won't be applicable to a tick charts

Martin
Please create a Project Management request to add

aiLeftDispBarNumber

to the GetAppInfo keyword

https://www.multicharts.com/trading-sof ... GetAppInfo
Done
https://www.multicharts.com/pm/public/m ... es/MC-2220

Martin

User avatar
ABC
Posts: 626
Joined: 16 Dec 2006
Has thanked: 119 times
Been thanked: 355 times
Contact:

Re: How to get the barnumber of the first displayed bar on the screen

Postby ABC » 27 Apr 2017

Hi Martin,

you could get the bar number with a workaround. Draw a text at aiLeftDispDateTime and ask for its bar number.

Code: Select all

txtID = Text_New_DT( getappinfo( aiLeftDispDateTime ), 0, "" ) ;

Print( DateTimeToString( getappinfo( aiLeftDispDateTime ) ), "; Bar Number = ", text_getbarnumber( txtID ), "; CurrentBar = ", CurrentBar ) ;
Regards,
ABC


Return to “MultiCharts”