Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

RealTime Strategy (COBC=false) combined with an Indicator with COBC=true

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

    RealTime Strategy (COBC=false) combined with an Indicator with COBC=true

    Is it anyway to combine a Strategy that enters the market with COBC=false with an indicator (that acts as a filter) working with COBC=true?.

    Thanks in advance.

    #2
    Hello Sangui,

    Accessing an Indicator from a Strategy with COBC set to false will make the Indicator calculated on COBC false as well. If you want to only access the values of the indicator from the previous bars close you may want to access the value of it 1 bar ago "[1]" to get the value of the previous bars close.

    Note that if you need to see when the start of a new bar is you may use the FirstTickOfBar to be able to get when a new bar starts.
    JCNinjaTrader Customer Service

    Comment


      #3
      Hello JC,

      I thought about this, but the problem is that the indicator has a different behavior with COBC=true or false. And accessing to previour bar [1] or FirstTickOfBar will not be the same as using COBC=true. Anyways I will keep thinking .

      Regards,

      Comment


        #4
        Hello Sangui,

        While, I am not sure how your logic is entering the orders on the Strategy side with COBC false, the only other method that I could think of that may help would be to have COBC set to true and then add a smaller period to your strategy. Here is a link to our references that goes over intrabar granularity that you may view.

        You can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this by
        JCNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        648 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        369 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        108 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        572 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        573 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X