Frexai is a cross-platform, analysis-only forex workbench built around typed services, optional market-data providers, and explainable trading outputs.
The current hardening pass is focused on trustworthiness:
- macOS and Windows can run the core app without MetaTrader 5 installed
- provider failures degrade gracefully instead of crashing startup
- risk, confluence, backtesting, journaling, and ML outputs are structured and testable
- runtime artifacts live outside tracked source files
- Analyze forex candles from CSV, Twelve Data, or MetaTrader 5
- Score trade ideas with explicit factor-by-factor reasoning
- Compare multi-timeframe confluence using more than simple trend matching
- Run backtests with shared execution assumptions
- Keep live/manual journal entries separate from backtest records
- Train and inspect a walk-forward ML model report
- Send optional email or Telegram alerts with chart snapshots
Frexai is intentionally provider-safe.
csv: always availabletwelvedata: available when the package is installed and an API key is configuredmt5: optional; only appears as usable when MetaTrader 5 is available on the machine/session
This means a Mac can run the full CSV/Twelve Data workflow without MT5 installed.
Preferred workflow with uv:
git clone https://github.com/Praisser/Frexai.git
cd Frexai
uv sync --extra dev
cp .env.example .env
cp secrets.example.json secrets.json
uv run streamlit run gui_app.pyIf you prefer standard venv + pip:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
cp .env.example .env
cp secrets.example.json secrets.json
streamlit run gui_app.pySettings load in this order:
- environment variables
- private local JSON (
config/local.settings.jsonorsecrets.json) - Streamlit secrets
- tracked defaults in
config/alerts_config.json
Useful environment variables:
FREXAI_DEFAULT_PROVIDERTD_API_KEYorTWELVEDATA_API_KEYFREXAI_RUNTIME_DIRFREXAI_SEND_ALERTSFREXAI_ENABLE_EMAIL_ALERTSFREXAI_ENABLE_TELEGRAM_ALERTS
Tracked config is intentionally disabled. Put real credentials in .env, secrets.json, or config/local.settings.json.
Frexai now writes runtime state under .frexai/ by default:
.frexai/charts/.frexai/journals/.frexai/models/.frexai/state/.frexai/uploads/
Old tracked artifacts like root-level charts, journals, user config, and model binaries are no longer the source of truth.
src/models.py Typed request/result models
src/settings.py Config loading and precedence
src/providers/ CSV, Twelve Data, and MT5 provider adapters
src/services/ Analysis, backtest, journal, and ML service layer
gui_app.py Streamlit presentation layer
main.py CLI entry point
tests/ pytest coverage for config, providers, analysis, backtesting, ML, and smoke flows
Run the quality gates:
uv run pytest
uv run ruff check .
uv run mypy srcInstall hooks:
uv run pre-commit install- Frexai is analysis-only. It does not place broker orders.
- MT5 is optional and must never block CSV or Twelve Data workflows.
- The model report is more important than the raw prediction label; always review the validation summary before trusting a signal.