Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
ATM Strategy question
Collapse
X
-
eDanny,
That does not happen on my end. On the sample strategy it will enter once and then in the Output Window as long as that strategy is active it will keep printing things like this:
The current ATM Strategy market position is: Flat
The current ATM Strategy position quantity is: 0
The current ATM Strategy average price is: 0
The current ATM Strategy Unrealized PnL is: 0
The entry order average fill price is: 0
The entry order filled amount is: 0
The entry order order state is: Working
The current ATM Strategy market position is: Flat
The current ATM Strategy position quantity is: 0
The current ATM Strategy average price is: 0
The current ATM Strategy Unrealized PnL is: 0
If it prints that it will never enter continuously.Josh P.NinjaTrader Customer Service
Comment
-
Grrr, every time I tried it, multiple entries have occured, starting with those tests yesterday.
Ok, quit my other strategy so output window isn't cluttered and trying again.Last edited by eDanny; 01-28-2009, 12:20 PM.
Comment
-
I would suggest you break your code into states for example so in your code it deals with multi signals happening at once and you are not falling back on anything other than your codeOriginally posted by eDanny View PostIf my strategy is running on two charts with the same instruments, how can I check to see if there is an open position on one chart to prevent another entry? Got a feeling there is no way to tell.
Then do something like thisCode://method 1 if(XXX || YY && openorder == false) { method1 = (true); }
Remember to set your variables back to a reset state once your account is flat again.Code:if (method1 == true && openorder == false) { atmStrategyId = GetAtmStrategyUniqueId(); orderId = GetAtmStrategyUniqueId(); AtmStrategyCreate(Action.Sell, OrderType.Limit, Close[0], 0, TimeInForce.Day, orderId, "ATMTemplate", atmStrategyId); openorder = (true); }
Side note this is an example ONLY.
Hope that helps.
CiRioN
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
626 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
359 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 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
562 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
567 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment