Recently I created an indicator that draws lines to connect highs and lows. When enabled, the indicator will use Draw.Line() to draw on all historical data loaded as well as on new updating data, so there will be many drawings on screen. Thanks to NinjaTrader_Emily I was informed that placing many drawings on the chart can cause performance issues which I noticed when my chart began to lag a bit when my indicator was enabled.
I would like to introduce using SharpDX tools for rendering purposes to improve my script performance. The logic in my indicator has many calculations and dynamic variables that are used for coordinates when drawing these lines. Some of the lines are also updated throughout the life of the script. All calculations are under the OnBarUpdate() method. I have read the Better Practices section but would like to see some sample scripts that may be similar to what I am trying to achieve with passing variables to OnRender(), or OnRenderTargetChanged() as well as working with updating draw objects.
Can you reference me to any sample scripts that may give me some good insight?​

Comment