Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Positions P/L incorrect with two strategies trading the same instrument

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

    Positions P/L incorrect with two strategies trading the same instrument

    I've noticed some weird behavior. I have two strategies both trading ES. Sometimes my Positions tab that shows P/L for ES will get confused and show a negative P/L even when the P/L is positive. My guess is that when two strategies enter and then one exits it gets the cost basis messed up.

    Has anyone else noticed this? I just want to make sure I didn't do anything wrong. I kind of freaked out a few times now but then just held my breath that all would be ok.

    PS: The P/L on the strategies tab is correct. Would this one have more priority (more likely to be correct)?

    #2
    The positions tab aggregates across all of the strategies. This does not separate out the different strategies. When you are running two strategies I would not advise you rely on the positions tab. For one, if one strategy is long and the other perfectly offsets it with a short you will see it as a flat in the positions tab. With this you may think you aren't even in the market, but you actually are.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      The positions tab aggregates across all of the strategies. This does not separate out the different strategies. When you are running two strategies I would not advise you rely on the positions tab. For one, if one strategy is long and the other perfectly offsets it with a short you will see it as a flat in the positions tab. With this you may think you aren't even in the market, but you actually are.
      Good point. I'll focus on the strategies tab. I just like to check the positions tab now and then to make sure it's in sync with the strategies. When I did that today I got worried because strategy said positive P/L and positions tab said negative. But in checking the executions it's positive.

      Comment


        #4
        To make it even more interesting, my broker has an avg price totally different from the strategy tab as well. This is quite strange.

        I just checked my history with my broker and it appears the strategy avg price is correct. At least the strategy knows what's really going on!
        Last edited by cunparis; 02-04-2009, 12:44 AM.

        Comment


          #5
          You may want to contact your brokerage to reconcile any differences.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            I confirm that when two strategies place orders on the same instrument, the positions P/L is incorrect. I consider this a bug, if the P/L is not correct then it shouldn't be displayed. The strategies tab is correct.

            Comment


              #7
              cunparis,

              You need to elaborate on what you mean. As discussed earlier, the positions tab does NOT distinguish between the strategies. It shows what is there across everything as an aggregated position total.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_Josh View Post
                cunparis,

                You need to elaborate on what you mean. As discussed earlier, the positions tab does NOT distinguish between the strategies. It shows what is there across everything as an aggregated position total.
                This is what it should do but it's not happening. Every time I have two strategies both trading ES, the positions tab shows an incorrect avg price and the P/L is completely off. Today I was down $800 and the positions tab showed -$3000. I wasn't doing anything complicated either. one strategy entered short 2 shares and then at a higher price another strategy entered short 3 shares.

                This is at least twice that it happens. I can live with it, now that I know about it, but I think you should look into it and possibly fix it.

                Comment


                  #9
                  Not sure I follow. You can't just add the two together. There is more complex math than that in determining average price.
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #10
                    Originally posted by NinjaTrader_Josh View Post
                    Not sure I follow. You can't just add the two together. There is more complex math than that in determining average price.
                    It's not complex at all.

                    strategy a: # contracts * avg price
                    strategy b: # contracts * avg price

                    total avg price = sum of two above / total # contracts

                    if both strategies are on the same side, it's easy.

                    Comment


                      #11
                      cunparis,

                      Like I mentioned, the positions tab aggregates everything.
                      Josh P.NinjaTrader Customer Service

                      Comment


                        #12
                        Originally posted by NinjaTrader_Josh View Post
                        cunparis,

                        Like I mentioned, the positions tab aggregates everything.
                        But it aggregates it incorrectly.

                        Comment


                          #13
                          cunparis,

                          Take a look at the screenshots.
                          Attached Files
                          Josh P.NinjaTrader Customer Service

                          Comment


                            #14
                            Originally posted by NinjaTrader_Josh View Post
                            cunparis,

                            Take a look at the screenshots.
                            No idea why it doesn't work for me.
                            Try ES.
                            Leave 30 minutes between the trades.

                            If that works then I give up.

                            Comment


                              #15
                              All I can suggest is for you to repair and reset your DB.
                              Attached Files
                              Josh P.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Perr0Grande, Today, 08:16 PM
                              0 responses
                              0 views
                              0 likes
                              Last Post Perr0Grande  
                              Started by elderan, Today, 08:03 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post elderan
                              by elderan
                               
                              Started by algospoke, Today, 06:40 PM
                              0 responses
                              10 views
                              0 likes
                              Last Post algospoke  
                              Started by maybeimnotrader, Today, 05:46 PM
                              0 responses
                              9 views
                              0 likes
                              Last Post maybeimnotrader  
                              Started by quantismo, Today, 05:13 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post quantismo  
                              Working...
                              X