Support Board
Date/Time: Tue, 24 Jun 2025 11:48:56 +0000
[Programming Help] - Add Text Above parallel line or on top of bar
View Count: 550
[2022-01-25 03:43:26] |
usgvince - Posts: 25 |
I have 2 parallel lines for an initial balance study and I want to place the spread of these lines on a chart bar when the end time is reached. I can subtract the two line values with a spreadsheet formula or a subtract study, but I don't want a histogram because the value doesn't change. I don't want one value on the last day like the "text display" study, but all the days on the chart. I would also like to put the value in a spreadsheet. I don't want all the day's values in the spreadsheet, but just the one at the end time on the initial balance study. How can I do this? Thanks |
[2022-01-25 14:22:00] |
JohnR - User831573 - Posts: 333 |
I would create a study with conditional logic for bar time and then draw a rectangle using a desired start bar/ date&time to this bar or one prior. This will have one rectangle on each day. in initialization code set draw_my_rect = 1 if current bar time >= my_end_time and draw_my_rect == 1 draw_my_rect = 0 code to set attributes and draw rectangle if current bar time < my_end_time and draw_my_rect == 0 draw_my_rect = 1 Just my thoughts JohnR |
To post a message in this thread, you need to log in with your Sierra Chart account: