Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Calculating Time in Volume Bars

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

    Calculating Time in Volume Bars

    I am using volume bars and need to calculate how long is current bar being printed in real time. One way is to calculate is to do it manually by substrcting start time of bar from curren time. But is there a method or system variable that already doing this?

    Thanks,
    redduke

    #2
    - there is no support for start time of a bar
    - I would calculate the difference between the time stamps of the current and the previous bar like (pseudo code)
    Code:
    if (CurrentBar < 2)
        return;
    double difference = Time[0].Subtract(Time[1]).TotalMilliseconds;

    Comment


      #3
      Thanks Dierk,

      I meant to say End of a bar. I thought that I would need to calculate the difference, but just wanted to double check.

      Regards,
      redduke

      Comment


        #4
        TotalMilliseconds Resolution

        I have tried to display bar timestamps in Milliseconds and calculate TotalMilliseconds for elapased time between bars but the values returned are always in seconds. Is this a data vendor restriction? I am using Zen-Fire. Are there any vendors that timestamp their data in Milliseconds and if so who are they? Thanks.

        Comment


          #5
          >> Are there any vendors that timestamp their data in Milliseconds and if so who are they?
          Not that I know of.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          601 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
          559 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