Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ES vs MES Backtest Results MES Should Be Roughly 1/10th ES

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

    ES vs MES Backtest Results MES Should Be Roughly 1/10th ES

    Hi folks,

    Home
    See this 3 min video explaining what I mean https://www.screencast.com/t/faPvcb3P

    and

    Forum
    How could I get a copy of the code from doing a Strategy Builder so I can put it directly into the regular NinjaTrader Strategy Editor so I can edit the Strategy manually if I wanted?



    Greg

    #2
    Hello birdog,

    Thanks for your post.

    Please review the help guide document on the differences on real-time vs backtest (historical).
    http://ninjatrader.com/support/helpG...ime_vs_bac.htm

    When in historical data, only the Open, High, Low, and Close will be available and there will be no intra-bar data. This means actions cannot happen intra-bar, fills cannot happen intra-bar. All prices and actions come from and occur when the bar closes as this is all the information that is known.

    Because of this, OnBarUpdate will only update 'On bar close' as it does not have the intra-bar information necessary for 'On price change' or 'On each tick' and the script will not have the intra-bar information to accurately fill an order at the exact price and time.

    Below is a link to the help guide on Calculate.
    https://ninjatrader.com/support/help.../calculate.htm

    Additional information may be found in this NinjaTrader Forum post: https://ninjatrader.com/support/foru...mance?t=102504

    ​​To view a Strategy Builder strategy's generated syntax you could click the 'View code' button. To manually modify the strategy's code in a NinjaScript Editor window, you would need to unlock the script from the Strategy Builder using the 'Unlock code' button.

    See this help guide page about working with the Strategy Builder: https://ninjatrader.com/support/help...gy_builder.htm

    Let me know if I may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      @brandonh Thanks. If I unlock the code and edit things manually, can I still also continue editing with Strategy Builder? If there is any errors in the code after doing anything with it manually, would the Strategy Builder help clean anything up?

      Basically, just wondering if we can work seamlessly between the Strategy Builder and manual if we wanted with some strategies we are testing?



      Greg

      Comment


        #4
        Hello birdog,

        Thanks for your note.

        No, once a strategy is unlocked from the Strategy Builder you cannot use the Strategy Builder to modify the strategy. You must manually program your logic in the unlocked script using the NinjaScript Editor window (New > NinjaScript Editor).

        The Strategy Builder cannot be used to modify an unlocked script.

        If you get compile errors when manually programming your script, you would need to debug the logic you added to determine what exactly in your logic is causing the error message.

        Below is a link to a forum post that demonstrates how to use prints to understand behavior.

        https://ninjatrader.com/support/foru...121#post791121

        Let me know if you have further questions.
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment


          #5
          brandonhall Ok. So, it is best to copy the strategy first and rename in and then open it up in the NT Editor so we do not damage the original code? If that works, then we can work with that process.

          Comment


            #6
            Hello birdog,

            Thanks for your note.

            Yes, your understanding is correct. A copy of the strategy could be made and then the script can be unlocked to make changes to that copy of the strategy so that the original strategy's code is not affected.

            Let me know if I may assist further.
            <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

            Comment


              #7
              brandonhall Oh...I think we missed covering this "https://ninjatrader.com/support/forum/forum/ninjatrader-8/strategy-development/1229458-es-vs-mes-backtest-results-mes-should-be-roughly-1-10th-es#post1229458 " ... i.e. https://www.screencast.com/t/faPvcb3P The strategy is on bar close so that should not be an issue. So, I am wondering about why such a difference in backtesting with NQ vs. MNQ and ES vs. MES. It should be about 1/10th the results of the minis in general. How can I either fix it or should I just trust the NQ and ES and reduce results down to about 1/10th if I assume MES or MNQ? It looks like there is some kind of issue with MES and MNQ backtesting.

              FYI, When I run the same strategy on NQ and ES alongside MES and MNQ they enter and exit at the exact same time so it looks like in realtime they are taking the exact same trades generally.

              Thanks for any info you can send or bring to light on the backtest differences here as the MES and MNQ should be about 1/10th the results of the minis and not so far off per the video like it is.

              Just trying to understand the reasons and why on the backtest.



              Best,

              Greg

              Comment


                #8
                Hello birdog,

                To know why the results are different or outside of your expectation would require looking at the executions between the tests. The results view is built based on the execution information. You would have to compare some trades between the tests to better understand what kind of difference you are seeing on the individual trade level, from that observation you could see if its roughly 1/10th. You could also see how similar the historical trades are to know if the results should be similar enough to know if the totals should be 1/10th the amount.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by NullPointStrategies, Yesterday, 05:17 AM
                0 responses
                62 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                134 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                75 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                45 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                50 views
                0 likes
                Last Post TheRealMorford  
                Working...
                X