Skip to content

foxy1402/candlestick-watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ•―οΈ Crypto Candlestick Pattern Watcher

A Streamlit web application for long-term crypto investors. Analyzes market phases (Accumulation/Distribution), detects 50+ candlestick patterns, provides entry signals, and monitors derivatives data (Open Interest, Funding Rate, Long/Short Ratio).

Python Streamlit TA-Lib Coinalyze

✨ Features

Feature Description
πŸ“‹ Watchlist Dashboard Monitor multiple assets at a glance with A/D status
🟒 Phase Zones Shaded chart areas showing Accumulation/Distribution periods
πŸ›’ Simplified Wyckoff Beginner-friendly labels: "Smart Money Buying/Selling"
⭐ Entry Signals Strong Buy/Sell when A/D + Pattern align
πŸ”„ Timeframe Compare Daily vs Weekly alignment check
50+ Patterns Hammer, Doji, Engulfing, Morning Star, and more
πŸ“ˆ Open Interest Monitor Derivatives analysis with investment scoring

πŸ“ˆ Open Interest Monitor (NEW)

Analyze futures market data for smarter investment decisions:

  • Open Interest (OI): Track rising/falling OI with price divergence
  • Funding Rate: Identify market sentiment (bullish/bearish bias)
  • Long/Short Ratio: See market positioning at a glance
  • Investment Score: 0-100 score combining all derivatives metrics
  • Historical Signals: Visual markers showing past bullish/bearish signals

Derivatives Signal Interpretation

OI Change Price Change Signal Meaning
↑ Rising ↑ Rising 🟒 Bullish New money entering, trend strengthening
↑ Rising ↓ Falling πŸ”΄ Bearish Short sellers entering aggressively
↓ Falling ↑ Rising 🟑 Weak Rally Short covering, may not sustain
↓ Falling ↓ Falling 🟠 Capitulation Liquidations, potential bottom

πŸš€ Live Demo

Open App

πŸ“Š How to Use (For Long-Term Investors)

1. Watchlist Dashboard

Add your favorite coins (BTC, ETH, SOL, etc.) and see which ones are in Accumulation (🟒) or Distribution (πŸ”΄) at a glance.

2. Single Asset Analysis

Select a coin and click "Analyze" to see:

  • Phase Zones: Green shaded areas = Accumulation periods
  • Wyckoff Phase: Simple labels like "Smart Money Buying"
  • Entry Signals: ⭐ markers when pattern + phase align

3. Timeframe Comparison

Check if Daily AND Weekly charts agree:

  • βœ… Both bullish = High confidence entry
  • ⚠️ Mixed = Wait for confirmation

4. Open Interest Monitor

Select a coin and analyze derivatives data:

  • 4-Hour Resolution: ~3 months of data for short-term trends
  • Daily Resolution: ~1 year of data for long-term analysis
  • Investment Score: 0-100 rating based on derivatives health

πŸ› οΈ Tech Stack

  • Frontend: Streamlit
  • Data Sources:
    • Yahoo Finance (yfinance) - Default, native daily + weekly support
    • CryptoCompare API - Alternative source, best for daily timeframe
  • Derivatives: Coinalyze API
  • Analysis: TA-Lib (Technical Analysis Library)
  • Charts: Plotly

Data Source Toggle

The app includes a toggle to switch between Yahoo Finance and CryptoCompare:

  • Yahoo Finance (Default): Recommended for weekly timeframe analysis as it provides native weekly candlestick data
  • CryptoCompare: Great for daily timeframe, but weekly data is simulated by aggregating daily candles (less accurate for weekly analysis)

πŸ“¦ Installation (Local)

# Clone repo
git clone https://github.com/foxy1402/candlestick-watcher.git
cd candlestick-watcher

# Install dependencies (requires TA-Lib C library)
pip install -r requirements.txt

# Run
streamlit run app.py

⚠️ Note: TA-Lib requires a C library. On Windows, use pre-built wheels. On Linux/Mac, install via brew install ta-lib or apt-get install libta-lib-dev.

☁️ Deploy to Streamlit Cloud

  1. Push this repo to GitHub
  2. Go to share.streamlit.io
  3. Connect your repo, select app.py
  4. Add Secrets (Settings β†’ Secrets):
    COINALYZE_API_KEY = "your-api-key-here"
  5. Deploy!

Getting a Coinalyze API Key

  1. Sign up at coinalyze.net
  2. Get your free API key (1000 calls/month)
  3. Add to Streamlit Secrets as shown above

🐳 Docker / GHCR Deployment

Every push to main/master (and every v* tag) builds a container image and publishes it to the GitHub Container Registry via GitHub Actions (.github/workflows/docker-publish.yml). No registry secrets are required β€” it uses the built-in GITHUB_TOKEN.

Image: ghcr.io/foxy1402/candlestick-watcher:latest

After the first successful run, open the package on GitHub β†’ Package settings and set visibility to Public if you want to pull it without authentication.

Environment variables

Variable Default Description
PORT 8501 Port the app listens on. Most PaaS inject this automatically.
COINALYZE_API_KEY – Required for the Open Interest Monitor.
CRYPTOCOMPARE_API_KEY – Optional alternative price data source.

Run locally

docker run --rm -p 8501:8501 \
  -e COINALYZE_API_KEY=your-key \
  ghcr.io/foxy1402/candlestick-watcher:latest
# open http://localhost:8501

To run on a different port:

docker run --rm -e PORT=9000 -p 9000:9000 ghcr.io/foxy1402/candlestick-watcher:latest

Deploy on Render

  1. New β†’ Web Service β†’ Deploy an existing image from a registry
  2. Image URL: ghcr.io/foxy1402/candlestick-watcher:latest
  3. Render sets PORT automatically β€” the app binds to it, no extra config needed.
  4. Add COINALYZE_API_KEY under Environment.

Deploy on Portainer

  1. Stacks / Containers β†’ Add container
  2. Image: ghcr.io/foxy1402/candlestick-watcher:latest
  3. Map a host port to container port 8501 (or set PORT and map that port).
  4. Add env vars (PORT, COINALYZE_API_KEY) under Env.

Build the image yourself

docker build -t candlestick-watcher .
docker run --rm -p 8501:8501 candlestick-watcher

πŸ“ License

MIT

πŸ™ Credits

About

Long-term crypto investment tool. Analyzes Wyckoff phases, 50+ candlestick patterns, Open Interest divergence. Get entry signals when pattern + accumulation align.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors