Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trade Performance Report is wrong...

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

    Trade Performance Report is wrong...

    Started a strategy last night on a SIM account... but when I look at the trade executions and performance report it .is a mess of errors.

    First... my strategy is a basic buy/sell on crossover. If I am long, I switch to short and vice versa. I should always have either 1 long or 1 short position. Caveat... Exit on Close sort of messes with my view of the world, but, read on...

    I was long, had Exit on Close configured... and it triggered as expected. Fine... but look at the reports! Badly confused. Now... my strategy re-entered prior to the session end (I need to fix that...) but, surely the data reported is regardless of this badly wrong!

    Pics attached. YM Trade is the actual trade screenshot. The others are self-explanatory.

    Regards,
    T.
    Attached Files

    #2
    Hi tgn55, thanks for your question.

    Some execution in the database is throwing off the execution pairing. Executions can be added and removed to and from the database manually by the user, or an execution was removed in some other way.

    If you test the SampleMACrossover strategy on the same data set does the problem still occur?

    The most straight forward way to resolve this would be to repair the database and test, if that doesnt help make a brand new database. If you get the same problem with a new database I would need to test your strategy on my computer to see if I can re-create the problem, then I can look into resolving the issue from there.

    To repair your database:
    • Disconnect NinjaTrader from any open connections via Control Center > Connections > Disconnect
    • From the NinjaTrader Control Center window select the menu Tools > Database Management
    • Click on 'Repair DB'
    • Press the "Repair" button
    To reset your database:
    • Disconnect NinjaTrader from any open connections via Connections > Disconnect
    • From the NinjaTrader Control Center window select the menu Tools > Database Management
    • Press "Reset DB"
    • Check Historical Orders to remove historical orders
    • Check Historical Trades to remove historical trades
    • Press the "Reset" button
    I look forward to hearing of your results.

    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Chris can you please provide some pointers as to how to manually add/remove executions? I did NOT do this... yet the system seems really scrambled. Further evidence of this.. if I run Trade Performance on my live accounts (not SIM), firstly starting on 21/4 and then on 22/4 ... I get COMPLETELY different trades, P/L etc. I am fairly sure it has something to do with a trade execution gone missing somehow, as the trade sequence is just scrambled in one instance... and not in the other. By scrambled I mean... it should go long/short/long etc, alternating, as the strategy is basically a modified crossover. However... in one of the Performance reports, I see a whole string of consecutive Longs... This did NOT happen!

      So many hours trying to reconcile NT's financials...

      Regards,

      Comment


        #4
        Hi tgn55, thanks for your reply.

        From the Strategy Performance report, you can right-click on the Executions list and add/remove executions. This is not done normally so I assumed that is not the problem.

        I ran the SampleMACrossover strategy as a test and got these results:
        https://clauber.tinytake.com/tt/NDIzODE4NV8xMzI1MzUyNA

        Do you get similar results if you run the SampleMACrossover?

        I look forward to hearing from you.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Chris, thanks for the input... but running SampleMA doesn't help.

          I think I might have a handle on what is causing the issue, but first let me reiterate the circumstances.
          1. These are live trades on a real account... not a back-test, not a SIM... the real deal. The executions/trades are for real. So... adding/deleting trades really is not a good plan.
          2. My strategy is as said before, an MA crossover (with some extra smarts)... but, in essence, I expect to see the same pattern of long/short/long as SampleMA generates. My entry signals are either LE or SE... go figure ;-)
          3. I have ExitOnSessionClose set, otherwise my strategy runs 24x5

          OK... So, ran it for a few days... now, I wanted to review my actual performance
          Starting the Trade Performance on 21st gives kosher results. First trade reported was a short entry, everything is fine after that... including the trades that were entered on the 22nd.
          Start the Performance report on the 22nd... and it goes seriously pear-shaped. And maybe the reason is... because the first EXECUTION picked up by the report commencing April 22 is.an EXIT... not an Entry.

          I've attached screenshots of both... having scrolled to the point just before the trades the 22nd are shown .
          You can see the report that started on 21st looks exactly as expected.
          The report starting on 22nd is completely screwed up.

          It seems to me what is needed is some additional logic in the code that generates the TRADES report... which should SKIP the first execution if it is an Exit... and start proceedings with the first Entry in the selected period. Otherwise... well, you get utter rubbish.

          Hope this clarifies it. I believe it's a bug in the Trades Performance reporting system, rather than my data being corrupted (which I did wonder earlier)

          Look forward to your comments..
          Cheers,
          T.
          Attached Files

          Comment


            #6
            Hi tgn55, I appreciate the explanation.

            Its just the way trade pairing is working. It starts with the first execution and pairs it with the next one to make a trade. Start the report from a time you know the account was flat so that this won't happen. There's a feature request to add the ability to customize the time along with the date for the performance report: ID# SFT-658 I will add a vote to this for you.

            Thanks in advance for your patience.
            Chris L.NinjaTrader Customer Service

            Comment


              #7
              Yeah I get it... I can see that's what causes the issue... and since a trade should NEVER start with an exit...the code should fix this - not rely on the user messing about with report start time, surely.

              I appreciate your raising a new feature request... but surely this warrants raising a bug ticket... not a new feature?
              Should not be a difficult code change... just commence trade pairing with an ENTRY..

              Further... I don't believe customising the start time actually solves the issue... here's why.

              I showed you my trades on GC. But I had my strategy running on a few instruments.
              My GC executions; from the 22nd, started out with an exit. Not good... so, your suggestion is to move the start time. Well, maybe that might fix the GC trades, albeit at some inconvenience.

              BUT... I had the SAME issue bite with trades on YM. The "don't make 'trades' starting with an exit" thing needs to be applied per instrument!
              So... even if I tweaked the start time for my GC trades... I'd STILL get nonsense reports for my YM trades, which of course had different entry/exit times.

              You need to fix the problem at it's source.. not mess with bandaids. And that means... PER INSTRUMENT... start trades with an entry, not an exit. No matter what time the report starts.

              I hope that makes sense... and will guide the developers to implementing the fix in the right manner.. so the issue NEVER arises in ANY circumstance!

              Cheers,
              T.
              Last edited by tgn55; 04-25-2020, 10:39 PM.

              Comment


                #8
                The pairing problem is long known. Request for a fix is logged as a Feature Request because it works as coded thus the ubiquitous Expected Behaviour. When was SFT-658 started? Go search the 7 Forum...........

                Comment


                  #9
                  Hi,
                  This is so sad. NinjaTrader could be such a nice piece of software, if only ...
                  It seems as if NinjaDevelopers don't trade themselves using Ninja. Otherwise, such obvious nonsense, which clearly is a bug, would be fixed.
                  It works as coded? Expected behaviour? Voting for such items? Come on Ninja! Take some pride in your software and get it done.
                  NT-Roland

                  Comment


                    #10
                    Thanks Bruce and NT_Roland for your supportive posts!

                    Come on Ninja indeed.. why should the user population have to put up with this after so many years!

                    It is clear it is just broken. Starting "Trades" with an EXIT ??? Seriously Ninja staff... please, fix it.. or go on public record stating that Ninja believes it is just fine to start reported TRADES with an EXIT. Sheesh...

                    T.

                    Comment


                      #11
                      I have experienced the same thing many many times and this problem hasn't fixed for many years, trade performance is really important for traders to analysis their trades and makes changes, but with this inaccurate trade history it's just making things worse

                      Comment


                        #12
                        Agreed.

                        What I find extremely frustrating is... the solution is fairly obvious! just skip over an "initial, ie first one encountered in the reporting period", exit... then... none of this would be an issue. Trade pairing problems would (I think) be a thing of the past.

                        Developers... here's an alternative approach... IF you get an Exit as the first execution in the requested period... maybe you could scan BACK in time to find the matching entry ?? Could present other problems... but, if you really want to report anything that happened in the selected period... there are options to "get it right", and stop creating NONSENSE reports.

                        Personally, I would be happy if the initial Exit was ignored... it probably has fewer ways to fail.

                        The Trade Performance Report engine can quite happily report ALL executions, orders etc... but a trade is different. It needs some special handling to avoid this issue.. but, it ain't that hard !!

                        Regards,
                        T.

                        Comment


                          #13
                          Have to echo the sentiments here, we rely on the trade performance report to evaluate our strategies, I hate nothing more than being half a day in and you think nothing is working with your strategy only to find its an error like this occurring. Rather than resetting the database and losing everything there should be a button to push which just deletes the last entry or creates a dummy close entry with some special ID so we can see it in the trade performance report. This should be a high priority fix above all other cosmetic changes, cmon NT serve your users please.

                          Comment


                            #14
                            Resetting the database is not the right way to address this. NEITHER IS the mentioned feature request to specify the time as well as date for the start of the report. And removing executions as suggested above? Give me a break...

                            I thought I had already provided the rationale... but I will repeat it... Ninja Support... please listen up!

                            The proposed ability to include time as well as date has a FUNDAMENTAL problem that renders it a waste of time and effort, and will I guarantee only add to further user frustration.
                            The idea seems to have been born out of thinking that the pairing issue could be solved by moving the report start time to a time when flat... and hence the first execution would be an entry... not an exit. Well... think again.

                            That approach is only certain to work IF you only have one instrument in play. If, like many traders, you have multiple trades across various instruments... there may NEVER be a time when your account is flat ON ALL INSTRUMENTS!!!

                            And so... Ninja would have us mess around, checking dates, times etc... go to the hassle of tweaking the time... only to find that another instrument now reports nonsense. COME ON NINJA !!
                            Can't you see what a dumb idea this is? And it could all be resolved by just skipping over an initial exit execution (for each instrument)... and then EVERYTHING WOULD WORK !!!

                            Repeat 10 times... ALL TRADES MUST START WITH AN ENTRY. PERIOD. NO EXCEPTIONS.

                            Please. Just fix it!

                            Also, a response from NT would be appreciated...

                            T.
                            Last edited by tgn55; 06-24-2020, 07:59 AM.

                            Comment


                              #15
                              Hello everyone,

                              Having a performance report start at a specific Start Date when we are flat is important to have trade pairing start from a flat position and generate a clean report.

                              The issue here is different though, and changing the start date for when the performance report starts would not be the solution.

                              In this case, we have executions with the same timestamp and NinjaTrader does not know which one happened first. NinjaTrader would need to record executions with millisecond granularity in order to provide a solution.

                              We have that functionality noted in a different enhancement request, and I have made sure everyone's votes here are transferred. That ticket ID is SFT-2945.

                              I'll be happy to address any other specific questions. Just let me know.
                              JimNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Kirk Thorns, Today, 05:34 PM
                              0 responses
                              4 views
                              0 likes
                              Last Post Kirk Thorns  
                              Started by JobDjassem, Today, 05:24 PM
                              0 responses
                              8 views
                              0 likes
                              Last Post JobDjassem  
                              Started by Kirk Thorns, Today, 05:06 PM
                              0 responses
                              10 views
                              0 likes
                              Last Post Kirk Thorns  
                              Started by CyberNate, Today, 03:11 PM
                              5 responses
                              29 views
                              0 likes
                              Last Post CyberNate  
                              Started by NinjaTrader_ChrisL, Today, 03:44 PM
                              0 responses
                              14 views
                              0 likes
                              Last Post NinjaTrader_ChrisL  
                              Working...
                              X