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!
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.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue