๐Ÿ’ธ Sponsor the strip
REPLAUSE

lightweight-charts-python

Python wrapper that draws TradingView-style charts in a desktop window

๐Ÿงฉ Build it Free 03 in Indicators & TradingView ๐Ÿ†• NEW TODAY
Any marketStandalonePython

by louisnw01 โ†’

2,123 MITupdated 28 Sep '24

Overview

lightweight-charts-python is a Python wrapper for TradingView's Lightweight Charts, rendering a chart in a webview, Jupyter cell, or PyQt/wx panel from a pandas DataFrame.

  • ForPython developers who want a TradingView-style chart without writing JavaScript.
  • NeedsPython, and a pandas DataFrame with time/open/high/low/close columns.
  • RunsPython bindings (pip install lightweight-charts) around the JS library, supporting Jupyter Notebooks, PyQt6, PyQt5, PySide6, wxPython, Streamlit, and asyncio.
  • Limitthe DataFrame's column names matter โ€” time, open, high, low, close โ€” a DatetimeIndex alone is not enough.

Vibe it

Paste this into your AI agent. Write the first line, or take a suggestion; the copy carries your words.

Source: https://github.com/louisnw01/lightweight-charts-python โ€” clone it and read its README and examples before writing anything; its documented setup beats what you remember.
Stack: Python bindings around TradingView's Lightweight Charts, rendered in a webview, Jupyter cell, or PyQt/wx panel.
Needs: Python, and a pandas DataFrame with time, open, high, low, close (and optionally volume) columns.
Start: `pip install lightweight-charts`, then chart.set(df) and chart.show(block=True) on a CSV loaded with pandas before adding markers or a subchart.
Limit: the DataFrame's column names matter โ€” time, open, high, low, close โ€” a DatetimeIndex alone is not enough.
Done means: you show me my own OHLC data rendered as a chart window, and the script you wrote.
Before you start, ask me: which environment I'm running in (plain script, Jupyter, PyQt, Streamlit) and where my OHLCV data comes from.

Something wrong here? Tell us โ†’