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 Kaledus, Today, 01:29 PM
    0 responses
    3 views
    0 likes
    Last Post Kaledus
    by Kaledus
     
    Started by PaulMohn, Today, 12:36 PM
    1 response
    16 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by yertle, Yesterday, 08:38 AM
    8 responses
    37 views
    0 likes
    Last Post ryjoga
    by ryjoga
     
    Started by rdtdale, Today, 01:02 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by alifarahani, Today, 09:40 AM
    3 responses
    19 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X