Login Page - Create Account

Support Board


Date/Time: Mon, 25 Nov 2024 18:34:42 +0000



Post From: Question about a spreadsheet study that references time and draws a line

[2024-02-14 23:34:12]
trader2017 - Posts: 98
I’m trying to have a spreadsheet study draw a line at the high of each hour, for example a line from 18:00 to 18:59:59 and a new line from 19:00 to 19:59:59. I know there is a high low extended study for that but because I might change the timeframes, I was trying to accomplish this in a spreadsheet study.

I found this on another comment to identify the time:
=FRACTIME(MROUND(A3,1/86400))=TIMEVALUE("18:00:00")

I wrote that formula in the K3 cell and it worked to identify the row with 18:00:00 by returning the number 1 in the column.

Now I’m trying to figure out how to get a line drawn from the high of 18:00 all the way to 18:59:59

In cell L3 I wrote the following to place a point on the high + .50 and that worked.
  
=IF(K3=1, ID0.SG2@3 +.50, 0 )

Now the difficult part, I can’t figure out how to get the point to extend across until the next hour begins.

I can reference the previous row, but the previous row is line 2 and the following formula causes a syntax error.

=IF(K3<>1, L3[-1] , 0)

Thank you for any assistance someone can provide.
Date Time Of Last Edit: 2024-02-14 23:34:45