Skip to content
PraisserPublic

About

A modern Streamlit-based dashboard for real-time and historical Forex analysis. Includes technical indicators, strategy backtesting, trade alerts, and customizable visualizations.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Frexai

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

What It Does

  • 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

Platform Support

Frexai is intentionally provider-safe.

  • csv: always available
  • twelvedata: available when the package is installed and an API key is configured
  • mt5: 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.

Quick Start

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.py

If 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.py

Configuration

Settings load in this order:

  1. environment variables
  2. private local JSON (config/local.settings.json or secrets.json)
  3. Streamlit secrets
  4. tracked defaults in config/alerts_config.json

Useful environment variables:

  • FREXAI_DEFAULT_PROVIDER
  • TD_API_KEY or TWELVEDATA_API_KEY
  • FREXAI_RUNTIME_DIR
  • FREXAI_SEND_ALERTS
  • FREXAI_ENABLE_EMAIL_ALERTS
  • FREXAI_ENABLE_TELEGRAM_ALERTS

Tracked config is intentionally disabled. Put real credentials in .env, secrets.json, or config/local.settings.json.

Runtime Files

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.

Project Shape

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

Development

Run the quality gates:

uv run pytest
uv run ruff check .
uv run mypy src

Install hooks:

uv run pre-commit install

Notes

  • 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.

About

A modern Streamlit-based dashboard for real-time and historical Forex analysis. Includes technical indicators, strategy backtesting, trade alerts, and customizable visualizations.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages