ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Python version of QChartViewer and Max Drawdown Indicator
Posted by Rafael on Oct-30-2022 01:59

first, I'd like to congrats everyone behind the whole project, I'm adding it to a personal project and it's being a pleasure to work with.

I have 2 questions if you don't mind,

1) Is there a python version of the QChartViewer implementation, I'd like to use some of its features like the rate limit etc, to do a more "real-time" updates to the financial graph, I'm currently using the good old QLabel to plot it.

2) I need to plot in a subgraph, or like an indicator bellow my main candlestick graph, the max drawdown, looking in the list of indicators available in the Python version I don't see any related to drawdown, I'm already calculating it using pandas, I just need a way to plot it. The question is, does the python lib support creating custom indicators? because I didn't see any example of this, only importing already build indicators.

I'm attaching an example from matplotlib of the max drawdown that I'm trying to port to FinanceChart. it goes from 0 to a certain percentage, and a custom label, Max Drawdown.

Thank you very much!

  Re: Python version of QChartViewer and Max Drawdown Indicator
Posted by Peter Kwan on Oct-30-2022 18:03
Hi Rafael,

1) For using ChartDirector for Python with Qt, I believe you have already found an example and posted it in the following thread:

2. For the max drawdown indicator, ChartDirector FinanceChart allows you to add custom indicators. Basically, you may provide an array of values (similar to the closeData array, except that it contains your customer indicator), and you can ask ChartDirector for plot it as an indicator chart.

You can also add extra lines, bars or other chart types to the main price chart or to an existing indicator chart. The full API is at:

Best Regards
Peter Kwan