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:	116
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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    50 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    69 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    36 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    97 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    60 views
    0 likes
    Last Post PaulMohn  
    Working...
    X