Can read the first date displayed on my screen?

is there a example of how to do this

no way to edit or delete the post?? what i really need is to read the barcount +the date of the first plot on my screen

Hello Nick
Yes you have to use

FirstVisibleBar = Status( "FirstVisibleBar" );
Lastvisiblebar = Status( "LastVisibleBar" );

below link has a ready made example.
http://www.amibroker.org/userkb/index.php?s=BAR+LABELING

@nickhere,

Why don’t you take your time to precisely formulate your post?
You are leaving too much room for guessing.

Your 1st post made somewhat sense.
Your 2nd not so much.

What do you mean by barcount of first plot in 2nd post? What is meant by first plot?
Do you mean the barcount of the visible chart area or first (total) bar index of visible chart area?

What is meant by date of first plot mentioned in 2nd post?
In 1st post you ask for first date displayed. Now in 2nd post it suddenly is date of first plot?
What’s next?

That’s why please re-read my first sentence again.

Seriously, you want people to take time for you giving proper hints or even solutions but IMHO you don’t really take your time to make proper post making sense to readers.

First visible date is this (answer to 1st post)

dt = DateTime();
fvdt = FirstVisibleValue( dt );
printf( "First Visible Date: %s", DateTimeToStr( fvdt ) );

Now I guess (and it is only a guess since you are not very clear in 2nd post) you may be looking for first visible total bar(index).
If so then use this:

bi = BarIndex();
fvbi = FirstVisibleValue( bi );
qfdb = Status( "quickaflfirstdatabar" );
printf( "\nQuickAFL first visible barindex: %g idx", qfdb + fvbi );

If you are looking for visible barcount (no blank right margin included)

bi = BarIndex();
fvbi = FirstVisibleValue( bi );
lvbi = LastVisibleValue( bi );
printf( "\nVisible BarCount: %g bars", lvbi-fvbi+1 );

Or whatever you are looking for…

2 Likes

I been working on that. I think way faster then I type and never get my ideas across properly