Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sending an order from a drawing tool

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

    Sending an order from a drawing tool

    Hello,

    I have created a drawing which draws stop, entry and target lines according to a defined risk parameter.

    Now from that drawing tool I would also like to draw a Buy/Sell button on the chart which would trigger a buy or sell , stop and target orders.

    Is it possible to do that all from the Drawing tool ?


    Thank you !


    #2
    Hello blar58,

    That would be possible. You would need to use the addon framework Account class and its methods for the order placement. To add buttons to the chart you could use the existing WPF samples we have on the forums, I have linked that below.

    The concepts from those samples would apply at the chart control level meaning once you have the chart control you can pretty much re use the rest of the WPF code. Only the part where you find the ChartControl and parent chart window would be different.

    The drawing object could use any of the overrides which pass in ChartControl to do the WPF addition. OnRender may be one area where you could do that, on the first render do the WPF control adding and then mark that it has been added so the next render can skip adding the controls. You would otherwise find the parent of the ChartControl the same way and then everything beyond that point would be identical to the other samples for building the WPF controls.


    Hello All, Moving forward this will be maintained in the help guide reference samples and no longer maintained on the forum. Creating Chart WPF (UI) Modifications from an Indicator - https://ninjatrader.com/support/help...ui)-modifi.htm (https://ninjatrader.com/support/helpGuides/nt8/creating-chart-wpf-(ui)-modifi.htm) I've


    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    647 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    368 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    571 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X