Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Managing ATM execution within ninjascript
Collapse
X
-
Managing ATM execution within ninjascript
hi ... I am writing a strategy that executes an ATM strategy upon meeting certain conditions. I need to ensure that I don't have more than one ATM strategy running at a given time. So I need help to know how to check to see if an existing ATM is running, and, if so, how to cancel it before executing a new one. Any advice is greatly appreciated. txTags: None
-
pman,
Essentially that example code tracks the ID of the ATM strategy. It resets it to be a empty string when it detects that the ATM strategy closed. atmStrategyId is how it tracks if there is an active ATM strategy or not.
Code:else if (atmStrategyId.Length > 0 && GetAtmStrategyMarketPosition(atmStrategyId) == Cbi.MarketPosition.Flat) atmStrategyId = string.Empty;
Adam P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by algospoke, 04-17-2024, 06:40 PM
|
6 responses
48 views
0 likes
|
Last Post
by algospoke
Today, 06:18 PM
|
||
Started by arvidvanstaey, Today, 02:19 PM
|
4 responses
11 views
0 likes
|
Last Post Today, 04:08 PM | ||
Started by samish18, 04-17-2024, 08:57 AM
|
16 responses
61 views
0 likes
|
Last Post
by samish18
Today, 03:30 PM
|
||
Started by jordanq2, Today, 03:10 PM
|
2 responses
9 views
0 likes
|
Last Post
by jordanq2
Today, 03:23 PM
|
||
Started by traderqz, Today, 12:06 AM
|
10 responses
21 views
0 likes
|
Last Post
by traderqz
Today, 02:49 PM
|
Comment