Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Imitating Chart Trader Button Behaviors using Additional buttons

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

    Imitating Chart Trader Button Behaviors using Additional buttons

    Current Scenario: I am using Chart Trader Buy/Sell Buttons along with defined ATM strategy. When using those button i have to change the quantity for the different sizes.
    What I want is:
    I want to add custom buttons on chart trader with a specified size while using the same ATM strategy as selected so that i don't have to enter the quantity every time.

    Now, i am able to add the button on chart trader to buy and sell different sizes e.g. 100, 50, 20, 10 however i am not able to see the stop loss and target marker on the chart. Also my stop loss doesn't get automatically updated when i peel off my position (partial sell). Where as if I use the original Chart Trader Buy sell buttons, it automatically adjusts my stoploss/target quantity as I peel off my position. How Can i imitate this behavior for my custom buttons.

    Thanks
    g

    #2
    Hello gbajaj,

    Could it be the ATM orders are outside the visible display of the chart? Please right click in ChartTrader and select 'Properties'. Enable the 'Auto scale' setting and click OK. Check if you now see the ATM orders.

    What setting do you have selected for 'ATM strategy selection mode' in the ChartTrader Properties? If you set it to 'Select active ATM strategy on order submission', does the stop loss automatically update when you scale out of the position? This works for me when I test it.

    Could you please send me a screenshot that shows the buttons you added. Do you use a 3rd party add-on that allows you to create these buttons?

    Comment


      #3
      Looks like i am not able to explain my question very well.

      What i want is that my custom buttons to behave similar to the predefined buttons.
      I have written the code myself and here is the Buy order for my B-100 button.

      myAccount.CreateOrder(Instrument, OrderAction.Sell, OrderType.Market, OrderEntry.Manual, TimeInForce.Day, 100, 0, 0, "", "Exit", DateTime.MaxValue, null);
      now as evident from code, it's doing it's own thing, no ATM strategy is part to the api call params here.

      My question is:
      What should I add to this code so i could use the ATM strategy current selected.
      Attached Files

      Comment


        #4
        Hello gbajaj,

        Your custom buttons wont have access to just use the existing ATM selector for an ATM, you would need to find what template is selected in that control and then use StartAtmStrategy().

        There is an example of that concept here: https://ninjatrader.com/support/foru...egy#post752775

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        633 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        364 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        567 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        568 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X