Streamlit-powered command center for watching Bitcoin price action, producing RSI/MACD-informed trade calls, and auditing simulated performance without leaving your browser.
- Market data ingestion — fetches BTC-USD candles from Yahoo Finance, then reshapes them into 4h, weekly, or monthly frames automatically.
- Signal engine — couples RSI crossover triggers with EMA trend gating, MACD confirmation, and divergence annotations.
- Backtesting — simulates long-only execution with fees and slippage baked in, reporting win rate, drawdown, exposure, and every trade.
- Interactive UI — Plotly overlays, downloadable CSV output, and an auto-refresh toggle keep dashboards current.
- Automated tests — unit suites cover the strategy core and backtester to guard against regressions.
git clone https://github.com/angeloudebedout/BTCSignalBot.git
cd BTCSignalBot
# Create a Python environment (recommended)
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
# Run unit tests
python -m unittest discover -s Tests
# Launch the dashboard
streamlit run streamlit_app.pyThe Streamlit board boots into 4h candles with auto-refresh enabled. Adjust indicator knobs in the sidebar and flip on overlays for MACD, RSI, EMAs, Bollinger Bands, divergence markers, or backtest trades.
from signalbot.main import run
df = run(interval="1h", oversold=25, overbought=75, lookback_days=120)
print(df.tail()[["close", "rsi", "signal", "signal_strength"]])signalbot.backtest.backtest_signals(df) yields (metrics, trades_df, equity_curve), letting you slot the simulated track record into other workflows.
- Push the repository to GitHub.
- On share.streamlit.io, create a new app pointing to
streamlit_app.py. - Use
python -m venv .venv && pip install -r requirements.txtfor the build step (or lean on Streamlit Cloud's cached pip env). - Surface
streamlit_app.pyas the entry point—auto-refresh is already wired up.
signalbot/
data.py # Yahoo Finance ingestion helpers
indicators.py # RSI, EMA, MACD, Bollinger, candlestick patterns
strategy.py # Signal generation and divergence detection
backtest.py # Fee-aware performance simulation
plotting.py # Plotly figure factories used by the UI
streamlit_app.py # Streamlit dashboard
Tests/ # Unit tests for strategy and backtester
Issues and PRs are welcome. Please:
- Keep the test suite green (
python -m unittest discover -s Tests) - Run
python -m compileall streamlit_app.py signalbot Teststo catch syntax errors - Use descriptive commit messages so deployment diffs stay clear
Maintained by Angelou deBedout. If you ship improvements or deploy your own dashboard, feel free to share! 🚀
This project was developed and tested with:
| Library | Version |
|---|---|
| Python | 3.10+ |
| streamlit | 1.39.0 |
| streamlit-autorefresh | 1.0.1 |
| plotly | 5.24.1 |
| pandas | 2.2.3 |
| numpy | 1.26.4 |
| matplotlib | 3.9.2 |
| requests | 2.32.3 |
| openpyxl | 3.1.5 |
| yfinance | 0.2.43 |
| pytest | 8.3.3 |
python3 -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txt
streamlit run streamlit_app.py