For the build 326 of QChartist TA:
- i installed theses python modules:
python -m pip install numpy==1.24.3
python -m pip install pandas==2.0.3
python -m pip install pandas-ta-classic - i added example4.py
i tried example4.py : error…
python -m pip uninstall numpy pandas pandas-ta-classic
python -m pip install numpy==1.19.5
python -m pip install pandas==1.1.5
python -m pip install pandas-ta-classic –no-deps
python -m pip install python-dateutil pytz
python -m pip list
python -m pip install mplfinance –no-deps
python -m pip install matplotlib==3.3.4
python -m pip install taleb –no-deps
In your code, you just use import taleb as talib and it works the same way.
python -m pip install scipy==1.9.1 –no-deps - now i tried : python example4.py “YHOO1440.csv” “2014-01-01 00:00” “2
015-06-01 16:00″ yes
and yes it works, i managed to use pandas_ta on python 32-bit ! Chart saved as custom_chart.bmp and custom_chart.png
What is example4.py (which needs pandas):
This script is a command-line financial analysis tool designed to process stock/forex data from a CSV file, apply various technical indicators from two different libraries, and generate a visual candlestick chart saved as a high-compatibility image (.bmp).
Globally, the script operates in four distinct phases:
- Data Initialization and Filtering
The script starts by taking four command-line arguments: a CSV filename, a start date, an end date, and a toggle for volume.
It loads the CSV into a Pandas DataFrame.
It standardizes the columns to Open, High, Low, Close, and Volume.
It filters the data to only include the date range you specified in the terminal.
- Indicator Discovery
The script performs a “deep scan” of your installed libraries to see what tools are available:
pandas-ta-classic: It uses the inspect module to find every available function inside the library.
taleb (TA-Lib): It similarly scans for all uppercase built-in functions (standard for TA-Lib indicators like RSI, MACD, etc.).
It then prints a massive list of all combined indicators found so you know what you can choose from.
- Interactive Configuration
This is the “human-in-the-loop” part of the script:
Selection: It prompts you to type which indicators you want (e.g., sma, rsi, bbands).
Parameters: For every indicator you pick, it displays the help documentation for that specific function and asks you for parameters (like length=20).
Calculation: It runs the math and appends the new data (the indicator values) as new columns in your main DataFrame.
- Smart Visualization (Mplfinance)
The final phase is the most complex part of the code logic:
Panel Management: It automatically decides where to draw the indicators.
Overlays: Indicators like Moving Averages or Bollinger Bands are drawn directly on top of the price candles (Panel 0).
Oscillators: Indicators like RSI or MACD are given their own separate "panels" below the price chart so they don't clutter the main view.
Image Export: Instead of just popping up a window (which can be difficult in a Wine environment), it generates a plot, saves it as a .png, and then converts it to a .bmp. This is likely done for compatibility with older Windows image viewers or specific legacy software.
Pandas-TA is a popular and comprehensive Technical Analysis Library in Python 3 that leverages numba and numpy for accuracy and performance, and pandas for simplicity and bulk processing. The library contains more than 150 indicators and utilities as well as 60 Candlestick Patterns when TA Lib is installed.
Now thats a very good news that example4.py script works because we’ll be able to add and use all 130 Indicators and Utility functions from pandas ta to QChartist and much more !
More info here: https://github.com/Data-Analisis/Technical-Analysis-Indicators—Pandas
- build 326