Time Seconds not calculating correctly.

Forums ProRealTime English forum ProBuilder support Time Seconds not calculating correctly.

Viewing 4 posts - 1 through 4 (of 4 total)
  • #105440

    I was considering coding an indicator to detect the time frame of a chart but I was getting strange results on a 1 second chart. Here is a simple code that should calculate what the current seconds are from the open time but sometimes it returns a negative number for the seconds!

    The 2nd image is returning just SS.

     

    #105443

    After a little further testing it seems that on a 20 second or 30 second or 40 second or 50 second chart it Calculates SS correctly but on any other chart it returns minus numbers.

    #105445

    Rounding hhmm when it’s 204040 will return 204000,  when it’s 204050 will return 204100.

    You should subtract-0.5 to return always 204000.

    #105447

    Thanks Roberto – I knew that it was something obvious that I had forgotten!

     

Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login