Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Mae

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

    #16
    Originally posted by NinjaTrader_ChelseaB View Post
    Hello sledge,

    It may be the database is corrupt.

    Shutdown NinjaTrader

    The database is located in:
    Documents\NinjaTrader 8\db\NinjaTrader.sdf

    Rename this to NinjaTrader.old.sdf.
    I'm about 6 months in on this replay, (1st half of 2014), and the Trade Performance looks correct for that trade. (It is no longer split out, and reports "20.00").

    So if it is the database that is corrupt - how does one determine? Is it because I've been upgrading for quite a few versions?

    I'll run another Trade Performance when this replay is complete.

    Comment


      #17
      Hello sledge,

      If exits are paired with other exits, this may be a sign of a corrupted database (meaning out of order trades).

      If there is a trade missing or entered wrong, this can cause any orders after that point to be mismatched.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #18
        Originally posted by NinjaTrader_ChelseaB View Post
        Hello sledge,

        If exits are paired with other exits, this may be a sign of a corrupted database (meaning out of order trades).

        If there is a trade missing or entered wrong, this can cause any orders after that point to be mismatched.
        I ran the trade performance report this morning when the replay was finished.

        It was as before (yesterday, broken). The trades are split out.

        So removing not an option.

        I'll run a shorter replay and see if there is a point when it does break. (I now suspect replay finish).

        Comment


          #19
          Hello sledge,

          May I confirm you have renamed the database first?

          Are there still trades where an order named 'Stop loss' is matched with an order named 'Profit target'?

          Do you have entry orders that are named 'Stop loss'?
          Chelsea B.NinjaTrader Customer Service

          Comment


            #20
            Originally posted by NinjaTrader_ChelseaB View Post
            Hello sledge,

            May I confirm you have renamed the database first?

            Are there still trades where an order named 'Stop loss' is matched with an order named 'Profit target'?

            Do you have entry orders that are named 'Stop loss'?
            1) Yes

            2) No?

            3) No.

            Comment


              #21
              Originally posted by NinjaTrader_ChelseaB View Post
              Hello sledge,

              If exits are paired with other exits, this may be a sign of a corrupted database (meaning out of order trades).

              If there is a trade missing or entered wrong, this can cause any orders after that point to be mismatched.
              I have reproduced the issue with a clean strategy and downloaded data from your replay servers.

              Download ES03-18 for 02/09/2018. (This is the only day I found in the last 3 weeks for this generic strategy which has nothing to do with my code. ),

              I even removed my .sdf and did a clean test from scratch.

              Just open 1 chart of ES03-18 and ATTACH THE STRATEGY to the CHART. I had on chart trader - hidden for this test, but I don't think that matters.

              Strategy Performance is definitely reporting correctly, while Trade Performance is not.

              This throws off Summary Statistics such as AVG MAE/MFE/ETD.

              This was on another machine with Windows 10 Pro 64 bit, 64 bit NT 8.0.12.0.

              I suspect this problem has always been in Trade Performance results.
              Attached Files

              Comment


                #22
                Hello sledge,

                I am focusing on the previous orders that shows the entry name as "Stop loss" and the exit name as "Profit target.

                Is this still occurring?

                May I have a screenshot of this?


                The orders shown in your most recent post appear to be paired correctly.

                Which of these orders in your new screenshot is showing an invalid MAE?

                Have you checked to see if these are part fills?
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #23
                  Originally posted by NinjaTrader_ChelseaB View Post


                  The orders shown in your most recent post appear to be paired correctly.

                  Which of these orders in your new screenshot is showing an invalid MAE?

                  Have you checked to see if these are part fills?
                  The trade performance shows 4 trades, while strategy performance shows 3 for the exact trade shown in the screenshot. . This cannot be.

                  When looking at analysis in each, the total mae/mfe is not the same in each report because it is sourcing from this trade tab.

                  This doesn't happen all the time. Some time they match.

                  Have someone else run the strategy with the instructions below and you'll see how it's wrong.

                  Run for 2 days. The day before will match until you hit this day.

                  Comment


                    #24
                    Hello sledge,

                    It is expected that a part filled order will show as separate trades on the chart and in any performance report (but will show as one order on the Orders tab of the Control Center).

                    I have calculated the MAE for each part fill in your screenshot and the MAE is calculating correctly for each of these.

                    The MAE is not the same because the quantity for each part fill and the price for each part fill is not the same.


                    Which of the part fills has the MAE calculated incorrectly?

                    May I confirm that you have added prints to the script to ensure these are not part fills?

                    Are we no longer focusing on the trade that had an order named 'Stop loss' paired with an order named 'Profit target'?
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #25
                      Originally posted by NinjaTrader_ChelseaB View Post
                      Hello sledge,

                      It is expected that a part filled order will show as separate trades on the chart and in any performance report (but will show as one order on the Orders tab of the Control Center).

                      I have calculated the MAE for each part fill in your screenshot and the MAE is calculating correctly for each of these.

                      The MAE is not the same because the quantity for each part fill and the price for each part fill is not the same.


                      Which of the part fills has the MAE calculated incorrectly?

                      May I confirm that you have added prints to the script to ensure these are not part fills?

                      Are we no longer focusing on the trade that had an order named 'Stop loss' paired with an order named 'Profit target'?
                      Of course if you total it up if will calculate properly, but that doesn't mean it is correct.

                      The only thing I have to go on is the chart, which did show part fills , BUT MATCHES THE STRATEGY PERFORMANCE ONLY.

                      The trade performance is incorrectly reporting a part fill that NEVER happened.
                      Attached Files

                      Comment


                        #26
                        Hello sledge,

                        Thank you for your response.

                        My test of your strategy on the Replay data in Playback for the 9th of February on the Es 03-18 15 second chart did not produce the same result as your test. Please refer to my screenshot.

                        I used historical data from the 1st of February to the 8th and then Playback data for the 9th. You tested with a new database, correct? Have you also attempted new Replay data and Historical data?

                        I look forward to your response.
                        Attached Files

                        Comment


                          #27
                          Originally posted by NinjaTrader_PatrickH View Post
                          Hello sledge,

                          Thank you for your response.

                          My test of your strategy on the Replay data in Playback for the 9th of February on the Es 03-18 15 second chart did not produce the same result as your test. Please refer to my screenshot.

                          I used historical data from the 1st of February to the 8th and then Playback data for the 9th. You tested with a new database, correct? Have you also attempted new Replay data and Historical data?

                          I look forward to your response.
                          Yours and mine entry exit times aren't even near the same.

                          The entry prices are off by a lot also. I know the market is volatile but 40 ES points in a second?

                          So it looks like we are looking at 2 different things still.

                          I'm on EST time.

                          I'll make a video this weekend.

                          P.s I'm also on @sim license, with no historical data.

                          The data was downloaded from market replay download. Es 03-18 folder was new. I only have ^Vix and es ##-## folders which I was not using in a chart.

                          Comment


                            #28
                            Originally posted by NinjaTrader_PatrickH View Post
                            Hello sledge,

                            Thank you for your response.

                            My test of your strategy on the Replay data in Playback for the 9th of February on the Es 03-18 15 second chart did not produce the same result as your test. Please refer to my screenshot.

                            I used historical data from the 1st of February to the 8th and then Playback data for the 9th. You tested with a new database, correct? Have you also attempted new Replay data and Historical data?

                            I look forward to your response.
                            Yeah after reviewing the chart, we are off by 2 hours.

                            It doesn't happen every trade like this - but it will happen a lot.

                            Your trades show at my 12:00PM EST, so 2 hours late.

                            I changed the code to run 2 hours earlier and it's called strategy1TIMEZONE.
                            Attached Files

                            Comment


                              #29
                              Hello sledge,

                              Thank you for your response.

                              The timezone difference makes sense, I am two hours behind EST.

                              Concerning the data please detail the Playback data you downloaded and when you begin the playback. So I need the start day and end day for the data you download and what day you begin playback on.

                              I look forward to your response.

                              Comment


                                #30
                                2/9 should work, default at midnight through whenever.
                                Attached Files

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Javierw.ok, Today, 04:12 PM
                                0 responses
                                4 views
                                0 likes
                                Last Post Javierw.ok  
                                Started by timmbbo, Today, 08:59 AM
                                2 responses
                                10 views
                                0 likes
                                Last Post bltdavid  
                                Started by alifarahani, Today, 09:40 AM
                                6 responses
                                40 views
                                0 likes
                                Last Post alifarahani  
                                Started by Waxavi, Today, 02:10 AM
                                1 response
                                18 views
                                0 likes
                                Last Post NinjaTrader_LuisH  
                                Started by Kaledus, Today, 01:29 PM
                                5 responses
                                15 views
                                0 likes
                                Last Post NinjaTrader_Jesse  
                                Working...
                                X