Function to get the barnumber or bartime of current cursor

Questions about MultiCharts and user contributed studies.
Chi-Yuan Shih
Posts: 14
Joined: 25 Aug 2007

Function to get the barnumber or bartime of current cursor

Postby Chi-Yuan Shih » 20 Feb 2008

If there is a funtion which can get the value of the barnumber or bartime of current cursor position, then we can plot the indicators according to the cursor position. With this function we can playback the indicator just by moving the cursor back and forth on the chart.

This is the simplest way to do playback. It can also be convenient to write a playback version of indicator with which we can observe the indicator's past behavior by moving the cursor back.

Will Multichart offer this function ?

For example:
If I want to mark the Bar 20 days ago from current cursor position,
The code may look like :
BarNo_Cursor = GetCurrentCursorBarNo; [The function needed :) ]

PlotPosition = (CurrentBar - BarNo_Cursor) + 20;

Plot[PlotPosition](Low[PlotPosition]-5,"20 Ago");

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times

Postby Andrew Kirillov » 20 Feb 2008

Chi-Yuan Shih,
We see your point. Unfortunately it is not as simple as it could look at first glance. However we are considering what could be done.

Return to “MultiCharts”