Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CountIf in Multi-Series Environment

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

    CountIf in Multi-Series Environment

    Hello Support Forum,

    I know CountIf is restricted from use in a multi-series environment, but can it be used in the object when the BarsInProgress == 0? I am trying to use it on the base chart to count the number of up/down bars in pullbacks.

    My code compiles OK, but it does not execute as expected. It fails when counting the up bars in a pull up.

    My base chart is a tick chart. I have added 3 bars objects: 1 minute, 3 minute, 9 minute. I am try to execute the CountIf code on the tick chart.

    If I execute the CountIf on the base tick chart. will this not violate the restriction of CountIf use in a multi-series environment?

    Any help will be appreciated. Thaniks
    Steve

    #2
    Hello steveobowen,

    Thanks for the note.

    The CountIf method will not work as expected when used in multi-instrument or multi-time frame instances.

    You can try and use a looping function like for() loop to be able to check multiple previous bars.

    Also make sure that when using multi-time frame series that you syncronize the DataSeries object(s). See the following forum post for a sample.
    http://www.ninjatrader.com/support/f...ead.php?t=3572

    Please let me know if I can be of further assistance.
    JCNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    169 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    327 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    252 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    353 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    180 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X