I'm trying to understand if SharpDX will perform any better than Draw.Text.
I'd like to label a bar on the chart with some text above the bar or below the bar.
So....
For example does the SharpDX version of code for plotting text above a bar:
[COLOR=#222222][FONT=Arial][FONT=monospace][COLOR=#0b5394]using SharpDX.DirectWrite; . . . var x = .......;[/COLOR][/FONT][/FONT][/COLOR] [COLOR=#222222][FONT=Arial][FONT=monospace][COLOR=#0b5394]var y = .......;[/COLOR][/FONT][/FONT][/COLOR] [COLOR=#222222][FONT=Arial][FONT=monospace][COLOR=#0b5394]var textRectangle = new SharpDX.RectangleF(x- 15, y, 100, 100);[/COLOR][/FONT][/FONT][/COLOR] [COLOR=#222222][FONT=Arial][FONT=monospace][COLOR=#0b5394]RenderTarget.DrawText(pivotName, format, textRectangle, color);[/COLOR][/FONT][/FONT][/COLOR]
perform any better than doing a simpler NinjaScript.DrawingTools implementation... something like this:
[COLOR=#222222][FONT=Arial][FONT=monospace][COLOR=#0b5394]using NinjaTrader.NinjaScript.DrawingTools
.
.
.
Draw.Text(this, "Bar" + CurrentBar, true, "H", 0, High[0] + (TextOffset * TickSize), 0, Brushes.Lime,
myFont, TextAlignment.Center, Brushes.Transparent, Brushes.Transparent, 0);[/COLOR][/FONT][/FONT][/COLOR]
I ask because:
- It seems that SharpDX is being retired. It is no longer being developed nor maintained. (For reference: link and link )
- the simpler implementation is... well... simpler! :-)
Seeking replies, many thanks!
-- Gregory

Comment