Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Orders being executed outside the chart when backtesting

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

    Orders being executed outside the chart when backtesting

    I was trying to figure out why my back testing results were so different from my live results, then I noticed a lot of my backtest positions are being opened outside of the chart (usually 3-4 pips below the low of the candle). I provided a screen shot for example. I am just opening up long positions using Ask data, so I wouldn't think it would be a spread issue. Any ideas or suggestions?


    Thanks
    Attached Files

    #2
    Hello smoky1930,

    Thank you for your post and welcome to the NinjaTrader Support Forum!

    What order type is used for these entries?
    In the Strategy Analyzer parameters for the test what is your Historical Fill Type and Slippage set to?

    I look forward to your response.

    Comment


      #3
      Originally posted by smoky1930 View Post
      I was trying to figure out why my back testing results were so different from my live results, then I noticed a lot of my backtest positions are being opened outside of the chart (usually 3-4 pips below the low of the candle). I provided a screen shot for example. I am just opening up long positions using Ask data, so I wouldn't think it would be a spread issue. Any ideas or suggestions?


      Thanks
      Look in the execution tab. Did the trade really happen at 3:01? or 2:40 ?

      Comment


        #4
        Originally posted by NinjaTrader_PatrickH View Post
        Hello smoky1930,

        Thank you for your post and welcome to the NinjaTrader Support Forum!

        What order type is used for these entries?
        In the Strategy Analyzer parameters for the test what is your Historical Fill Type and Slippage set to?

        I look forward to your response.
        Thank you for the response,
        They are market orders. Fill type is set to default, and slippage is set to 0.

        Originally posted by sledge View Post
        Look in the execution tab. Did the trade really happen at 3:01? or 2:40 ?
        According to the executions, it did really happen at 3:00.
        Attached Files

        Comment


          #5
          Originally posted by smoky1930 View Post
          Thank you for the response,
          They are market orders. Fill type is set to default, and slippage is set to 0.



          According to the executions, it did really happen at 3:00.
          I'm looking at ThinkOrSwim onDemand for AUD/NZD at this hour 03:00 and examining the ASK price.

          It looks to me like your ninja CHART is off 1 hour for whatever reason.

          The 02:00am should be 03:00am, and your trades would make sense.

          I'm in EST timezone. Do you have daylight savings time turned on/off on your local PC?

          Comment


            #6
            On a hunch, I added a DrawLine from the high to low on each bar, and here is what I got. This is very strange, it is almost like our orders are being executed on the bid price, but the chart is showing the ask price.
            Attached Files

            Comment


              #7
              Hello smoky1930,

              Thank you for your response.

              The executions for the currency pairs would occur at the Bid Price.

              Comment


                #8
                Originally posted by NinjaTrader_PatrickH View Post
                Hello smoky1930,

                Thank you for your response.

                The executions for the currency pairs would occur at the Bid Price.
                I thought long orders were executed on the Ask price. While Shorts were on the Bid price?

                Comment


                  #9
                  Originally posted by smoky1930 View Post
                  On a hunch, I added a DrawLine from the high to low on each bar, and here is what I got. This is very strange, it is almost like our orders are being executed on the bid price, but the chart is showing the ask price.
                  The bid price at 03:00 am is 1.0786, which is off your chart at 02:00am.

                  Comment


                    #10
                    Originally posted by smoky1930 View Post
                    I thought long orders were executed on the Ask price. While Shorts were on the Bid price?
                    You are off by 1 hour. Check your other trades.

                    Comment


                      #11
                      Originally posted by sledge View Post
                      You are off by 1 hour. Check your other trades.
                      I am in Central time zone, so I am an hour off from you.

                      Comment


                        #12
                        Originally posted by smoky1930 View Post
                        I am in Central time zone, so I am an hour off from you.
                        The trade belongs on the chart over here.

                        Or your chart needs shifted +1
                        Attached Files

                        Comment


                          #13
                          Originally posted by sledge View Post
                          The trade belongs on the chart over here.

                          Or your chart needs shifted +1
                          I can't seem to find how to do that, could you point me in the direction?
                          I did try changing my timezone to eastern and rebuilding my historical data, and while I am seeing the executions in different locations now, I am still seeing the same phenomena.

                          Thanks
                          Attached Files

                          Comment


                            #14
                            Hello smoky1930,

                            Thank you for your response.

                            You are correct, executions to sell are at Bid and executions to buy are at Ask. I am not sure what is occurring here on your charts, but your system time should match your data from your data feed provider. Can you send your database file to support[at]ninjatrader[dot]com with 'ATTN: Patrick - 1080870' in the subject line?

                            You can do this by going to the Control Center-> Help-> Mail to Support-> ensure the Database option is enabled.

                            Comment


                              #15
                              Originally posted by NinjaTrader_PatrickH View Post
                              Hello smoky1930,

                              Thank you for your response.

                              You are correct, executions to sell are at Bid and executions to buy are at Ask. I am not sure what is occurring here on your charts, but your system time should match your data from your data feed provider. Can you send your database file to support[at]ninjatrader[dot]com with 'ATTN: Patrick - 1080870' in the subject line?

                              You can do this by going to the Control Center-> Help-> Mail to Support-> ensure the Database option is enabled.


                              I sent the database, Thank you.

                              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