Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Booking in second timeframe doesn't vary with period value

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

    Booking in second timeframe doesn't vary with period value

    I created a multiframe strategy where I book trades on the second period, for example, of type Second, value 1. I made the period value a variable parameter. When I test this strategy in SA I get different results depending on the period value, however when I test it in Market Replay (x500) the results are all the same. Is this intentional or is it a bug? Strategy attached.
    Attached Files

    #2
    nailz420, yes I would expect that outcome - in Market Replay the full intrabar formation is available so you'll be always executing on the 1 tick level.

    Comment


      #3
      Hi Bertrand,

      I want to make sure you understand my question. I vary the bars period on which I am booking trades, but whether it's 1 or 200 seconds the trades get booked the same. I expect that if the period is 200 seconds, then the trade would get booked at the open of the next 200 second bar.

      Comment


        #4
        Thanks, yes understood - in Market Replay I would expect those results. For back-testing the variation would be seen, as it depends to which series you submit for an intrabar fill simulation.

        Comment


          #5
          Sorry, I am not sure if you agree or disagree with me.

          Originally posted by NinjaTrader_Bertrand View Post
          Thanks, yes understood - in Market Replay I would expect those results.
          - what do you mean by "those" results? Trades booked at different times depending on the period length against which the trade was booked or trades booked at the same time regardless of the period length?

          For back-testing the variation would be seen, as it depends to which series you submit for an intrabar fill simulation.
          - Could you please take a look at my example strategy that I created and attached to my post to demonstrate this test case? I want to make sure we're on the same page.

          What I want to be able to do here is have a controlled delay before the trade is booked. So if I submit a trade against a 5 second period, I want the trade to book after at least 5 seconds have elapsed.

          Thanks,
          Tim

          Comment


            #6
            Tim, what I meant was: I would expect the differences you saw in your first post - you do not introduce any delay here with the code you have, as it's the same series in realtime you submit to - you have not coded in to wait for a bar update on the smaller series and only then submit.

            Comment


              #7
              Originally posted by NinjaTrader_Bertrand View Post
              you have not coded in to wait for a bar update on the smaller series and only then submit.
              Could you point me to a post or documentation which would give me a hint on how to code it to wait for the bar update on the secondary series?

              Thanks,
              Tim

              Comment


                #8
                Tim, would not have a sample or post to refer you to unfortunately. You would be looking into creating for example a flag that allows to enter in BIP0 and then you would monitor for a bar update in your BIP3 (or whatever series you wish) and then Enter if the flag permits and reset it's state.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                656 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                370 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                109 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                574 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                577 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X