Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Prices not rounded in backtest results

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

    Prices not rounded in backtest results

    I just ran a backtest, and in the Strategy Analysis trade window the prices are often not rounded to the ticks, e.g. for EURUSD forex:

    1.03475
    1.027453102
    1.029395636
    1.03175
    1.029167089
    1.0269485
    1.022742568

    I haven't checked if this rounding error occurs before or after the statistics based on these prices are calculated. Hopefully afterwards.
    Last edited by adamus; 04-16-2010, 05:47 PM.

    #2
    adamus, which instrument is this for? Is it reproducible? If so, can you send us your strategy and let us know exactly how to re-create these non-round values?
    AustinNinjaTrader Customer Service

    Comment


      #3
      Hi Austin,

      it's the EUR.USD forex pair. The results are the backtest of my strategy, which has the settings:

      Code:
      [FONT=Courier New]Item                    Value
      "Parameters"    
      Param1                  1
      Param2                  1
      "Data series"    
      "Price based on"        Last
      "Type"                  Minute
      "Value"                 60
      "Time frame"     
      "From"                  01/01/2000
      "To"                    17/04/2010
      Session template        <Use instrument settings>
      General    
      Include commission      False
      Label                   TrendFollower
      Maximum bars look back  TwoHundredFiftySix
      Min. bars required      55
      Historical Fill Processing    
      Fill type               Default
      Slippage                0
      Order Handling    
      Entries per direction   1
      Entry handling          AllEntries
      Exit on close           True
      Order Properties    
      Default quantity        100000
      Set order quantity      by default quantity
      Time in force           Day[/FONT]
      The strategy is attached as a file - unfortunately it is not profit-making so it is only of interest due to its ability to produce this bug in 7-beta.
      Attached Files

      Comment


        #4
        adamus, sorry I forgot to ask this in the first post, but who is your data provider? I will try this with the data I have available and see if I can reproduce.

        As a side note: it would probably be much faster and easier for you if you just took a screenshot of the settings in the future instead of typing it all out.
        Last edited by NinjaTrader_Austin; 04-18-2010, 12:57 PM.
        AustinNinjaTrader Customer Service

        Comment


          #5
          Just finished up a test with eSignal data but I was unable to reproduce the non-rounded prices. Are those prices the actual prices reported by your data provider? If so, that would be why they aren't rounded.
          AustinNinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_Austin View Post
            Just finished up a test with eSignal data but I was unable to reproduce the non-rounded prices. Are those prices the actual prices reported by your data provider? If so, that would be why they aren't rounded.
            This is a backtest against data I imported into NT myself.

            There is no way that such prices came from that data, which is totally clean in this respect.

            These prices are obviously the un-rounded moving average values which I pass into the limit and stop orders. Surely NT is rounding them when it creates the order?

            Comment


              #7
              adamus,

              Please check into if you are getting partial fills. If you are, the displayed average price is average amongst your fills and can show like that.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                Hi Josh,

                I'm not getting any partial fills - this is backtesting! I just checked the executions. For instance the sixth execution I get when I run it from 2001-01-01 is 2001-01-15 03:00 @ 0.9471.

                However the trade then shows the exit price as 0.947112975 (the previous 5 executions were all accurate).

                Also the commission is incorrect, if that perhaps has anything to do with it. It should be $5 commission but it shows only $3.50 has been subtracted from the profit.

                Comment


                  #9
                  adamus,

                  Please try this with SampleMACrossOver and see if you experience the same. If so, please provide us with all information on how you have your commission structure setup as well as the order quantity you are sending at. We will also need screenshots of the orders and trades tabs to see what exactly you are seeing. Thanks.
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #10
                    Originally posted by adamus View Post
                    Surely NT is rounding them when it creates the order?
                    Just wanted to chime in real quick and answer this un-answered question. Yes, NT does round the price before sending the order.
                    AustinNinjaTrader Customer Service

                    Comment


                      #11
                      I ran a backtest with SampleMACrossover and it didn't show any unrounded characters.

                      So it is only with my strategy.

                      The commission is set up as 2.50 minimum and then 2*-5 : 0

                      Here are the attachments.
                      Attached Files

                      Comment


                        #12
                        Please find my results with SampleMACrossOver in the attachments. In Tools>Options>Data I have the quote currency set to Pip. Can you please try this on your end too?

                        Also, I did not quite follow what you mean by 2*-5 : 0 for commissions. Can you please clarify?
                        Attached Files
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #13
                          Hi Josh,

                          I was quite surprised when I ran the SampleMACrossover strategy and didn't get any un-rounded prices.

                          I checked my Options and set the setting to Pips - it was on half-pips due to the recommendations when loading the data I bought - but it made no difference to the un-rounded occurrences (still frequent).

                          The 2*-5 : 0 is what is displayed in the properties for the instrument in the commissions tab: the commission is 0.00002 per currency unit. The zero is for units at that level.

                          Comment


                            #14
                            adamus, would it be possible for you to send us your data? If it is a huge data file, could you find the shortest backtest time-span that produces the un-rounded prices and then just send us just that portion of the data?

                            We would like to investigate this further and have been unsuccessful so far with the data we have.

                            EDIT: You can send it to support at ninjatrader dot com attn 'thread 28118, ticket 306645'. Thank you.
                            AustinNinjaTrader Customer Service

                            Comment


                              #15
                              Hi Austin,

                              I'm glad you're prepared to look into it.

                              However I cannot get the data out of the Historical Data Manager. The export button is permanently greyed-out. What can I do to get it enabled?

                              The data files which I loaded are from disktrading.com and the files are huges - the smallest I can find is 65MB.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              647 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              368 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              108 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              571 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              573 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X