Page 1 of 1

position visible range and cursor via c#

Posted: Mar 10 2013
by riverTrader
Is it possible to specify the following via code?

1.) the primary instrument on the chart
1.a) the startDate & endDate of the primary instrument data for a chart
2.)the visible range of a chart (the time period the user sees on the chart)
3.)the location of the cursor on a chart

I need to be able to get the values from a trade (date, time, instrument) and show the user the location of the trade on a chart. It seems like I ought to be able to do this without manually bringing up the chart and moving to the location.

tia.

Re: position visible range and cursor via c#

Posted: Mar 11 2013
by Henry MultiŠ”harts
Hello riverTrader,

There is no way to specify that from the code.
You may want to have a look at CStudyControl.ScrollToBar Method.
It allows to Scroll Chart to Specified Bar Number on then Subchart.