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 NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        62 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        134 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        75 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        45 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        50 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X