Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trade performance is inaccurate when scaling in and out of trades

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

    Trade performance is inaccurate when scaling in and out of trades

    If you have a position and add to it (scale in) and then close the profitable position by scaling out, it throws off the # of trades won and % of trades won/lost column because NT uses original entry price to calculate the win/loss from instead of the average price of the position. Gross loss and max draw-down are also affected as losses although the trade was a win. This has been ongoing since version 7. Is this ever going to be made accurate?
    Thanks

    #2
    I am not quite sure I understand where the issue is occurring. I ran the following tests:

    Scenario 1 -
    • Enter a long order with an ATM strategy for 1 qty
    • place a buy order for 1 qty to scale into this position
    • Let the target orders fill to exit the position

    Scenario 2 -
    • Enter a long order with an ATM strategy for 1 qty
    • Place a buy order for 1 qty to scale into this position
    • place a sell order to scale out 1 qty
    • place another sell order to flatten the position

    Both of these trades reported 'percentage profitable' and '# of winning trades' as expected (4 trades, 100%)..

    What steps would I need to take to replicate what you're reporting?

    Comment


      #3
      Short 1000 shs @.70 cents
      Short 2000 shs @ .64 cents
      Short 1000 shs @ .65 cents
      ________________________
      .66 cent average short price

      Cover 2000 shs @ .72 cents (trader gets nervous and reduces size).
      Cover 2000 shs @ .50 cents
      _______________________
      .61 cent avg cover price.

      NT reports the first cover as a losing trade for some reason, even though this is a winning trade. It can't differentiate between a partial size loss and a total trade win.
      This is just an example of how it happens. I would have to dig in deeper to actual trades to provide specifics. It shouldn't be that hard to duplicate on your end just using sim account and placing trades direct off chart, not ATM strategy trades.

      Thanks
      Last edited by bortz; 10-27-2017, 04:51 AM.

      Comment


        #4
        NinjaTrader operates following FIFO (first in first out) logic for PnL calculation. I'll use your example:
        • I would expect trade 1 (entry @.70, exit @.72) to record as a .02 loss
        • I would expect trade 2 (entry @.64, exit @.72) to record as a .06 loss
        • I would expect trade 3 (entry @.64, exit @.50) to be profitable by .06
        • I would expect trade 4 (entry @.65, exit @.50) to be profitable by .05


        This is behaving as expected.

        Here is a link to the help guide which goes into more detail about FIFO:

        Last edited by NinjaTrader_PatrickG; 10-27-2017, 07:31 AM.

        Comment


          #5
          This isn't an order time or order of execution issue, it's an issue with NT being unable to properly process an overall winning trade. What's the point of all this computing horsepower if I can do a better job of accurate record keeping with a pen and paper?

          Thanks

          Comment


            #6
            I would expect the example I used to be a net +.03 cumulative profit. There were 2 losing trades and 2 winning trades.

            Perhaps I am still not understanding the discrepancy. Which part of my last post would you consider to be incorrect?

            Or, are you asking that NinjaTrader changes the expected behavior and to only calculate PnL from flat to flat without consideration of scale in/scale out orders?

            Comment


              #7
              Yes Patrick, the later- flat to flat calcs as an overall winning or losing trade. You see that partials skew the results and render the results as erroneous, right? You might as well save on program size and delete the entire record keeping code if you're not going to do it right.
              Last edited by bortz; 10-27-2017, 09:06 AM.

              Comment


                #8
                Thanks for the feedback.

                I'll submit a feature request to have flat-to-flat calculations as an option. I'll update this thread when I receive a tracking number.

                EDIT: the tracking number is SFT-2785
                Last edited by NinjaTrader_PatrickG; 10-30-2017, 06:39 AM.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by algospoke, Yesterday, 06:40 PM
                2 responses
                19 views
                0 likes
                Last Post algospoke  
                Started by ghoul, Today, 06:02 PM
                3 responses
                14 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by jeronymite, 04-12-2024, 04:26 PM
                3 responses
                45 views
                0 likes
                Last Post jeronymite  
                Started by Barry Milan, Yesterday, 10:35 PM
                7 responses
                20 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by AttiM, 02-14-2024, 05:20 PM
                10 responses
                181 views
                0 likes
                Last Post jeronymite  
                Working...
                X