Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

change chart TIC granularity

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

    change chart TIC granularity

    i did some searches but couldn't find any threads on whether or not chart TIC granularity can be changed automatically from within an indicator
    my ideal would be something that would auto change TIC granularity based on a fraction of average daily volume of x number of days
    or change chart volume granularity based on the same average volume data
    thanks,
    w

    #2
    Hello stafe,

    Thanks for your post.

    It is not supported, nor recommended to add a secondary data series using calculations for the interval. It is also not possible to add a data series on the fly while the script is running. This means that you will not be able to call data such as the volume and use this to calculate a tick size.

    It might be possible to do this with a pair of indicators. One indicator runs for a bit and collects data, then calls a second indicator and passes it a string for the instrument and an integer for the interval. Then the data could be processed and returned to the first indicator to plot.

    This is just a suggestion but I think it might be possible.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      let me be a bit more specific, just to make sure...
      i usually open 60-100 day charts - that is kind of heavy for a tic or volume chart but i've got gobs of computing room and speed

      i was thinking if i open 6E 60 days chart and on each FirstBarOfSession i would check to see if there was enough days to run the average volume calculation and if less than 59 days return;
      - on the 60th day i'm hoping there is some way to gather volume totals for each of the 59 prior "Sessions" and get an average - then use a predefined fraction of that 59 session average volume to set the TIC or Volume granularity only once on the 1st bar of the 60th session and use some kind of check to make sure it's done only once - not interested in dynamically changing granularity

      it would seem like only one set of input data per chart would be needed as long as it's got volume for each bar
      -- but i'm not sure what the method would be to gather the Session volume sum - would i have to load a daily bar set to get that info ?

      before we really get any further, is there a method and where would i find it, to set chart granularity from within an indicator ?

      thanks for getting back,
      w

      Comment


        #4
        Hi stafe,

        It would be fairly easy to collect the volume and save this to a variable. By adding intrabar granularity you would be able to so this on each tick or once a minute etc. You could use the session time to start saving the volume data and stop when the session ends. You could also use any hardcoded time or user selected time to collect volume.

        Below is a link to the help guide on Bars.Session.GetNextBeginEnd().
        http://www.ninjatrader.com/support/h...xtbeginend.htm

        Also, here is a link to an example that uses intrabar granularity.
        http://www.ninjatrader.com/support/f...ead.php?t=6652
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        66 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        41 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        24 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        27 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        53 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X