Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is it possible to draw objects on chart through AddOn?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Is it possible to draw objects on chart through AddOn?

    I want to add some support/resist line, fibonacci etc. to charts through Addon, I know indicator can draw objects on chart, but I am not sure how to do it through AddOn...yes, I know how to get the ChartControl, but what's next step?

    #2
    Hello,

    Thank you for the question.

    There are no documented ways to add Indicators or Drawing objects to a chart from an addon currently.

    One way to add DrawingObjects specifically could be the following two items. One is a way to enact the Drawing "pen" tool for the object of your choice. the other would be in the case you have the instance of an indicator, you could supply it as the Base to draw an object like you would using NinjaScript.

    Code:
    ChartControl.TryStartDrawing("NinjaTrader.NinjaScript.DrawingTools.ArrowDown");
    After calling this, the ChartControl in which this was called on should now use the Pen mouse and allow for placement.

    The second would be to call the Static Draw methods like you would from an indicator, again this assumes you have a instance to the Indicator to provide a base:

    Code:
    NinjaTrader.NinjaScript.DrawingTools.Draw.ArrowDown(indicators_instance, "test", true, 0, 2000, System.Windows.Media.Brushes.Red);

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Christopher_R, Today, 12:29 AM
    0 responses
    9 views
    0 likes
    Last Post Christopher_R  
    Started by sidlercom80, 10-28-2023, 08:49 AM
    166 responses
    2,235 views
    0 likes
    Last Post sidlercom80  
    Started by thread, Yesterday, 11:58 PM
    0 responses
    3 views
    0 likes
    Last Post thread
    by thread
     
    Started by jclose, Yesterday, 09:37 PM
    0 responses
    8 views
    0 likes
    Last Post jclose
    by jclose
     
    Started by WeyldFalcon, 08-07-2020, 06:13 AM
    10 responses
    1,415 views
    0 likes
    Last Post Traderontheroad  
    Working...
    X