.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/candlestick_chart.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_candlestick_chart.py: Fast Candlestick Charts ======================= TradeTide draws candles with a small number of Matplotlib collections instead of creating one artist per bar. This makes the visualisation practical for large intraday datasets. By default, the renderer aggregates data to no more than 2,000 visible candles while preserving each bucket's OHLC values. .. GENERATED FROM PYTHON SOURCE LINES 12-14 Load a bundled market and render the ask side. Pass ``max_candles=None`` to display every observation, or lower it further for fast interactive views. .. GENERATED FROM PYTHON SOURCE LINES 14-21 .. code-block:: Python from TradeTide import Currency, Market from TradeTide.times import days market = Market() market.load_from_database(Currency.EUR, Currency.USD, time_span=100 * days) market.plot_candles(side="ask", max_candles=500) .. image-sg:: /gallery/images/sphx_glr_candlestick_chart_001.png :alt: EUR/USD - candles :srcset: /gallery/images/sphx_glr_candlestick_chart_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none
.. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.531 seconds) .. _sphx_glr_download_gallery_candlestick_chart.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: candlestick_chart.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: candlestick_chart.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: candlestick_chart.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_