Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
how to test when ATM is "None" ?
Collapse
X
-
Hello llanqui,
If you are referring to the Chart Trader Atm selector, you can check that the ChartControl.OwnerChart.ChartTrader.AtmStrategy.Te mplate is null.
I am having an issue extracting the atm strategy name from the chart trader. I know I can make my own listbox in the parameter listing, but I want to extract it from the chart trader instead of opening it everytime. How od Iget the contract quantity and the strategy name in order to create my order? int nContractQuantity =Chelsea B.NinjaTrader Customer Service
Comment
-
no, it is in button click event in an indicator
these have no problem
this_Account = ChartControl.OwnerChart.ChartTrader.Account;
this_AccountName = ChartControl.OwnerChart.ChartTrader.Account.Name;
this_Quantity = ChartControl.OwnerChart.ChartTrader.Quantity;
Comment
-
Ok, I imported the indicator SubmitChartTraderATM from here
I am having an issue extracting the atm strategy name from the chart trader. I know I can make my own listbox in the parameter listing, but I want to extract it from the chart trader instead of opening it everytime. How od Iget the contract quantity and the strategy name in order to create my order? int nContractQuantity =
questions:
1) If the ATM is NONE the code does not submit an Order...but I don't see how this is filtered out?
2) If I change the ATM while it is running, it gets an error
Error on triggering custom event for NinjaScript 'XXTestATM' on bar 3601: There is an error in XML document (0, 0).
I noticed that while I was testing my own .... can you tell me what the problem is?
Many thanks
Comment
-
Hello llanqui,
I see the issue, the AtmStrategy object is null (and not just the template).
Code:ChartControl.Dispatcher.InvokeAsync(() => { if (ChartControl.OwnerChart.ChartTrader.AtmStrategy == null) { Print("atmStrategySelector is set to <none>"); } else { Print(ChartControl.OwnerChart.ChartTrader.AtmStrategy.Template); } });Chelsea B.NinjaTrader Customer Service
Comment
-
Hello llanqui,
There is not an intention to make the chart trader controls available to NinjaScript. These are not documented and are being supplied by the support team as we discover these objects and properties can be manipulated.
This also includes getting things by AutomationID. You can use MSInspect as we do to find the object type and automation id of things.
http://ninjatrader.com/support/forum...644#post472644
Hi all ! I am trying to implement the example of Event fired by a change in the ATM strategy Selector as shown in the Help for the AtmStrategySelector item https://ninjatrader.com/es/support/helpGuides/nt8/?accountselector.htm Defining the variable as private AtmStrategy.AtmStrategySelector doesn't work because there is noChelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
647 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
369 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
108 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
572 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
573 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|
Comment