I think I will make a feature request for what I'm thinking of and then the development team and decide to do it or not.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy entered a position but it doesn't show up in the Strategies tab
Collapse
X
-
I may misunderstand something but I'm not sure what you said is correct. It does show the primary instrument position of a strategy in the position column of the strategy tab. What i'm saying is that if the strategy has a position in a secondary instrument, it won't appear here and the user will not know it.Originally posted by NinjaTrader_Josh View Post
I think I will make a feature request for what I'm thinking of and then the development team and decide to do it or not.
-
Is it correct that in the positions tab it shows the positions of the account and not the positions of the strategy.Originally posted by NinjaTrader_Josh View PostRight. In the strategies tab you see the primary instrument, but in the Positions tab you see both.
My concern is having a discrepancy between my strategy & my account and not knowing about it.
Comment
-
Correct. It shows account positions from any of your accounts whether that is sim account or live account.
With discrepancies being the concern I suggest you try these settings: Tools->Options->Strategies->NinjaScript->Wait until flat before executing live. Couple that with manually ensuring your account is flat for all the instruments before running the strategy should provide you a more streamlined experience in getting your strategy started.Josh P.NinjaTrader Customer Service
Comment
-
I am having a similar problem as this -- when running a multi-instrument strategy backtest, only a few trades are shown in the backtest trades report. I dont know why it sometimes shows some trades but not others. But,
My strategy never trades the primary instrument, but trades a bunch of other secondary instruments. When running backtests, the backtester does not report on these trades accurately. It shows a few, but i see from mylogs far more positions were entered into.
Additionally, all the other details on performance are wrong also, since the positions and trades are not being accurately reported on.
This seems to be a severe limitation when it comes to multi-instrument strategies -- no backtest, no details on current positions and trades executed, etc.
Comment
-
I'm not sure if I posted what I'm doing about this or not. I ran into a problem: The regular trading hours (Session) are not the same for all instruments. This was causing a problem for my multi-instrument strategy so I ended up just running it twice, once for each instrument and I can specify the session time for each time. I know I could just put a filter to only enter trades between a specific timeframe but the problem is that I want my indicators based only on regular trading hours data.Originally posted by bridenour View PostLooking at this further, it looks like the backtester does not show open positions when they are not in the primary instrument. Once a position is closed, i think it shows up. Not sure if this is working as intended...
So the problem with my solution of running two strategies is that I cannot limit the position quantity. I tried using a static variable but it got really complicated, too complicated in fact. So I think the only way is for me to split my account size in two and dedicate 50% of my account for each strategy. This isn't optimal because a majority of the time half my account won't be in use (it'll be rare to have open positions in both instruments).
Any ideas??
Comment
-
Sorry I wasn't more clear, the time filter won't work because the indicators will use data that is outside of my session. Unless I can specify the session time for each indicator??Originally posted by NinjaTrader_Josh View Postcunparis,
The time filter idea may be the best one to get the two strategy solution.
Comment
-
cunparis,
Not sure I follow. What you can do is set the session time to 24/7. Then manually limit session times based on the bar objects. If you have issues with indicators you can create instances of the indicators that have these sessions defined out. Then you can call the appropriate one.Josh P.NinjaTrader Customer Service
Comment
-
I didn't know it was possible to do that. this could really simplify what I'm trying to do.Originally posted by NinjaTrader_Josh View Postcunparis,
Not sure I follow. What you can do is set the session time to 24/7. Then manually limit session times based on the bar objects. If you have issues with indicators you can create instances of the indicators that have these sessions defined out. Then you can call the appropriate one.
Are you saying I can set session to be 24/7 and then set one macd to be 9-4:30 (stocks) and create another macd to be 3am-11am (europe)? If so this would allow me to do everything in one strategy. If so how do I do it?
Thanks
EDIT: I just found this post: http://www.ninjatrader-support2.com/...t+session+time and it seems that this isn't possible..Last edited by cunparis; 01-19-2009, 03:23 PM.
Comment
-
Can you give me some more details? I'm a software developer so coding is not the problem.Originally posted by NinjaTrader_Josh View Postcunparis,
You can. You want to use time filters. Just create yourself a version of the MACD, filter out any data from before x time and after y time. It will take some coding.
I'm still not sure we understand each other. If I only want the macd to be calculated from 9-4:30, I don't see a way to do it. At 9:00 the macd will use values from 3-9:00. I want it it to use the price data until 4:30 of the previous day and then continue again at 9:30.
Comment
-
Then you need to create yourself custom DataSeries that stores the price data you want. There is a bug right now for NT6.5 where you cannot pass custom DataSeries as an input for an indicator from a strategy. You will need to migrate indicator logic to the strategy as a function and just call that directly from the strategy along with your custom DataSeries.Josh P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
86 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
48 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
29 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
32 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
67 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment