double j = placeholder.value[0];
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
ATM in ninja script strategy
Collapse
X
-
I am trying to plot a value from my strategy to a placeholder indicator from what the sample says. My question is what if I want to query that stored value in a placeholder? Does the value remain there in the placeholder? I want to access that value like this for example
double j = placeholder.value[0];
-
As already clarified in another thread / post of yours - the concept of strategy communication is not supported currently unfortunately - however we've added it to our feedback under # 1002 and thank you for the input to further enhance our NinjaTrader platform.Originally posted by luxurious_04 View PostI am trying to plot a value from my strategy to a placeholder indicator from what the sample says. My question is what if I want to query that stored value in a placeholder? Does the value remain there in the placeholder? I want to access that value like this for example
double j = placeholder.value[0];
Comment
-
Hello I would like to know if what is the cause of this problem:
"Failed to execute DB job 'StrategyUpdateJob'. A foreign key value cannnot be inserted because a corresponding primary key value does not exits. [Foreign key constraint name = FK_nt_strategy2instrument_000000000000002A6]
someone could help me on how to fix this issue. Thanks in advance.
Comment
-
luxurious_04, could you please recheck if you could reproduce the error message after repairing your DB under Tools > Options > Data? If you could still see it happen, please contact me with the scenario used via Help > Mail to Support and be sure to check the logs / trace option so we would have access to your diagnostic files from the platform.
Thanks,
Comment
-
Hello, anyone there could help me on how to get the current price on the dom? I want to get price in dom which is in a red color or the current price. Not the Current bid/Ask. And how to know if my entered order has been stop out? Is there any code to check if the stop of my ATM is hit or I got stop out?
Comment
-
For the strategy stop / target monitoring you could use : http://www.ninjatrader.com/support/h...rgetorders.htm
The current price is Close[0] with CalculateOnBarClose set to false in the script.
Comment
-
Not sure why you are interested in the price on the DOM. To the best of my knowledge there is no way to access the DOM in NinjaScript. Assuming CalculateOnBarClose is set to false, Close[0] should get you the value you are looking for.
If your Stop order has been executed then your Strategy will no longer be running. Something like this could be used:
// check if the strategy has terminated
if (orderID.Length == 0 && atmStrategyID.Length > 0 && GetAtmStrategyMarketPosition(atmStrategyID) == Cbi.MarketPosition.Flat)
{
atmStrategyID = string.Empty;
orderID = string.Empty;
atmQty = 0;
newAtmStopLoss = false;
changeEntryOrder = false;
Print("ATM strategy has closed.");
}
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
649 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
370 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 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
573 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
576 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment