Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Time Value of Range Bar

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

    Time Value of Range Bar

    Does anybody know of an indicator that calculates the total time it takes a range bar to complete.

    I would like to use it as a volatility indicator - the faster the bar closes demonstrates increasing volatility.


    If this indicator is not available what would be the command/function that would return the value of the difference of range bar open and range bar close.

    I met a trader some years ago who had this indicator which displayed the time value as a histogram.

    Thank you

    Stefan

    #2
    Hello sdauteuil,

    Thanks for your post.

    I've attached a simple indicator that will provide bar times in seconds, this is the code: BarTime[0] = (Time[0] - Time[1]).TotalSeconds;

    It provides a histogram type display, works on any bar type (although time based bars would be redundant).

    BarTimes.zip

    Comment


      #3
      Thank you that is quite helpful.

      Is this the difference between the current bar open time and the current bar time or previous bars close and current bar time?

      Comment


        #4
        Hello Stefan,

        Thanks for your reply.

        When looking at historical data, it is from the close time of the currently evaluated bar to the previous bars close time.

        In live data,:

        If the calculate mode is set to Calculate.OnBarClose, it would be the same as historical , IE: the time from the just closed bar to the previous bar close.
        If the calculate mode is changed to OnEachTick or OnPriceChange, then it would be the time from the just closed bar to the current bar (forming bar).
        OnPriceChange may skip some time if the ticks come in at the same price, OnEachTick will update as a tick comes in and this would be the fastest OnBarUpdate() mode.

        Comment

        Latest Posts

        Collapse

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