Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

delayed strategy signals, signal shows 1 bar later

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

    delayed strategy signals, signal shows 1 bar later

    Hi,

    i created a simple strategy that enterlong() when the "High" of the bar goes above a certain price (super simple)

    but the order does not get placed on the bar that actually triggers the event, it keeps placing it on the bar after. The bar after just happens to gap up which means i would get a bad entry price.

    how do i make it so it buys on the bar that triggers the signal? (like real time)

    #2
    Hello pipsalottle,
    Thank you for your post.
    It sounds like you have CalculateOnBarClose set to true.
    This will calculate the strategy after the bar is closed.
    You will want to set this setting for the strategy to false.
    Please let me know if the matter persists after changing this setting.
    Cody B.NinjaTrader Customer Service

    Comment


      #3
      it doesn't seem to make a difference if i set that to false. (i'm backtesting)

      Comment


        #4
        Originally posted by pipsalottle View Post
        it doesn't seem to make a difference if i set that to false. (i'm backtesting)
        If you want to trigger trades intrabar in a backtest, you will have to use a multi-timeframe strategy, using the finer granularity bars for your entries.

        Comment


          #5
          Hello,
          This occurs because when backtesting historical data is what is processed. As Historical Data only reports Open High Low Close values.
          To work around this you will need to use intrabar granularity. Please see the following link to the reference for intrabar granularity. http://www.ninjatrader.com/support/f...ead.php?t=6652
          Cody B.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