How to Add Offset (Future Date) to the TimeScale #1462
Replies: 3 comments 4 replies
-
Did you found a solution for that ? Currently my solution is add 5 more bars with close 0, and the correct date. This allow to draw and move object, but not a good solution. |
Beta Was this translation helpful? Give feedback.
-
So using WhitespaceData (https://tradingview.github.io/lightweight-charts/docs/api/interfaces/WhitespaceData), the line on price 0 is not draw anymore. However we would need to change a lot of code to support the Candle | WhitespaceData. So my idea is to create another "layer", by adding another barSeries. In this new bar series we will generate new WhitespaceData to fill the required time. Also want to once it receives new "drawings" will dynamically expand to the required time. So we will draw on this new barseries. It can be any series, the trick will be to use the WhitespaceData |
Beta Was this translation helpful? Give feedback.
-
Well some one found this solution to be ok earlier https://stackoverflow.com/questions/68251215/lightweight-charts-how-to-show-future-times-in-advance |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm creating the plugin with Primitive and wanted to ask if there is a way to add offset in the timescale (say like 5 days in the future)?
You can see in the screenshot below that it draws the Primitive if the range is before the current date of the dataset.
Here in this screenshot below, I've set the range to be from the current date to 5 days in the future, but is has not drawn the expected primitive (red rectangles).
What I wanted to achieve is the Primitive can be drawn in the timescale offset after the current date of the dataset.
Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions