Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting does not consider last day

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

    Backtesting does not consider last day

    Hi

    I backtested my strategy and I know that it produces a signal with Friday's quotes, but no order is placed. Friday's quotes are in the database. I understand that in the backtesting no order is executed, because this will only happen with next day open quote, but it should submit an order, no?

    thanks & regards
    Andre

    #2
    Hello,

    If you get a signal on the last bar of the previous day it will submit the order on the follow day's first bar. Check your options in Tools>options>Strategies>Ninjascript.
    Also, when attaching the strategy to the strategy tab be sure to check the Time Fram, Order Handling, and Order Properties settings. Please visit these two links:

    DenNinjaTrader Customer Service

    Comment


      #3
      thanks.
      Do I understand right: There is no way to see whether the strategy generated on the last available day a signal? (e.g: If last Friday a signal was produced and the order on Monday would be submitted, I cannot see anything now at Sunday)

      regards
      Andre

      Comment


        #4
        Hello,

        More accurately, it is to the bar (not day). When a trade is triggered it executes on the next BAR. Whenever that next bar comes, it will execute. I can't say what day or anything but the next bar.

        Are you excluding weekend data in your backtest?
        DenNinjaTrader Customer Service

        Comment


          #5
          hi

          ok, clear about the bars (forgot about that).
          I am testing only with working days data. The problem is, that I cannot see whether a trade was triggered or not, if it was triggered on the last available bar. I can see it only on the next bar.

          regards
          Andre

          Comment


            #6
            Andre,

            Please put your strategy onto a chart and then run it with CalculateOnBarClose = false. You will see the calculations on the last day now too.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              thanks, I will test it as soon I can simulate this situation.
              I wanted to do it by deleting quotes this week from the db. But somehow it does not delete it. Another strange thing: Now we have 08:30 NY Time, but I have quotes for today 13.05.2010. How possible? I have yahoo as connection.

              Comment


                #8
                How were you attempting to delete historical data from the DB? As you were disconnected via the Tools > Historical Data > Delete command?

                Yahoo quotes are simulated realtime feeds, you can set the market data request interval in the account connection for it.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  I tried to delete when i am connected. When I test it being disconnected, it works, thanks.

                  What still is strange: Why are there quotes at 08:30 when on yahoo no quotes are available?

                  Comment


                    #10
                    Hi Beuregard,

                    This is the nature of the feed. When looking at Intraday yahoo charts it will update with the most recent price available and time stamp according to your local PC clock.

                    If you want actual intraday stock charts, consider using one of our other providers. Can see the full list at the link below:
                    Ryan M.NinjaTrader Customer Service

                    Comment


                      #11
                      yes, I understand this. At 08:30 the last available price is from the day before, but it showed me other numbers

                      Comment


                        #12
                        Unfortunately, this is the nature of the yahoo feed. It is not to be used as an intraday alternative at all.
                        Ryan M.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by benmarkal, Yesterday, 12:52 PM
                        3 responses
                        22 views
                        0 likes
                        Last Post NinjaTrader_Gaby  
                        Started by helpwanted, Today, 03:06 AM
                        1 response
                        16 views
                        0 likes
                        Last Post sarafuenonly123  
                        Started by Brevo, Today, 01:45 AM
                        0 responses
                        11 views
                        0 likes
                        Last Post Brevo
                        by Brevo
                         
                        Started by aussugardefender, Today, 01:07 AM
                        0 responses
                        6 views
                        0 likes
                        Last Post aussugardefender  
                        Started by pvincent, 06-23-2022, 12:53 PM
                        14 responses
                        244 views
                        0 likes
                        Last Post Nyman
                        by Nyman
                         
                        Working...
                        X