• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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?
    Patrick G.NinjaTrader Customer Service

    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, 03: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:

        https://ninjatrader.com/support/help...timization.htm
        Last edited by NinjaTrader_PatrickG; 10-27-2017, 06:31 AM.
        Patrick G.NinjaTrader Customer Service

        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?
            Patrick G.NinjaTrader Customer Service

            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, 08: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, 05:39 AM.
                Patrick G.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by pstrusi, Today, 09:06 AM
                0 responses
                1 view
                0 likes
                Last Post pstrusi
                by pstrusi
                 
                Started by vpzdcv, Today, 02:31 AM
                0 responses
                9 views
                0 likes
                Last Post vpzdcv
                by vpzdcv
                 
                Started by YevhenShynkarenko, Today, 01:22 AM
                1 response
                18 views
                0 likes
                Last Post YevhenShynkarenko  
                Started by ttodua, Today, 12:52 AM
                0 responses
                8 views
                0 likes
                Last Post ttodua
                by ttodua
                 
                Started by ttodua, Today, 12:50 AM
                0 responses
                8 views
                0 likes
                Last Post ttodua
                by ttodua
                 
                Working...
                X