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

Cumulative Tick Indicator

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

    Cumulative Tick Indicator

    There is an indicator that Brett Steenbarger has discussed on his blog site called the cumulative tick index. I am new to Ninja Trader and can't quite get my head around indicator programming just yet, so was wondering if anyone out there could code it or at least give some pointers.

    The steps are:

    1. Indicator is on the 1 minute $Tick index.
    2. Calculate the average of (High, Low and Close)/3 for each bar
    3. Calculate the average of the previous 2030 bars of the above before current day (this is 5 days (5 x 406 bars)(Brett uses 20 days instead).
    4. Take the close of current 1 minute Tick bar and minus the value calculated in 3.
    5. Add the the current value in 4 to the last value calculated, making it cumulative. Start the day at zero, although maybe that isn't important.

    As you can see this is not totally straight forward.

    Any help you can provide would be great.

    #2
    You can try one of our NinjaScript consultants as a last resort: http://www.ninjatrader.com/webnew/pa...injaScript.htm
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Any one?

      So does anyone have any ideas for how i might implement this indicator?

      Comment


        #4
        I normally don't do this, but since it was a quick indicator here it is. You will need to adjust it yourself if it is wrong. I have not tested or done anything with the indicator.
        Attached Files
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Legend

          Josh - you're a legend - i'll give it a try

          Comment


            #6
            Code bug?

            Hi Josh,

            In lines 53-54:
            for (int x = 0; x < (Period * 406); x++)
            typAvg += Typical[0];

            Shuoldn't it be typAvg += Typical[x]; ??

            That's how I use it, for the TICK.Z symbol (NYSE TICK, IQFeed).
            Tx.

            Comment


              #7
              I don't recall the underlying logic for this indicator, but I would think it is a bug as you have stated.
              Josh P.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by EvaisDery, Today, 05:44 AM
              0 responses
              7 views
              0 likes
              Last Post EvaisDery  
              Started by JerryWar, 11-19-2016, 08:14 AM
              3 responses
              2,070 views
              0 likes
              Last Post tradertom2012  
              Started by capt34, Today, 03:46 AM
              0 responses
              8 views
              0 likes
              Last Post capt34
              by capt34
               
              Started by wuannetraam, Today, 12:22 AM
              1 response
              12 views
              0 likes
              Last Post wuannetraam  
              Started by TGOG1, Yesterday, 03:02 PM
              2 responses
              27 views
              0 likes
              Last Post TGOG1
              by TGOG1
               
              Working...
              X