If I have my entry order condition how I want it, can I call the AtmStrategy and orStopStrategy
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Add AtmStrategy StopStrategy to my strategy entries
Collapse
X
-
To be more explicit and easier to answer.
I can enter long on criteria but I do not know how to invoke the AtmStrategyCreate properly
EnterLong works
ApplyATMLong Does not work
if (CrossAbove(GetCurrentAsk(0), MyEntryCriteria, 1))
{
EnterLong(Convert.ToInt32(DefaultQuantity), "");
//ApplyATMLong();
}
}
protected void ApplyATMLong(){
atmStrategyId = GetAtmStrategyUniqueId();
atmStrategyOrderId = GetAtmStrategyUniqueId();
AtmStrategyCreate( OrderAction.Buy,
OrderType.Market, 0, 0,
TimeInForce.Day,
atmStrategyOrderId,
"MyAtmStrategy",
atmStrategyId, (atmCallbackErrorCode, atmCallbackId) =>
{
if (atmCallbackId == atmStrategyId) /// checks that the call back is returned for the current atmStrategyId stored
{
if (atmCallbackErrorCode == Cbi.ErrorCode.NoError) /// check the atm call back for any error codes
{
isAtmStrategyCreated = true; /// if no error, set private bool to true to indicate the atm strategy is created
}
}
});
}​
-
Hello BartMan,
Thanks for your post.
Atm Strategy Methods would be used to place an entry order with protective orders attached that are handled by an Atm Strategy Template using the AtmStrategyCreate() method.
Atm Strategy Methods: https://ninjatrader.com/support/help...gy_methods.htm
AtmStrategyCreate: https://ninjatrader.com/support/help...tegycreate.htm
The SampleAtmStrategy script that comes default with NinjaTrader could be viewed for an example of how Atm Strategy Methods can be used in a NinjaScript Strategy. To view the script, open a New > NinjaScript Editor window, open the Strategies folder, and double-click on the SampleAtmStrategy file.
Using ATM Strategies in NinjaScript: https://ninjatrader.com/support/help...strategies.htm
Let me know if I may assist further.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
- Likes 1
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
81 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
42 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
64 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
68 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
55 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment