Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Access Chart Trade QTY input from SuperDom Code

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

    Access Chart Trade QTY input from SuperDom Code

    Hi there,
    I'm trying to luch an order from clicking on SuperDom (having myown DOM).

    I can access the account : SuperDom.Account
    I can access the ATM : SuperDom.AtmStrategy.DisplayName

    But! How can I access the chart trade QTY?

    I would like to access this value:
    Click image for larger version

Name:	superdome-qunaty.png
Views:	107
Size:	220.8 KB
ID:	1319199

    here is what I'm trying without success..

    Code:
     private void OnMouseClick(object sender, MouseEventArgs e)
            {
                NinjaTrader.Gui.SuperDom.ColumnWrapper wrapper = (NinjaTrader.Gui.SuperDom.ColumnWrapper)sender;
                
                int quantity = 1;
                //SuperDom.Position.Quantity; -- Not working..
    
                // Also not working..
                //QuantitySelector quantitySelector = Window.GetWindow(ChartControl.Parent).FindFirst("ChartTraderControlQuantitySelector") as QuantitySelector;
                //Print(quantitySelector.ToString());
                
                            
                    
                    var entry = SuperDom.Account.CreateOrder(SuperDom.Instrument,OrderAction.Buy, OrderType.Limit, OrderEntry.Manual, TimeInForce.Day, quantity, Volatile.Read(ref mouseAtPrice2), 0, string.Empty, "Entry", Core.Globals.MaxDate, null);
                    
                    NinjaTrader.NinjaScript.AtmStrategy.StartAtmStrategy(SuperDom.AtmStrategy.DisplayName, entry);
                    SuperDom.Account.Submit(new[] { entry });
                    
                ​
    }

    Thanks,
    Elad.
    Last edited by eladlevi; 09-25-2024, 04:30 AM.

    #2
    Hello Elad,

    The Quantity control can be selected with the AutomationID 'SuperDOMControlQuantityUpDown'.

    Below is a link to a forum thread that discusses.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    579 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    334 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    554 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    551 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X