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 charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    68 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    150 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    162 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    100 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    288 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X