Skip to content

Intelligent candlestick pattern recognition study for MotiveWave with 33+ patterns, dual MA trend detection (50/200), and context-aware filtering. Detects bullish/bearish reversals, neutral patterns, and emits trading signals. MIT licensed.

License

Notifications You must be signed in to change notification settings

RauchenwaldC/motivewave-candlestick-pattern-study

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Candlestick Patterns Study for MotiveWave

Overview

The Candlestick Patterns Study is a comprehensive MotiveWave study that automatically detects and highlights bullish, bearish, and neutral candlestick patterns on your charts. This study recognizes over 30 different patterns including single-bar, double-bar, and triple-bar formations with visual markers and tooltips.

Key Features:

  • 33+ candlestick patterns with detailed tooltips
  • Intelligent trend detection using 50/200 moving averages
  • Context-aware pattern filtering (patterns only appear in correct market trends)
  • Customizable complexity controls (1-bar, 2-bar, 3-bar patterns)
  • Dedicated confirmation pattern toggle
  • Trading signal support for automated strategies

Features

Pattern Detection

The study detects 33+ candlestick patterns across three categories. For detailed descriptions of each pattern, see PATTERNS.md.

Single-Bar Patterns

Bullish:

Bearish:

Neutral:

Double-Bar Patterns

Bullish:

Bearish:

Triple-Bar Patterns

Bullish:

Bearish:

Visual Elements

  • Colored Markers: Each pattern is marked with a colored marker
    • Green triangles (bottom, very small) for bullish patterns
    • Red triangles (top, very small) for bearish patterns
    • Orange circles (center, medium) for neutral patterns
  • Tooltips: Hover over any marker to see the pattern name and its meaning from The Chart Guys
  • Customizable Markers: Adjust colors, sizes, and styles for each pattern type
  • Smart Detection: Prevents duplicate markings of the same pattern in continuous trends
  • Trend-Aware Display: Patterns only appear when market conditions make them meaningful
  • Signal Support: Emits BULLISH_PATTERN and BEARISH_PATTERN signals for automated strategies

Configuration Options

Pattern Types

  • Detect Bullish Patterns: Enable/disable bullish pattern detection
  • Detect Bearish Patterns: Enable/disable bearish pattern detection
  • Detect Neutral Patterns: Enable/disable neutral pattern detection

Pattern Complexity

  • Detect 1-Bar Patterns: Toggle single-bar patterns (Doji, Hammer, Marubozu, etc.)
  • Detect 2-Bar Patterns: Toggle double-bar patterns (Engulfing, Harami, Piercing Line, etc.)
  • Detect 3-Bar Patterns: Toggle triple-bar patterns (Morning/Evening Star, Three White Soldiers, etc.)
  • Detect Confirmation Patterns: Toggle confirmation patterns (Three Inside Up/Down, Three Outside Up/Down)

Trend Detection

  • Require Correct Trend Context: Enable/disable trend-based pattern filtering
  • Fast MA Period: Fast moving average period for trend detection (default: 50)
  • Slow MA Period: Slow moving average period for trend detection (default: 200)
  • Trend Threshold %: Minimum price deviation from 200MA to confirm trend (default: 0.5%)

When trend filtering is enabled, reversal patterns only appear in the correct market context:

  • Bullish reversals (Hammer, Morning Star, etc.) only show in downtrends
  • Bearish reversals (Shooting Star, Evening Star, etc.) only show in uptrends
  • Neutral patterns (Doji, Spinning Top) appear in all market conditions

This significantly improves signal quality by preventing patterns from appearing where they lack predictive value.

Display Settings

  • Bullish Marker: Customize color, size, and style for bullish patterns
  • Bearish Marker: Customize color, size, and style for bearish patterns
  • Neutral Marker: Customize color, size, and style for neutral patterns

Installation

Download from GitHub Releases (Recommended)

  1. Download the JAR file:

    • Go to Releases
    • Download CandlestickPatterns.jar from the latest release
  2. Import into MotiveWave:

    • Open MotiveWave
    • Click Study menu in the top menu bar
    • Select All Studies
    • Click Import button in the dialog
    • Navigate to and select the downloaded JAR file
    • Click OK
  3. Add to Chart:

    • In the All Studies dialog, search for "Candlestick Patterns"
    • Select it and click Add to add it to your chart

Building from Source

If you want to modify the study or build it yourself:

  1. Prerequisites:

    • Java 21 or higher
    • MotiveWave installed on your system
  2. Build the JAR:

    chmod +x build.sh
    ./build.sh

    The JAR will be created in dist/CandlestickPatterns.jar

  3. Import to MotiveWave (same as above):

    • Study → All Studies → Import → Select the JAR from dist/ folder

Development & Testing

For rapid development iteration:

chmod +x deploy.sh
./deploy.sh

This script:

  • Compiles the study
  • Deploys directly to ~/MotiveWave Extensions/dev/
  • MotiveWave automatically reloads the study (if running)
  • Ideal for testing changes without manual import/restart

Usage

  1. Add Study to Chart:

    • Study menu → All Studies
    • Search for "Candlestick Patterns"
    • Click Add
  2. Configure Settings:

    • Right-click the study on chart → Edit Study
    • Enable/disable pattern types (bullish, bearish, neutral)
    • Toggle pattern complexity (1-bar, 2-bar, 3-bar patterns)
    • Customize marker colors and sizes
  3. Analyze: Patterns are automatically detected and displayed with tooltips

Parameters

| Parameter | Description | Default | |-----------|-------------|---------|| | Pattern Types | | | | Detect Bullish Patterns | Show bullish pattern markers | true | | Detect Bearish Patterns | Show bearish pattern markers | true | | Detect Neutral Patterns | Show neutral pattern markers | true | | Pattern Complexity | | | | Detect 1-Bar Patterns | Show single-bar patterns | true | | Detect 2-Bar Patterns | Show double-bar patterns | true | | Detect 3-Bar Patterns | Show triple-bar patterns | true | | Detect Confirmation Patterns | Show Three Inside/Outside patterns | true | | Trend Detection | | | | Require Correct Trend Context | Filter patterns by market trend | true | | Fast MA Period | Fast moving average period | 50 | | Slow MA Period | Slow moving average period | 200 | | Trend Threshold % | Price deviation threshold | 0.5% | | Display | | | | Bullish Marker | Marker style for bullish patterns | Green arrow (very small, bottom) | | Bearish Marker | Marker style for bearish patterns | Red arrow (very small, top) | | Neutral Marker | Marker style for neutral patterns | Orange circle (medium, center) |

File Structure

Candlestick-Patterns/
├── src/
│   └── CandlestickPatterns.java  # Main study implementation
├── build.sh                       # Build script
├── deploy.sh                      # Development deployment script
├── MANIFEST.MF                    # JAR manifest file
├── CHANGELOG.md                   # Version history
├── PATTERNS.md                    # Detailed pattern reference guide
└── README.md                      # This file

Technical Details

  • Namespace: com.motivewave
  • Study ID: CANDLESTICK_PATTERNS
  • Menu Location: General
  • Overlay: Yes (displays on price chart)
  • Signal Support: Yes (emits BULLISH_PATTERN and BEARISH_PATTERN signals)
  • Bar Updates Required: Yes (for real-time pattern detection)

Signals

The study emits two types of signals that can be used for alerts and automated trading:

BULLISH_PATTERN

  • Triggered: When a bullish candlestick pattern is detected
  • Data: Pattern name and closing price
  • Use Cases: Long entry signals, bullish reversal alerts, trend confirmation

BEARISH_PATTERN

  • Triggered: When a bearish candlestick pattern is detected
  • Data: Pattern name and closing price
  • Use Cases: Short entry signals, bearish reversal alerts, exit signals

To use signals:

  1. Right-click on the study → Signals
  2. Enable "BULLISH_PATTERN" and/or "BEARISH_PATTERN"
  3. Configure alerts or connect to trading strategies

Pattern Recognition Logic

The study uses sophisticated algorithms to identify patterns based on:

  • Body-to-range ratios
  • Shadow lengths
  • Multi-candle relationships
  • Open/close positioning
  • High/low comparisons

Each pattern is checked according to traditional candlestick analysis rules as documented in the Chart Guys Candlestick Pattern Cheat Sheet.

Contributing

Contributions are welcome! Here's how you can help:

Reporting Issues

If you encounter bugs or have feature requests:

  1. Check existing issues first
  2. Create a new issue using the issue template
  3. Provide detailed information:
    • MotiveWave version
    • Study version
    • Steps to reproduce
    • Expected vs actual behavior
    • Screenshots if applicable

Submitting Changes

  1. Fork the repository

  2. Create a feature branch:

    git checkout -b feature/your-feature-name
  3. Make your changes:

    • Follow existing code style
    • Test thoroughly using ./deploy.sh
    • Update documentation if needed
  4. Commit your changes:

    git commit -m "Add: description of your changes"
  5. Push and create a Pull Request:

    git push origin feature/your-feature-name

Development Guidelines

  • Test all pattern detection changes on various chart timeframes
  • Ensure backward compatibility with existing configurations
  • Document any new settings or features in README.md
  • Update CHANGELOG.md with your changes

Version History

See CHANGELOG.md for detailed version history.

License

This project is licensed under the MIT License - see the LICENSE file for details.

This means you are free to use, modify, and distribute this study, even for commercial purposes, with proper attribution.

Support

Note: This is an open-source project provided as-is without official support.

Getting Help

No Warranty

This software is provided "as is", without warranty of any kind. Use at your own risk.

About

Intelligent candlestick pattern recognition study for MotiveWave with 33+ patterns, dual MA trend detection (50/200), and context-aware filtering. Detects bullish/bearish reversals, neutral patterns, and emits trading signals. MIT licensed.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project