-
Notifications
You must be signed in to change notification settings - Fork 44
AI‐Powered Market Indicator Plugin Generation
This guide explains how to use the curated AI prompt to generate market indicator plugins for the chart.py.
The prompt is tested and optimized for both ChatGPT and DeepSeek.
- Access to the charting application repository
- The AI prompt file:
src/renderer/plugins/plugin-ai-prompt.md - A ChatGPT or DeepSeek account
Start a fresh conversation. For DeepSeek, choose Expert if necessary.
Attach the entire src/renderer/plugins/plugin-ai-prompt.md file to the AI chat.
Or alternatively open the file and copy its entire contents into the prompt.
This prompt contains:
- Complete plugin system architecture documentation
- Function signature requirements
- Panel allocation rules
- Coding standards and helper utilities
- Output format specifications
The AI will acknowledge and ask which indicator you'd like to generate
Once the AI acknowledges the system prompt, provide the full name of the indicator you want. Alternatively you may add:
- specific default configuration,
- steps to calculate the indicator
- Any additional customization steps.
Example requests:
"Ichimoku Cloud"
"Money Flow Index (MFI) with a 14-period default and overbought/oversold lines at 80/20"
You can also request use of third party libraries like
TA-Liborpandas-ta. Make sure to install these libraries before running the plugins.
The AI will output exactly three sections plus notes:
-
Plugin File — Save as
renderer/plugins/<module_name>.py -
Configuration Block — Merge into
defs/user.jsonunder theCHART_PLUGINSobject - Usage Example — The CLI command to activate the plugin
- Notes — Important implementation details
-
Ensure the plugin module is saved in the correct location:
renderer/plugins/<module_name>.py -
Verify the configuration is properly merged into
defs/user.json:{ "CHART_PLUGINS": { "YOUR_INDICATOR_KEY": { "name": "module_name", "option": "cli-option-name", ... } } } -
Run the chart with your new plugin:
python chart.py --sym RELIANCE --cli-option-name
- Verify the
"name"field in config matches the Python filename exactly (without.py) - Check that the module is in
renderer/plugins/ - Ensure no syntax errors in the generated code
- If you see too much or too little data, verify all
make_addplotcalls use.iloc[-display_period:]
- If indicators overlap unexpectedly, check the
panelconfiguration:-
"share": falsefor exclusive panels -
"allow_volume_panel": falseto prevent sharing with volume - Adjust
"preferred_axis"if two indicators conflict on the same y-axis
-
- The
lookbackvalue in config determines how much historical data is loaded. Increase it for indicators needing more history (e.g., 200-period MA needs"lookback": 200)