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

Counting bars

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

    Counting bars

    Hi guys, I am using the following function to obtain a count based on the bars since the beginning of the session. What I would like to do is perform a count from the first bar of my chart. For example if my chart went back 50 days, how would I do a count from 50 days to the current day? There is no Bars.Barssincechartstart etc?

    tickupcount = CountIf(delegate {return High[0] >highcount;}, Bars.BarsSinceSession);


    Thanks in advance
    DJ

    #2
    djkiwi,

    I am happy to assist you.

    CurrentBar shows how many bars are counted from the beginning. Are you trying to do this from the beginning of the current day, or the beginning of your chart?
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Counting bars

      Hi Adam, the beginning of the chart.

      Cheers
      DJ

      Comment


        #4
        Originally posted by djkiwi View Post
        Hi guys, I am using the following function to obtain a count based on the bars since the beginning of the session. What I would like to do is perform a count from the first bar of my chart. For example if my chart went back 50 days, how would I do a count from 50 days to the current day? There is no Bars.Barssincechartstart etc?

        tickupcount = CountIf(delegate {return High[0] >highcount;}, Bars.BarsSinceSession);


        Thanks in advance
        DJ
        Bars.Barssincechartstart is actually called CurrentBar

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by terofs, Yesterday, 04:18 PM
        1 response
        22 views
        0 likes
        Last Post terofs
        by terofs
         
        Started by CommonWhale, Today, 09:55 AM
        1 response
        3 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
         
        Started by RookieTrader, Today, 09:37 AM
        2 responses
        13 views
        0 likes
        Last Post RookieTrader  
        Started by alifarahani, Today, 09:40 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X