I am attempting to draw some lines on the second panel in my strategy, currently attempting this with OnRender as I was unable with regular drawing tools. The second panel is a different instrument to my first panel.
When I run the following code from one of your help guides:
[COLOR=#0000ff]protected[/COLOR][COLOR=#ffffff] [/COLOR][COLOR=#0000ff]override[/COLOR][COLOR=#ffffff] [/COLOR][COLOR=#0000ff]void[/COLOR][COLOR=#ffffff] [/COLOR]OnRender(ChartControl[COLOR=#ffffff] [/COLOR]chartControl,[COLOR=#ffffff] [/COLOR]ChartScale[COLOR=#ffffff] [/COLOR]chartScale)
{
[COLOR=#ffffff] [/COLOR][COLOR=#008000]// Print the number of panels currently displayed on the chart[/COLOR]
[COLOR=#ffffff] [/COLOR]Print(String.Format([COLOR=#800000]"There are {0} panels on the chart"[/COLOR],[COLOR=#ffffff] [/COLOR]chartControl.ChartPanels.Count));[COLOR=#ffffff] [/COLOR]
}
I assumed that I would be able to run the following code to draw on each panel respectively according to their chart index:
if (this.ChartPanel.PanelIndex == 0) // NQ Panel
{
RenderTarget.DrawLine(startHighNQ, endHighNQ, brushNQ, 2); // High NQ
RenderTarget.DrawLine(startLowNQ, endLowNQ, brushNQ, 2); // Low NQ
}
if (this.ChartPanel.PanelIndex == 1) // ES Panel
{
RenderTarget.DrawLine(startHighES, endHighES, brushES, 2); // High ES
RenderTarget.DrawLine(startLowES, endLowES, brushES, 2); // Low ES
}
Thanks in advance


Comment