thanks much
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Multiple Entries in ATM Strategy
Collapse
X
-
Joydeep - just one more quick check. if I manually close an ATM strategy then the position will show as flat but the strategy ID will still be the original string, and would have to be 'emptied out' in the script ?
thanks much
-
Hello buylosellhi,
If you manually close the Atm strategy by clicking on the Flatten Everything (File>Flatted Everything) or Close button in SuperDom or Chart Trader then all positions will be closed and the strategy will be disabled.
Please let me know if I can assist you any further.JoydeepNinjaTrader Customer Service
Comment
-
Hi Joydeep, thanks for your note. I meant to say closing the strategy using the middle mouse botton which closes only the active ATM strategy, without disabling it and leaves everything running. In that case, the strategy ID string still contains its tag so would need to be reset
Comment
-
Hello buylosellhi,
You can reset those by the following code of yours for example:
Either put it above the entry logic or if your put your entry logic first (as in your original code) just return, once the entry has been made.Code:if (atmStrategyIdS.Length>0 && GetAtmStrategyMarketPosition(atmStrategyIdS)==Cbi.MarketPosition.Flat) { orderIdS = string.Empty; atmStrategyIdS = string.Empty; Print("Confirming successful close of Short strategyID = " + atmStrategyIdS + " and no order ID = " + orderIdS); }
The positions will be updated on the next tick, and then you can reset the string id's.
Please let me know if I can assist you any further.JoydeepNinjaTrader Customer Service
Comment
-
Thanks Joydeep,
so in that block of your code, I shouldnt use AtmStrategyClose(...) command because the manual click has essentially achieved the same ?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
672 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
379 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
111 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
575 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
582 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment