Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to disable BarsRequiredToTrade validation completely?

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

    How to disable BarsRequiredToTrade validation completely?

    Hi,

    I have a multi-series strategy that should be able to open a position regardless of the primary Bars' currentbar status. For example I may be using a 1 Minute series for the primary bars and a smaller period for the second series bars. And I need the strategy to open a position before even the 1 minute (primary Bar) has finished generating its first bar. My strategy does not load any historical data. Its logic runs with a fresh set of bars every trading day.
    I have tried setting the primary BarsRequiredToTrade to -1 or even deleting the line from the code, but it always makes this validation and therefore ignores any trades that happen before the first bar of the primary series.

    Is there any way to disable this validation completely?

    Thanks,
    Alex

    #2
    Hello Alex,

    This cannot be disabled, but you can set BarsRequiredToTrade to 0.

    If this is changed in State.SetDefaults instead of State.Configure, you will need to remove the instance of the strategy and add a new instance so the new defaults are pulled for the new instance.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    49 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    126 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    67 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X