Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy won't enter if historical entry is there

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

    Strategy won't enter if historical entry is there

    I'm trying to make a strategy do my entry based on the current bar, and I have a take profit and stop loss.
    Problem is when I enable the strategy, it won't execute if there's still a phantom "in progress" entry of a previous historical bar. how can I ignore whether it would have closed in a previous entry?
    basic example if I'm saying if current bar price is lower than previous bar, then enter for 2 points. However if 2 bars ago that condition is met, my strategy won't enter because 2 points haven't been realized yet since that entry.

    #2
    Hello MatthewLesko,

    When you start a strategy it does an initial backtest over the historical data. If it enters a position in historical it would be expected that it waits to close that position before working in realtime. To ignore that you need it to not place that historical trade, you could make the strategy work only in realtime or adjust the amount of data being loaded so that trade does not happen.

    Comment


      #3
      Is that a strategy builder setting or a strategy setting?

      Comment


        #4
        Hello MatthewLesko,

        That applies to all strategies, the default start behavior for strategies is to wait until flat. https://ninjatrader.com/support/help..._positions.htm

        The default option is the best option to use if you did not create specific logic that can utilize one of the other settings. If you want it to start in realtime immediately after enabling it you would need to make it so that your entry conditions are only true in realtime by checking if the state is realtime.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        87 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        132 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        68 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        118 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        67 views
        0 likes
        Last Post PaulMohn  
        Working...
        X