Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

FTOB in backtest of MTF strategy with 1 Tick Bars Object

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

    FTOB in backtest of MTF strategy with 1 Tick Bars Object

    Hello!

    I try to backtest my stratgey with intrabar granularity by adding a 1 Tick secondary bars object to my 5 minute base TF. My sell stop entry order was sent at bar close (of the base TF) 1 tick below the low of the bar.I did this error message:

    **NT** A SellShort stop order placed at '2013-11-06 18:00:00' has been ignored since the stop price is greater than or equal to close price of the current bar. This is an invalid order and subsequent orders may also be ignored. Please fix your strategy.
    The reason seems to be that the next bar (after the bar where the order was sent) opened 1 Tick lower. So there was a 1 Tick "opening gap" between the bars in the base TF. So the stop order price was compared to the market price 1 tick ahead in the future.

    When I checked the value for the secondary 1 Tick TF in BIP0 with Closes[1][0], it corresponded to the value for the FTOB of the next bar in base TF. Is this expected?

    I ask, because I was under the impression that BIP 0 always closes before BIP 1 on the same time stamp, (since BIP0 is called before BIP1) ? If my secondary bars object would have been the 1 minute TF, then Closes[1][0] in BIP0 wouldn't match the open of the next bar, would it?

    Is BIP1 treated the same way in Backtest and Market Replay with COBC?

    Regards,
    poseidon_sthlm
    Last edited by poseidon_sthlm; 03-24-2015, 06:51 AM.

    #2
    Hello Poseidon,

    Thank you for your post.

    The bars objects will have their own call to the OnBarUpdate() independently. In the event of the timestamps sharing the same time, then the BarInProgress takes place, meaning BIP 0 will call OnBarUpdate(), then 1, 2 etc.

    If your secondary data series was a 1 minute, then both objects would have to close at the same time. Otherwise you would see 5 - 1 minute updates for every 1 - 5 minute update.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Thank for the prompt reply.

      If I have a MTF strategy with 1 Tick secondary bars object added to a 5 minute base TF, is it safe to say that I get the FTOB value for the next bar in the base TF with Closes[1][0] in BIP == 0 (with COBC == true)?

      /poseidon_sthlm

      Comment


        #4
        Poseidon,

        FTOB would be irrelevant with CalculateOnBarClose set to true. OnBarUpdate() would only get called when either data series has a new bar being created. FTOB is used when you are running CalculateOnBarClose set to false and want to know when a new bar is created.
        Cal H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        633 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        364 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        567 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        568 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X