Login Page - Create Account

Support Board


Date/Time: Thu, 06 Feb 2025 06:18:20 +0000



Post From: Drawing persistent line from last visible bar to edge

[2020-04-12 09:30:11]
ACWalker - Posts: 6
Hello,

I am trying to draw risk/reward levels in the fill space between the last bar drawn and the edge of the chart.
I would like this line to persistently display when scrolling through the chart, even through historic data.

At the moment, I am using the subgraph drawstyle DRAWSTYLE_LINE_AT_LAST_BAR_TO_EDGE and setting the value once to the lastVisibleBar.
Unfortunately, this way the line is only visible when you are scrolled to this bar.

Currently, a solution I can think of is constantly setting the value to the index of the last visible bar and, but I don't know if this is the proper/efficient way to do this.
Is there a better or standard way that this can be done?

Thanks,

Alex
Date Time Of Last Edit: 2020-04-12 09:39:09