Support Board
Date/Time: Sun, 16 Mar 2025 16:33:36 +0000
[Programming Help] - How to calulate last 20minutes in spreadsheet
View Count: 438
[2022-08-02 18:49:22] |
User361939 - Posts: 167 |
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: 4184 |
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: 167 |
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: 4184 |
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: