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

integrating addon buttons for entering trades

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

    integrating addon buttons for entering trades

    My objective is to have buttons to set up my orders submitted through an atm or fixed stop or target profit. My question is when creating a button such as buy bid on chart trader, is is possible to create this? Is it an indicator, strategy or addon

    #2
    Hello ballboy11,

    Yes that is possible, it depends on what kind of orders you wanted to submit. If you want to submit strategy based orders you would use a strategy and the standard strategy order methods. If you wanted to build a custom tool that supports manual orders you could instead use an indicator and the addon framework.

    There is a quick sample that shows adding some general buttons to the chart control that can be used for testing, this could be used from an indicator or strategy. https://ninjatrader.com/support/help...ub=usercontrol

    You can also see the following post for more complex examples involving the chart trader or window: https://ninjatrader.com/support/foru...t=1#post499327

    If you used an indicator you could see the following section, keep in mind the addon account code should not be used in a strategy for order placement/management. https://ninjatrader.com/support/help...ount_class.htm

    One other note here is that if you use any NinjaScript properties like Close[0] in a button handler, you need to use a TriggerCustomEvent to surround that code. https://ninjatrader.com/support/help...=triggercustom

    Code:
    //this goes in the button event handler
    TriggerCustomEvent(o =>
    {
    // your code in here
    }, null);
    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thank you. now is there an example where I can put the PnL on the SideBar. I did get what I needed to work and all I need is to put a couple of parameter text boxes in order to place quantity and ticks for stop loss and or profit targets

      Comment


        #4
        Hello ballboy11,


        There is not a specific sample for PnL that I am aware of which puts it in the side bar. The chart trader is just a WPF control so to add anything else you would have to add other WPF controls. If you needed PNL that would likely be a TextBlock or one of the text based controls in WPF.

        There is not a specific sample for PnL
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by traderqz, Today, 12:06 AM
        10 responses
        18 views
        0 likes
        Last Post traderqz  
        Started by algospoke, 04-17-2024, 06:40 PM
        5 responses
        46 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by arvidvanstaey, Today, 02:19 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Zachary  
        Started by mmckinnm, Today, 01:34 PM
        3 responses
        5 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by f.saeidi, Today, 01:32 PM
        2 responses
        9 views
        0 likes
        Last Post f.saeidi  
        Working...
        X