Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 RookieTrader, Today, 09:37 AM
    3 responses
    15 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by kulwinder73, Today, 10:31 AM
    0 responses
    7 views
    0 likes
    Last Post kulwinder73  
    Started by terofs, Yesterday, 04:18 PM
    1 response
    24 views
    0 likes
    Last Post terofs
    by terofs
     
    Started by CommonWhale, Today, 09:55 AM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by Gerik, Today, 09:40 AM
    2 responses
    7 views
    0 likes
    Last Post Gerik
    by Gerik
     
    Working...
    X