Support Board
Date/Time: Thu, 06 Nov 2025 04:01:40 +0000
[Programming Help] - How to calulate last 20minutes in spreadsheet
View Count: 528
| [2022-08-02 18:49:22] |
| User361939 - Posts: 169 |
|
Hello, I am trying to calculate how many bars appear in last e.g 20minutes for non time based chart type. I don't how to calculate until value reach arround 20minutes, than it should stop. Should i use as well index function to calculate amount of bars? Thank you for any suggestions |
| [2022-08-02 22:07:17] |
| Sawtooth - Posts: 4285 |
|
Try this: Cell T1: =FRACTIME(A3)-20/1440 Cell T3: =FRACTIME(A3) Cell U3: =INDEX(T$3:T$1002,MATCH($T$1,T$3:T$1002,-1),1) Cell V3: =IF(U3=T3,1,V4+1) |
| [2022-08-11 11:28:55] |
| User361939 - Posts: 169 |
|
Thank you! V3 giving mi number of bars. I am struggling how to calculate last 20minutes from current time. Any advice? Best Regards Date Time Of Last Edit: 2022-08-11 11:29:09
|
| [2022-08-11 13:31:58] |
| Sawtooth - Posts: 4285 |
|
I am struggling how to calculate last 20 minutes from current time.
The current chart datetime is in J41There are 1440 minutes in 24 hours, so 20 minutes is 20/1440 So the datetime 20 minutes ago is: =J41-20/1440 The time 20 minutes ago is: =FRACTIME(J41)-20/1440 |
To post a message in this thread, you need to log in with your Sierra Chart account:
