tradingview / lightweight-charts

Performant financial charts built with HTML5 canvas
https://www.tradingview.com/lightweight-charts/
Apache License 2.0
9.1k stars 1.57k forks source link

Multiple panes support #50

Open nothingalike opened 5 years ago

nothingalike commented 5 years ago

Looking through the documentation i dont see anything along these lines. I want to have my main chart but then add some additional data in a separate chart window. I believe some apps call it an Indicator Window. I was curious if its possible with this library.

kirchet commented 1 month ago

It's implemented but not released yet, it'll be included to the next major version

yooyea commented 1 month ago

It's implemented but not released yet, it'll be included to the next major version

Wow! Thank you for your work

markhammond commented 1 month ago

v5-candidate is looking fantastic. I quickly tested multiple pane support and noticed resizing smaller lags massively on Chrome desktop. Please see attached webm video (~1440 data points x 6 candle stick series)

You'll note from the video that I have time scale FixRightEdge enabled, and integrate a tweaked version of the Band Indicator plugin, just for fun. Can confirm neither feature had any bearing on performance.

It's apparent the slow down is due to animations. Is there an option to disable animations? I would be happy to test this. I have no errors in my developer console (aside for render time violations) and no other browser extensions running.

laggy-resizing-smaller.webm

markhammond commented 1 month ago

I expect many use cases involving panels to be data intensive. A minimal patch to improve support for dynamic loading and removal of data worked for me, https://github.com/tradingview/lightweight-charts/issues/1405#issuecomment-2274747468

kjp22 commented 2 weeks ago

v5-candidate is looking fantastic. I quickly tested multiple pane support and noticed resizing smaller lags massively on Chrome desktop. Please see attached webm video (~1440 data points x 6 candle stick series)

You'll note from the video that I have time scale FixRightEdge enabled, and integrate a tweaked version of the Band Indicator plugin, just for fun. Can confirm neither feature had any bearing on performance.

It's apparent the slow down is due to animations. Is there an option to disable animations? I would be happy to test this. I have no errors in my developer console (aside for render time violations) and no other browser extensions running.

laggy-resizing-smaller.webm

hey nice work!

I managed to create a "multipane" chart using this logic and a ton of customization.

image

It’s fully dynamic btw. What I mean is, no need to code a single line of JS.

Just feed it a JSON with data, and you can plot anything even buy and sell signals which is pretty cool! Honestly, I don't understand why people are still using plotly and other static or non-modern charting solutions when writing in python, R matlab or whatever other quant - finance language for their strategies.

In this project, the toughest part was syncing the crosshair and legends across all charts and according to the data that you fed the chart, but it works smoothly now. You can plot as many as you want and as many series as you want within each subchart.

Didn't have the time to work on the aesthetics, other than the dark/light theme. But it looks good I think.

I only used the lightweight-charts library. In my opinion, the "panes" feature isn’t necessary, but it’s a nice-to-have. (Personally couldn't wait for it any longer so I came up with a workaround haha)

May I ask which coding language you’re using to write your strategies logic and indicators? Also, I am not sure what you mean by animations. Couldn't figure it out by the video or the library DOCs. Can you please elaborate on that?

josuamanuel commented 2 weeks ago

@illetid I was doing some tests using v5-candidate and I saw what looks like an error:

Changing the priceScale mode for one serie in a pane changes the priceScale of all the series in the chart even though they are in different panes:

image

Produce the following logs:

image



My goal was to migrate from the multi pane support fork implemented by @rwitzlib to candidate-v5. rwitzlib does not suffer from this error.

@SlicedSilver @kirchet Thanks for the great work...