The reason to do this, is to debug visally,
I always need to stare on over 100 thsands bars
to seek to a specified Date
(actually this behavior cost time and eyes) to find some
PlotText or PlotShapes (or manually drawing studies or comments).
Below is my imagination for this function:
Like Microsoft Word, provides Edit > go to page, but select a date.
Let user do it with three steps: step1: user use mouse to switch to daily-timeframe manually.
(now AmiBroker remember this date automatically) step2: user use mouse to seek to a specified date, step3: user use mouse to switch back to current-timeframe manually again.
Is there a quick way to seek to a specified date?
(or please consider to provide this function on future versions)
Using DateTimeConvert(), you'll be able to play around with any format of Date and Time;
Using GetCursorXPosition() / GetCursorYPosition() and by storing its value to a StaticVar, you'll be able to capture information of a bar from the mouse pointer.
What I need is like Microsoft Word go to a specified page.
(I want to go to a specified date on chart window)
If let you write a C# or VB program,
what would you do when your homework
is to specified a date then go to the date to see
the first bar of your selected date (ex. 2019/11/06)
to be shown on the left-end of your chart window?
Maybe you would like to use a 'DateTimePicker'
as your date selector object, so after you choose a date
with this 'DateTimePicker'...
Thank you @Milosz,
code provided by @fxshrat is good when not much bars on you chart.
it execute the SetBarsRequired( -2, -2 );
and call the OLE, so let my chart become very very slow
(I've got over 100 thousands bars)
There is 'Go to a date' similar function
already works for a very long time in AmiBroker,
that is 'Show current trade arrows' for your trade list.
I think that developer is too busy
to migrate this function to the chart window,
'Go to a date', for example 'Go to 2019/11/07',
such function provides much more convenient for user
to go to a specified date among big amount of bars.