Skip to content

mr-baraiya/Candle-stick-pattern-recognition-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Candlestick Pattern Recognition Tool

This project is a web-based tool for detecting and visualizing candlestick patterns in financial time series data. It is designed to help traders and analysts identify key reversal and continuation patterns in stock price charts, using uploaded or provided OHLCV (Open, High, Low, Close, Volume) data.

Features

  • Automatic Pattern Detection: Identifies popular candlestick patterns such as Hammer, Doji, Rising Window (Gap Up), Evening Star, and Three White Soldiers using algorithmic methods.
  • Single Symbol Analysis: Analyze candlestick patterns for individual companies over selected timeframes.
  • Pattern Scanner: Scan across multiple companies and timeframes to discover significant patterns.
  • Interactive Visualizations: Uses Plotly and Bootstrap for interactive, responsive charting and results display.
  • Detailed Pattern Information: Provides explanations, visuals, and statistics for each detected pattern, including occurrence time and signal type.
  • User-Friendly Interface: Built with Bootstrap and Font Awesome for a modern, accessible user experience.

How It Works

  1. Upload Data: Provide your own CSV file(s) containing historical price data. The tool preprocesses this data to ensure compatibility (supports columns in both lowercase and uppercase).
  2. Pattern Analysis: The backend applies a series of pattern recognition functions to each candlestick or group of candlesticks, marking occurrences in the data.
  3. Visualization: Detected patterns are summarized in tables and visualized on interactive candlestick charts for easy review.
  4. Pattern Details: Selecting a pattern occurrence provides an in-depth explanation and zoomed chart for focused analysis.

Detected Patterns

  • Hammer: Bullish reversal pattern at the bottom of a downtrend.
  • Doji: Neutral/Indecision pattern indicating possible trend reversal.
  • Rising Window: Bullish continuation signaled by a price gap up.
  • Evening Star: Bearish reversal formed by a three-candle sequence.
  • Three White Soldiers: Bullish reversal with three consecutive long bullish candles.

Technologies Used

  • Python (Pandas, Plotly)
  • Flask (for the web application)
  • HTML/CSS (Bootstrap, Font Awesome, Bootstrap Icons)
  • Jinja2 templating

Team Members

  • Haresh Zapadiya
    Worked on data-related tasks, backend development, and provided Python support.

  • Deven Machchhar
    Focused on research, development, and testing.

  • Dhruvrajsinh Zala
    Possesses strong knowledge of trading and contributed as a frontend designer.

  • Vishal Baraiya (Team Leader)
    Led the backend development, managed code merging and bug fixing, and effectively utilized AI tools.

Getting Started

  1. Clone this repository:

    git clone https://github.com/mr-baraiya/Candle-stick-pattern-recognition-tool.git
    cd Candle-stick-pattern-recognition-tool
  2. Create a virtual environment (if not already created):

    python -m venv venv
  3. Activate the virtual environment:

    • Windows:

      venv\Scripts\activate
    • macOS/Linux:

      source venv/bin/activate
  4. Install dependencies from requirements.txt:

    pip install -r requirements.txt
  5. Run the application:

    python run.py
  6. Open your browser at http://localhost:5000 and start analyzing candlestick patterns!

Folder Structure

app/
 ├─ patterns.py          # Pattern detection logic
 ├─ preprocess_data.py   # Data cleaning and preprocessing
 ├─ pattern_scanner.py   # Scanning logic for multiple patterns
 ├─ visualize.py         # Visualization functions
 ├─ routes.py            # Flask routes and web logic
 └─ templates/           # HTML templates for UI

License

MIT License


This tool is intended for educational and informational purposes only. Always backtest and confirm patterns with additional analysis before making trading decisions.

About

A Python-based tool to detect and visualize candlestick chart patterns using Plotly. Helps traders identify bullish/bearish signals from stock data interactively.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors