Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Creating a Time Based Indicator for my Range Chart

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

    Creating a Time Based Indicator for my Range Chart

    Hi,

    I'm trying to work out how I can get minute or 5 minute volume on my range chart. I saw this video http://www.youtube.com/watch?v=x_6BN5SIiig about putting multiple datasets on my chart, but that was causing problems. As soon as I put the 5 minute data series on my range chart all the candles were bunched up or spread out and the chart was not usable.

    Is there a way I can programmatically add a time based dataseries to my chart, then use one of the volume indicators to get the volume I require?

    Any other suggestion or method would be helpful too,

    thanks,
    Will.

    #2
    Hi Will, yes that would be expected since the equidistant bars spacing option then cannot be used, as you would have to align the different series strictly by time.

    You can Add() the series through internally so you have it for calculation but it would not be charted with your indicator then - http://www.ninjatrader.com/support/h...s/nt7/add3.htm

    The downside then is that you would not be able to select this series from the UI to run another indicator on it like you mentioned - however you could run the indicator on the series internally and then display the values for example via the drawing objects on the chart to highlight conditions seen that you wish to correlate with the primary Range chart.

    Comment


      #3
      ok, so I can add the data series and it wont be plotted but I can use it for calculation... thats just what i want. But, I would then need access to volume data calculated using the 5 min dataseries, not the range chart dataseries. how would i do that?

      Thanks,
      Will.

      Comment


        #4
        Correct, there's two things then coming into play - which bars array you would want to access and at which update event you want to access it.

        The first would be defined via BarsArray[x] in NinjaScript - http://www.ninjatrader.com/support/h.../barsarray.htm

        The second would be done by specifying to act in which BarsInProgress - http://www.ninjatrader.com/support/h...inprogress.htm

        So if you have your range chart as primary you would access the BarsArray[1] data in BarsInProgress == 0.

        Comment


          #5
          Thanks for that, I am making some progress. I've added the series to my indicator and I am trying to get the volume levels.

          this works, to get the volume of the current bar

          double vol5min0=VOL(BarsArray[1])[0];

          but trying to get volume for barsago is giving me and index error

          double vol5min1=VOL(BarsArray[1])[1];

          Do I have the indexing or the syntax wrong here?

          Thanks,
          will.

          Comment


            #6
            I figured out the problem, I was trying to calculate volume at 1 barsago for bar 0, I forgot to put my filter

            if (CurrentBar >=...)

            Thanks.

            Comment


              #7
              Thanks for the update Will.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              649 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              370 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              109 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              574 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              576 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X