In a strategy i am developing i'd like to be able to create/instantiate drawing objects based on a custom drawing tool. I have not found a way to do it similar to what it is possible with native drawing objects.
For example, with native drawing tools you can create or instantiate an object like this:
NinjaTrader.NinjaScript.DrawingTools.Line _myLine;
_myLine = Draw.Line(this, "target_" + _drawLine.plotName, false, 20, _priceLevel, 1, _priceLevel, markerColor, DashStyleHelper.Solid, 5);
But with a custom drawing tool i have no idea how to proceed or if it is even possible.
The only solution i found was to simulate a hotkey pressed using this command:
System.Windows.Forms.SendKeys.SendWait("%{3}"); // simulate Alt+3 pressed
But it is not perfect.
Are there any other solutions ?
Comment