### Developer Setup Source: https://github.com/bobotig/py-candlestick-chart/blob/main/README.md Set up a Python virtual environment and install dependencies for development. This includes updating pip and installing the package in editable mode with test dependencies. ```shell python -m venv venv . venv/bin/activate python -m pip install -U pip ``` ```shell python -m pip install -e '.[test]' ``` -------------------------------- ### Install candlestick-chart Source: https://github.com/bobotig/py-candlestick-chart/blob/main/README.md Install the library using pip. This command ensures you have the latest version. ```bash python -m pip install -U candlestick-chart ``` -------------------------------- ### Show version Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Use this command to display the installed version of the candlestick-chart tool. ```bash candlestick-chart --version ``` -------------------------------- ### Demonstration of candlestick-chart API Source: https://github.com/bobotig/py-candlestick-chart/blob/main/README.md This example demonstrates how to use the Candle and Chart classes to create and customize a candlestick chart. It shows how to add candles, set titles, custom colors, labels, volume pane settings, update chart size, and highlight specific prices. Use this to understand the core API for chart generation. ```python from candlestick_chart import Candle, Chart # Add some candles candles = [ Candle(open=133.520004, close=133.610001, high=126.760002, low=129.410004), Candle(open=128.889999, close=131.740005, high=128.429993, low=131.009995), Candle(open=127.720001, close=131.050003, high=126.379997, low=126.599998), Candle(open=128.360001, close=131.630005, high=127.860001, low=130.919998), Candle(open=132.429993, close=132.630005, high=130.229996, low=132.050003), ] # Create and display the chart # Optional keyword arguments: title, width, height chart = Chart(candles, title="Optional title") # Set the chart title chart.set_name("BTC/USDT") # Set customs colors chart.set_bear_color(1, 205, 254) chart.set_bull_color(255, 107, 153) chart.set_vol_bull_color(1, 205, 254) chart.set_vol_bear_color(255, 107, 153) # Set custom labels (empty string => label not displayed) chart.set_label("highest", "ATH") chart.set_label("lowest", "ATL") chart.set_label("average", "") chart.set_label("volume", "") # Volume pane settings chart.set_volume_pane_height(6) chart.set_volume_pane_enabled(False) # And, it is also responsive! new_width = 200 new_height = 150 chart.update_size(new_width, new_height) # By the way, did you know that you can add more candles in real-time? chart.update_candles(candles[:3]) # Or completely replace current candles chart.update_candles(candles[:3], reset=True) # Set a custom color at price 52,348.63 chart.set_highlight(fnum(52_348.63), "red") chart.set_highlight(fnum(52_348.63), (255, 0, 0)) chart.set_highlight(fnum(52_348.63), "91m") chart.set_highlight(fnum(52_348.63), "91;47m") chart.draw() ``` -------------------------------- ### Fetch live data from Binance API and display chart Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt This Python script fetches real-time cryptocurrency data from the Binance API, converts it into Candle objects, and then draws a chart. Ensure you have the 'requests' library installed. ```python import requests from dataclasses import dataclass from candlestick_chart import Candle, Chart @dataclass(frozen=True, slots=True) class BinanceKline: open_time: int open: str high: str low: str close: str volume: str close_time: int quote_asset_volume: str number_of_trades: int taker_buy_base: str taker_buy_quote: str ignore: str # Fetch klines from Binance url = "https://api.binance.com/api/v1/klines?symbol=BTCUSDT&interval=1h" response = requests.get(url, timeout=60) klines = [BinanceKline(*item) for item in response.json()] # Convert to Candle objects candles = [ Candle( open=float(k.open), close=float(k.close), high=float(k.high), low=float(k.low), volume=float(k.volume), timestamp=float(k.open_time), ) for k in klines ] # Create and display chart chart = Chart(candles, title="BTC/USDT Live") chart.set_bull_color(1, 205, 254) chart.set_bear_color(255, 107, 153) chart.set_volume_pane_height(4) chart.set_volume_pane_enabled(True) chart.draw() ``` -------------------------------- ### Create a Custom Candlestick Chart Renderer Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Subclasses `ChartRenderer` to define a custom way of drawing candles, such as rendering them as dots. This example creates a `DotChartRenderer`. ```python from dataclasses import dataclass from math import floor from candlestick_chart import Candle, Chart, constants from candlestick_chart.chart_renderer import ChartRenderer from candlestick_chart.colors import truecolor from candlestick_chart.utils import parse_candles_from_csv from candlestick_chart.y_axis import YAxis @dataclass class DotChartRenderer(ChartRenderer): """Custom renderer that draws candles as dots instead of bars.""" def _render_candle(self, candle: Candle, y: int, y_axis: YAxis) -> str: height_unit = float(y) *_, max_y, min_y = y_axis.price_to_heights(candle) if max_y > height_unit > floor(min_y): return truecolor("●", *self.bullish_color) elif floor(max_y) > height_unit: return truecolor("│", *self.bearish_color) return constants.UNICODE_VOID # Use custom renderer candles = parse_candles_from_csv("./examples/BTC-USD.csv") chart = Chart(candles, title="Custom Dot Chart", renderer_cls=DotChartRenderer) chart.set_volume_pane_enabled(False) chart.set_bear_color(1, 205, 254) chart.set_bull_color(255, 107, 153) chart.draw() ``` -------------------------------- ### Use Command-Line Interface for Chart Visualization Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Demonstrates how to invoke the `candlestick-chart` command-line tool to visualize charts directly from the terminal. Shows the command to display help information. ```bash # Show help candlestick-chart --help ``` -------------------------------- ### Candlestick Chart Binary Help Source: https://github.com/bobotig/py-candlestick-chart/blob/main/README.md This command displays the help message for the candlestick-chart binary, outlining available options for mode, file input, and chart customization. ```bash candlestick-chart --help ``` -------------------------------- ### Create a Basic Candlestick Chart Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Initialize the Chart class with a list of Candle objects and call draw() to display it in the terminal. Supports OHLC data and optional volume. ```python from candlestick_chart import Candle, Chart # Create candle data with OHLC values candles = [ Candle(open=28994.00, close=29374.15, high=29600.62, low=28803.58, volume=40730301359), Candle(open=29376.45, close=32127.26, high=33155.11, low=29091.18, volume=67865420765), Candle(open=32129.40, close=32782.02, high=34608.55, low=32052.31, volume=78665235202), Candle(open=32810.94, close=31971.91, high=33440.21, low=28722.75, volume=81163475344), Candle(open=31977.04, close=33992.42, high=34437.58, low=30221.18, volume=67547324782), ] # Create chart with optional title, width, and height chart = Chart(candles, title="BTC/USDT") # Display the chart in terminal chart.draw() ``` -------------------------------- ### Candlestick Chart Binary Options Source: https://github.com/bobotig/py-candlestick-chart/blob/main/README.md This output details the command-line options for the candlestick-chart binary, including modes for data input (stdin, csv-file, json-file), file path specification, and color customization. ```bash candlestick-chart --help options: -h, --help show this help message and exit -m {stdin,csv-file,json-file}, --mode {stdin,csv-file,json-file} Select the method for retrieving the candles. -f FILE, --file FILE [MODE:*-file] File to read candles from. --chart-name CHART_NAME Sets the chart name. --bear-color BEAR_COLOR Sets the descending candles color in hexadecimal. --bull-color BULL_COLOR Sets the ascending candles color in hexadecimal. --version show program's version number and exit ``` -------------------------------- ### Read from stdin using CLI Source: https://github.com/bobotig/py-candlestick-chart/blob/main/README.md Pipe JSON data directly to the candlestick-chart CLI for real-time chart generation. Ensure the JSON format matches the expected structure for open, high, low, and close prices. ```bash echo '[\n {\n "open": 28994.009766,\n "high": 29600.626953,\n "low": 28803.585938,\n "close": 29374.152344\n },\n {\n "open": 29376.455078,\n "high": 33155.117188,\n "low": 29091.181641,\n "close": 32127.267578\n }\n]' | candlestick-chart \ --mode=stdin \ --chart-name='My BTC Chart' \ --bear-color='#b967ff' \ --bull-color='ff6b99' ``` -------------------------------- ### Run Tests Source: https://github.com/bobotig/py-candlestick-chart/blob/main/README.md Execute the project's test suite using pytest. Ensure all tests pass to verify the library's functionality. ```shell python -m pytest ``` -------------------------------- ### Configure Volume Pane Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Adjust the height and fill character of the volume pane displayed below the main chart. ```python # Set volume pane height (default is 1/6 of terminal height) chart.set_volume_pane_height(6) # Set custom fill character for volume bars chart.set_volume_pane_unicode_fill("█") chart.draw() ``` -------------------------------- ### Read JSON from file using CLI Source: https://github.com/bobotig/py-candlestick-chart/blob/main/README.md Use the candlestick-chart CLI to read data from a JSON file. Provide the file path, chart name, and desired colors for the candles. ```bash candlestick-chart \ --mode=json-file \ --file='./examples/BTC-chart.json' \ --chart-name='My BTC Chart' \ --bear-color='#b967ff' \ --bull-color='ff6b99' ``` -------------------------------- ### Format Numbers with Utility Function Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Uses the `fnum()` utility to format numbers for display, including standard comma separation and compact notation for very small numbers. It also supports string inputs. ```python from candlestick_chart.utils import fnum # Regular numbers print(fnum(52348.63)) # "52,348.63" print(fnum(1000000)) # "1,000,000" print(fnum(0.1234)) # "0.1234" # Very small numbers use compact notation print(fnum(0.000000000012345678)) # "0.⦗0×10⦘1234" # String input is also supported print(fnum("52348.63")) # "52,348.63" ``` -------------------------------- ### Integrate Chart with Rich Library for Live Terminal Updates Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Renders a static and a dynamic candlestick chart within a Rich layout. The dynamic chart updates in real-time using Rich's Live display. Requires `rich` and `candlestick-chart` libraries. ```python from time import sleep from rich.layout import Layout from rich.live import Live from rich.panel import Panel from candlestick_chart import Chart from candlestick_chart.utils import fnum, parse_candles_from_csv def make_chart(candles, title): chart = Chart(candles, title=title) chart.set_bear_color(255, 107, 153) chart.set_bull_color(1, 205, 254) chart.set_label("average", "") chart.set_label("volume", "") chart.set_highlight(fnum(53730.68), "red") return chart # Load data candles = parse_candles_from_csv("./examples/BTC-USD.csv") # Create layout with Rich layout = Layout(name="root") layout.split( Layout(name="header", size=3), Layout(name="main", ratio=1), ) layout["main"].split_row( Layout(name="chart-left"), Layout(name="chart-right"), ) # Create charts chart_static = make_chart(candles, "Static Chart") chart_dynamic = make_chart([], "Dynamic Chart") # Add to layout - charts auto-size to panels layout["chart-left"].update(Panel(chart_static)) layout["chart-right"].update(Panel(chart_dynamic)) # Live update with Rich with Live(layout, refresh_per_second=30): for candle in candles: chart_dynamic.update_candles([candle]) sleep(0.05) ``` -------------------------------- ### Volume Pane Configuration Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Control the volume pane's visibility and height. The volume pane is enabled by default if volume data is present. ```python from candlestick_chart import Candle, Chart candles = [ Candle(open=100.0, close=110.0, high=115.0, low=95.0, volume=1000000), Candle(open=110.0, close=105.0, high=112.0, low=102.0, volume=1200000), Candle(open=105.0, close=120.0, high=125.0, low=103.0, volume=800000), ] chart = Chart(candles, title="Volume Pane Demo") # Enable volume pane (enabled by default if volume data exists) chart.set_volume_pane_enabled(True) ``` -------------------------------- ### Set Responsive Chart Dimensions Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Manually define chart width and height to override automatic terminal fitting. ```python from candlestick_chart import Candle, Chart candles = [ Candle(open=100.0, close=110.0, high=115.0, low=95.0), Candle(open=110.0, close=105.0, high=112.0, low=102.0), ] # Set initial size via constructor chart = Chart(candles, title="Sized Chart", width=120, height=30) # Update size dynamically chart.update_size(200, 50) chart.draw() ``` -------------------------------- ### Read from stdin (pipe JSON data) Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Pipe JSON data to the command to generate a chart. Ensure the JSON is an array of objects with 'open', 'high', 'low', 'close' keys. ```bash echo '[ {"open": 28994.00, "high": 29600.62, "low": 28803.58, "close": 29374.15}, {"open": 29376.45, "high": 33155.11, "low": 29091.18, "close": 32127.26} ]' | candlestick-chart --mode=stdin --chart-name='Piped Data' --bear-color='#b967ff' --bull-color='ff6b99' ``` -------------------------------- ### Read CSV file with custom colors Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Use this command to read data from a CSV file and customize candle colors. ```bash candlestick-chart --mode=csv-file --file='./data/BTC-USD.csv' --chart-name='BTC/USDT' --bear-color='#b967ff' --bull-color='ff6b99' ``` -------------------------------- ### Customizing Chart Colors Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Set custom RGB colors for bullish and bearish candles, and their corresponding volume bars using set_bull_color, set_bear_color, set_vol_bull_color, and set_vol_bear_color methods. ```python from candlestick_chart import Candle, Chart candles = [ Candle(open=100.0, close=110.0, high=115.0, low=95.0, volume=1000), Candle(open=110.0, close=105.0, high=112.0, low=102.0, volume=1200), Candle(open=105.0, close=120.0, high=125.0, low=103.0, volume=1500), ] chart = Chart(candles, title="Custom Colors") # Set candle colors as RGB tuples (r, g, b) chart.set_bull_color(1, 205, 254) # Cyan for bullish candles chart.set_bear_color(255, 107, 153) # Pink for bearish candles # Set volume pane colors chart.set_vol_bull_color(1, 205, 254) # Cyan for bullish volume chart.set_vol_bear_color(255, 107, 153) # Pink for bearish volume chart.draw() ``` -------------------------------- ### Update Candles in Real-Time Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Add new candles dynamically to an existing chart or replace the entire dataset using the reset parameter. ```python from candlestick_chart import Candle, Chart from time import sleep # Start with initial candles initial_candles = [ Candle(open=100.0, close=102.0, high=103.0, low=99.0), Candle(open=102.0, close=101.0, high=104.0, low=100.0), ] chart = Chart(initial_candles, title="Real-Time Updates") # Simulate new candles arriving new_candles = [ Candle(open=101.0, close=105.0, high=106.0, low=100.0), Candle(open=105.0, close=103.0, high=107.0, low=102.0), ] # Add candles incrementally (appends to existing) for candle in new_candles: chart.update_candles([candle]) chart.draw() sleep(1) # Replace all candles completely all_candles = initial_candles + new_candles chart.update_candles(all_candles, reset=True) chart.draw() ``` -------------------------------- ### Read JSON file Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Use this command to read data from a JSON file. ```bash candlestick-chart --mode=json-file --file='./data/BTC-chart.json' --chart-name='My Chart' ``` -------------------------------- ### Read CSV from file using CLI Source: https://github.com/bobotig/py-candlestick-chart/blob/main/README.md Use the candlestick-chart CLI to read data from a CSV file. Specify the file path, chart name, and custom colors for bullish and bearish candles. ```bash candlestick-chart \ --mode=csv-file \ --file='./examples/BTC-USD.csv' \ --chart-name='My BTC Chart' \ --bear-color='#b967ff' \ --bull-color='ff6b99' ``` -------------------------------- ### Parse Candles from CSV Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Load candle data from a CSV file containing OHLC columns. Optional volume and timestamp columns are supported. ```python from candlestick_chart import Chart from candlestick_chart.utils import parse_candles_from_csv # CSV file format: # timestamp,open,high,low,close,volume # 1652997600,28994.009766,29600.626953,28803.585938,29374.152344,40730301359 # 1653084000,29376.455078,33155.117188,29091.181641,32127.267578,67865420765 candles = parse_candles_from_csv("./data/BTC-USD.csv") chart = Chart(candles, title="BTC/USDT from CSV") chart.set_bear_color(1, 205, 254) chart.set_bull_color(255, 107, 153) chart.draw() ``` -------------------------------- ### Parse Candles from Stdin Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Read JSON-formatted candle data directly from standard input for use in command-line pipelines. ```python from candlestick_chart import Chart from candlestick_chart.utils import parse_candles_from_stdin # Use with piped input: # echo '[{"open":100,"high":110,"low":95,"close":105}]' | python script.py candles = parse_candles_from_stdin() chart = Chart(candles, title="Stdin Chart") chart.draw() ``` -------------------------------- ### Chart Class Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt The Chart class is the main entry point for rendering candlestick charts in the terminal. ```APIDOC ## Chart Class ### Description Handles the rendering of candlestick data in the terminal with support for custom colors, labels, and volume panes. ### Methods - **__init__(candles, title)**: Initializes the chart with a list of Candle objects. - **draw()**: Renders the chart to the terminal. - **set_bull_color(r, g, b)**: Sets the RGB color for bullish candles. - **set_bear_color(r, g, b)**: Sets the RGB color for bearish candles. - **set_label(key, value)**: Sets custom text for info bar labels. - **set_volume_pane_enabled(bool)**: Toggles the visibility of the volume pane. ``` -------------------------------- ### Parse Candles from JSON Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Load candle data from a JSON file containing an array of OHLC objects. ```python from candlestick_chart import Chart from candlestick_chart.utils import fnum, parse_candles_from_json # JSON file format: # [ # {"open": 28994.009766, "high": 29600.626953, "low": 28803.585938, "close": 29374.152344}, # {"open": 29376.455078, "high": 33155.117188, "low": 29091.181641, "close": 32127.267578, "volume": 67865420765} # ] candles = parse_candles_from_json("./data/BTC-chart.json") chart = Chart(candles, title="BTC Chart from JSON") chart.set_bear_color(1, 205, 254) chart.set_bull_color(255, 107, 153) chart.set_highlight(fnum(30544.20), (0, 0, 255)) chart.draw() ``` -------------------------------- ### Highlight Prices on Y-Axis Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Mark specific price levels with custom colors using named colors, RGB tuples, or ANSI codes. The fnum function ensures consistent number formatting for matching. ```python from candlestick_chart import Candle, Chart from candlestick_chart.utils import fnum candles = [ Candle(open=52000.0, close=52348.63, high=52500.0, low=51800.0), Candle(open=52348.63, close=52100.0, high=52400.0, low=52000.0), Candle(open=52100.0, close=52800.0, high=53000.0, low=52050.0), ] chart = Chart(candles, title="Price Highlights") # Highlight using named color chart.set_highlight(fnum(52348.63), "red") # Highlight using RGB tuple chart.set_highlight(fnum(52800.0), (0, 255, 0)) # Highlight using ANSI color code chart.set_highlight(fnum(52000.0), "93m") # Yellow chart.set_highlight(fnum(51800.0), "91;47m") # Red on white background # Remove a highlight by passing empty string chart.set_highlight(fnum(52348.63), "") chart.draw() ``` -------------------------------- ### JSON format for candlestick data Source: https://github.com/bobotig/py-candlestick-chart/blob/main/README.md This is the expected JSON format when using the 'json-file' or 'stdin' mode for the candlestick-chart binary. Each object represents a candle with mandatory open, high, low, and close prices. ```json [ { "open": 28994.009766, "high": 29600.626953, "low": 28803.585938, "close": 29374.152344 }, ... ] ``` -------------------------------- ### Configure Chart Display Constants Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Modifies global constants to customize chart appearance, including Y-axis position, number precision, Y-axis spacing and rounding, and Unicode characters for chart elements. ```python from candlestick_chart import constants, Chart, Candle # Y-axis position (left or right) constants.Y_AXIS_ON_THE_RIGHT = True # Number formatting precision constants.PRECISION = 4 # Decimals for numbers >= 1 constants.PRECISION_SMALL = 6 # Decimals for numbers < 1 # Y-axis spacing between graduations constants.Y_AXIS_SPACING = 3 # Lower = more graduations # Price rounding on Y-axis constants.Y_AXIS_ROUND_DIR = "down" # Or "up" constants.Y_AXIS_ROUND_MULTIPLIER = 1 / 0.01 # Round to 2 decimals # Unicode characters for chart elements constants.UNICODE_BODY = "┃" constants.UNICODE_WICK = "│" constants.UNICODE_VOID = " " candles = [ Candle(open=100, close=110, high=115, low=95), Candle(open=110, close=105, high=112, low=102), ] chart = Chart(candles, title="Custom Constants") chart.draw() ``` -------------------------------- ### Convert Hexadecimal Colors to RGB Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Converts hexadecimal color codes (with or without '#') to RGB tuples using `hexa_to_rgb`. These RGB tuples can then be used to set chart colors. ```python from candlestick_chart import Chart, Candle from candlestick_chart.utils import hexa_to_rgb # Convert hex colors bear_rgb = hexa_to_rgb("#b967ff") # (185, 103, 255) bull_rgb = hexa_to_rgb("ff6b99") # (255, 107, 153) - # prefix optional candles = [Candle(open=100, close=110, high=115, low=95)] chart = Chart(candles, title="Hex Colors") chart.set_bear_color(*bear_rgb) chart.set_bull_color(*bull_rgb) chart.draw() ``` -------------------------------- ### Candle Class Usage Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt The Candle class represents OHLC data, volume, and timestamp for a single data point. It automatically determines if a candle is bullish or bearish. Access properties like 'type' and use repr() for a string representation. ```python from candlestick_chart import Candle # Create a bullish candle (close > open) bullish = Candle( open=28994.00, close=29374.15, # Higher than open = bullish high=29600.62, low=28803.58, volume=40730301359, # Optional timestamp=1652997600 # Optional Unix timestamp ) # Create a bearish candle (close < open) bearish = Candle( open=32810.94, close=31971.91, # Lower than open = bearish high=33440.21, low=28722.75 ) # Access candle properties print(bullish.type) # 1 (bullish) print(bearish.type) # 0 (bearish) print(repr(bullish)) ``` -------------------------------- ### Supported fields for candlestick data Source: https://github.com/bobotig/py-candlestick-chart/blob/main/README.md This Python code snippet lists the supported fields for each candle object when providing data to the candlestick-chart library. 'open', 'close', 'high', and 'low' are mandatory. ```python "open": float # mandatory "close": float # mandatory "high": float # mandatory "low": float # mandatory "volume": float "timestamp": float ``` -------------------------------- ### Candle Class Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt The Candle class represents a single candlestick with OHLC (Open, High, Low, Close) data, volume, and timestamp. ```APIDOC ## Candle Class ### Description Represents a single candlestick data point. It automatically determines if the candle is bullish or bearish based on the open and close prices. ### Parameters - **open** (float) - Required - Opening price - **close** (float) - Required - Closing price - **high** (float) - Required - Highest price - **low** (float) - Required - Lowest price - **volume** (float) - Optional - Trading volume - **timestamp** (int) - Optional - Unix timestamp ``` -------------------------------- ### Customizing Chart Labels Source: https://context7.com/bobotig/py-candlestick-chart/llms.txt Modify or hide chart labels like 'highest', 'lowest', 'average', and 'volume' by setting their text using set_label. The chart name can be changed with set_name. ```python from candlestick_chart import Candle, Chart candles = [ Candle(open=100.0, close=110.0, high=115.0, low=95.0), Candle(open=110.0, close=105.0, high=112.0, low=102.0), ] chart = Chart(candles, title="Custom Labels") # Set custom label text chart.set_label("highest", "ATH") # All-Time High chart.set_label("lowest", "ATL") # All-Time Low # Hide labels by setting to empty string chart.set_label("average", "") # Hide average chart.set_label("volume", "") # Hide cumulative volume # Change the chart name in the info bar chart.set_name("ETH/USDT") chart.draw() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.