Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.

    https://ninjatrader.com/support/help...ount_class.htm
    https://ninjatrader.com/support/foru...t=1#post499327

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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by 05arminia, Today, 12:03 AM
    1 response
    18 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by MakesTrades23, Yesterday, 10:39 PM
    1 response
    29 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by Emmarq25, Yesterday, 11:01 PM
    2 responses
    42 views
    0 likes
    Last Post NinjaTrader_ChrisSch  
    Started by Johnny, Yesterday, 01:11 PM
    7 responses
    74 views
    1 like
    Last Post brucerobinson  
    Started by Chief2014, Yesterday, 01:03 PM
    1 response
    24 views
    0 likes
    Last Post NinjaTrader_Jason  
    Working...
    X