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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    82 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    43 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    64 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    68 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    56 views
    0 likes
    Last Post CarlTrading  
    Working...
    X