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:
here is what I'm trying without success..
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.

Comment