I have an indicator I've written that draws on both the chart panel and its own separate panel. It works fine when used as an indicator.
It is used from a strategy, and added to the chart via AddChartIndicator(...) in State.DataLoaded.
In this scenario, lines and rays draw on the main panel even when using the Draw.Ray or Draw.Line signature that includes the "drawOnPricePanel" property and set to false.
Here is the signature being used in the indicator. (tl is a class containing various useful data)
Draw.Line(this, tl.tag, false, tl.anchor.barTime, tl.anchor.cciValue,tl.touches[0].barTime, tl.touches[0].cciValue, brush,
tl.state == 1 ? DashStyleHelper.Dot : DashStyleHelper.Solid, tl.state == 1 ? 1 : 2, false);
In State.SetDefaults the indicator sets DrawOnPricePanel true, because at various points it places Draw.Text objects on the price panel. All other Draw methods use the signature including "drawOnPricePanel". At no time is DrawOnPricePanel at the base level set true or false on the fly.
Your assistance would be appreciated.
Cheers,
saltminer
Comment