remaining time left in a bar

Forums ProRealTime English forum ProBuilder support remaining time left in a bar

Viewing 8 posts - 1 through 8 (of 8 total)
  • #174224

    Calling on PRC experts 🙂

    If I am on a 15min chart, is there a way to capture the remaining time left of the current bar in a variable which I can store and use (for example multiply the remaining time left by a number)

    #174273

    Tnx Noobywan. I got your email. it works. what would be the same code for 1Hr and 5Hr charts?

    #174298

    How do I capture the IntraDayBarIndex of the 10am bar that will be correct on all intraday timeframes?

    #174300

    Hi, what I first posted, calling it “fast and lazy coding only for ut15” was too fast and too lazy, there was an issue with it. Although I removed it almost straight away when seeing it, I couldn’t prevent the email notification, sorry about that… Here’s a less lazy version correcting the issue, and it should be ok with your other 1h and 5h request too:

    You can either use the variable “left” as an integer storing the requested value, or the subcomponents hleft, mnleft, sleft if you need in more details the hour minute and second component of the time left.

     

    #174302

    For your 10am intradaybarindex request, this would reset it at 0 each day, and providing you have a bar starting at 10am in the chosen timeframe it will store its intradaybarindex in the “mybar” variable:

     

    #174318

    Tnx Noobywan, I am also learning French in the process 🙂

    Also, where is the time elapsed variable captured in the code above? How would you captured it (if not already captured in your code above)?

    #174320

    I am guessing time_elapsed would simply be

    elapsed=(hduree*10000+mnduree*100+sduree)

    #174325

    Hi, yes, that’s the time elapsed, recreated into a single number in hhmmss format.

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

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