Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Issue with ATM Strategy
Collapse
X
-
Thanks for your reply Matthew. I've always used "testStrategyIdValue" and it worked fine so far, but I'll follow your advice and replace it by GetAtmStrategyUniqueId(), as per the Help Guide Example.
Thanks again.
-
What is your testStrategyIdValue? Is this a hard coded string?
Or do you set it to GetAtmStrategyUniqueId()?
If you have not, I'd suggest using similar methods as per our help guide example. This should generate unique strings for each new ATM Strategy, rather than trying to reuse the same string:
Leave a comment:
-
Issue with ATM Strategy
Hello
I've been running an automated strategy across multiple markets for quite some time and today for the first time I encountered the following issue: a trading signal triggered an automated entry, but rather than executing I got the following error message: AtmStrategyId parameter 'testStrategyIdValue' already used.
The relevant code snippet from my strategy looks as follows:
if(!orderPlacedLong && my criteria here)
{
orderId = GetAtmStrategyUniqueId();
AtmStrategyCreate(Cbi.OrderAction.Buy, OrderType.StopLimit,High[0]+1*TickSize,High[0]+1*TickSize, TimeInForce.Day, orderId, "MyStrat", "testStrategyIdValue");
orderPlacedLong = true;
}
else if (orderPlacedLong == true && High[0] <= High[1])
{
AtmStrategyCancelEntryOrder(orderId);
orderPlacedLong = false;
}
Any pointers as to what might have happened here would be much appreciated.
ThanksTags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by herzogvladimir2, Today, 08:10 PM
|
0 responses
2 views
0 likes
|
Last Post
![]() |
||
Started by giogio1, 04-13-2025, 01:42 AM
|
2 responses
33 views
0 likes
|
Last Post
![]()
by giogio1
Today, 07:19 PM
|
||
Started by mmenigma, 01-23-2024, 09:37 AM
|
1 response
86 views
0 likes
|
Last Post
![]()
by Nin8aTrender
Today, 03:47 PM
|
||
Started by wbayne333, 02-22-2021, 01:18 PM
|
6 responses
409 views
0 likes
|
Last Post
![]()
by Nin8aTrender
Today, 03:44 PM
|
||
Started by gtheaded, 07-03-2020, 03:47 PM
|
3 responses
370 views
0 likes
|
Last Post
![]()
by Nin8aTrender
Today, 03:21 PM
|
Leave a comment: