Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy entered a position but it doesn't show up in the Strategies tab

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Originally posted by NinjaTrader_Josh View Post
    Not sure I follow. In the Control Center NT has never displayed information regarding virtual strategy positions besides unrealized PnL.
    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.

    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.

    Comment


      #17
      Right. In the strategies tab you see the primary instrument, but in the Positions tab you see both.
      Josh P.NinjaTrader Customer Service

      Comment


        #18
        Originally posted by NinjaTrader_Josh View Post
        Right. In the strategies tab you see the primary instrument, but in the Positions tab you see both.
        Is it correct that in the positions tab it shows the positions of the account and not the positions of the strategy.

        My concern is having a discrepancy between my strategy & my account and not knowing about it.

        Comment


          #19
          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


            #20
            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


              #21
              Looking 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...

              Comment


                #22
                Hello,

                I believe this is expected behavior. I will have Josh confirm however.
                DenNinjaTrader Customer Service

                Comment


                  #23
                  Originally posted by bridenour View Post
                  Looking 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...
                  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.

                  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


                    #24
                    bridenour,

                    I am not sure what you are seeing exactly, but the Strategy Analyzer only shows closed trades.

                    cunparis,

                    The time filter idea may be the best one to get the two strategy solution.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #25
                      Originally posted by NinjaTrader_Josh View Post
                      cunparis,

                      The time filter idea may be the best one to get the two strategy solution.
                      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??

                      Comment


                        #26
                        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


                          #27
                          Originally posted by NinjaTrader_Josh View Post
                          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.
                          I didn't know it was possible to do that. this could really simplify what I'm trying to do.

                          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


                            #28
                            cunparis,

                            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.
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #29
                              Originally posted by NinjaTrader_Josh View Post
                              cunparis,

                              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.
                              Can you give me some more details? I'm a software developer so coding is not the problem.

                              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


                                #30
                                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 argusthome  
                                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                                0 responses
                                48 views
                                0 likes
                                Last Post NabilKhattabi  
                                Started by Deep42, 03-06-2026, 12:28 AM
                                0 responses
                                29 views
                                0 likes
                                Last Post Deep42
                                by Deep42
                                 
                                Started by TheRealMorford, 03-05-2026, 06:15 PM
                                0 responses
                                32 views
                                0 likes
                                Last Post TheRealMorford  
                                Started by Mindset, 02-28-2026, 06:16 AM
                                0 responses
                                67 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Working...
                                X