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");
*******************************************
Function to get the barnumber or bartime of current cursor
-
- Posts: 14
- Joined: 25 Aug 2007
- Andrew Kirillov
- Posts: 1589
- Joined: 28 Jul 2005
- Has thanked: 2 times
- Been thanked: 31 times
- Contact: