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 inanazsocial, Today, 01:15 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by rocketman7, Today, 02:12 AM
            0 responses
            10 views
            0 likes
            Last Post rocketman7  
            Started by dustydbayer, Today, 01:59 AM
            0 responses
            1 view
            0 likes
            Last Post dustydbayer  
            Started by trilliantrader, 04-18-2024, 08:16 AM
            5 responses
            23 views
            0 likes
            Last Post trilliantrader  
            Started by Davidtowleii, Today, 12:15 AM
            0 responses
            3 views
            0 likes
            Last Post Davidtowleii  
            Working...
            X