I am trying to draw up/down arrows a fixed pixel distance from their bars (i.e. not a price difference). The reason is so that they look good both for the older low-priced bars and for the newer high-priced bars. As far as I can see, that requires using OnRender() because OnBarUpdate() does not get called when the user scrolls the chart horizontally, so the price/pixel distance is wrong for the scrolled window.
As far as I can see, that means I need to use RenderTarget.DrawGeometry(). Somewhere in the verbiage it said to keep the geometry object for the duration of the application. On the other hand, it looks to me as if I need a new geometry object for each arrow, and again whenever the chart is scrolled (because the coordinates are in the geometry object and not in the call that draws it). That's potentially a lot of objects to think of as semi-permanent, but perhaps I misunderstood something.
Is there a way to convert absolute bars in OnRender() to a suitable BarsAgo value to hand to one of the Draw.* functions? Using Draw.ArrowUp() seems to me to be a lot simpler than trying to do arrows with SharpDX. (Is there a sample of anything close to using SharpDX to draw arrows near bars?)

Comment