lightweight-charts-python icon indicating copy to clipboard operation
lightweight-charts-python copied to clipboard

method to get pointer timestamp

Open isshin1 opened this issue 1 year ago • 1 comments

Question

This is related to #316 in which i asked for a replay feature, seems like its indeed fairy easy to get it happen via callback function. thanks for the hint.

but now the issue is that there is no proper way to select a particular timestamp to start replay from. is it possible to get the x axis/timestamp of pointer so that replay can start from there

Code example

pointer_timestamp = func_get_pointer_timestamp()
n = df.index[df.timestamp >= pointer_timestamp]
for i in range(n ,len(df.index)):
    df2 = df.head(i)
    sleep(1)
    chart.set(df2)

isshin1 avatar Mar 30 '24 09:03 isshin1

This might help you: https://github.com/louisnw01/lightweight-charts-python/issues/343

amirzamli avatar May 06 '24 13:05 amirzamli