Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting Algorithm

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

    Backtesting Algorithm

    Hi....a question.
    I have a strategy with a profit target of 96 & a trailing stop of 26.
    During backtest there is a trade within a single one hour bar with OHLC of 13506, 13550, 13469 & 13460.
    The trade enters at 13506 as expected, but there is a trailing stop executed at 13495.
    I don't understand how this could be correct ?!?!?!
    There are many examples of this during the backtest results.

    Also, is it not possible in backtest mode to have more than one trade per bar?

    many thx
    David

    #2
    apologies - should have said that this is a SHORT strategy. thx

    Comment


      #3
      >> The trade enters at 13506 as expected, but there is a trailing stop executed at 13495.
      What is the problem with that? Note: backtest fills could be outside the OHCL range of a bar, dependent on your fill logic. Please search for "liberal" in the help guide to get more information on that.

      >> Also, is it not possible in backtest mode to have more than one trade per bar?
      Unfortunately no.

      Comment


        #4
        the reason why i would think it is a problem is that the trailing stop is 26 yet the open price/order entry price (13506) rises to a high of 13550 (& does not get stopped out) to eventually give a trailing stop at 13495. But you say that even though it states an entry price of 13506, the actual fill could be outside the OHLC range?

        I will read more in the help guide later. thx. David

        Comment


          #5
          >> the actual fill could be outside the OHLC range
          correct

          Comment


            #6
            The low of the bar is 13469 (+ 26 for the trailing stop since you are short) and you get a price of 13495 which is withing the bar and therefore the order is filled.
            RayNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ETFVoyageur, 04-30-2024, 02:04 PM
            13 responses
            108 views
            0 likes
            Last Post ETFVoyageur  
            Started by Skifree, Today, 11:21 AM
            1 response
            2 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by Vulgoth_t_Destroyer, 05-09-2022, 04:45 PM
            52 responses
            5,265 views
            0 likes
            Last Post olivierh  
            Started by ssijbabu, 10-07-2012, 07:10 AM
            6 responses
            4,430 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by iceman2018, Today, 10:39 AM
            1 response
            3 views
            0 likes
            Last Post NinjaTrader_Erick  
            Working...
            X