百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

stock-pattern

> 编程语言
开源

Python CLI 扫描、检测和绘图库存图样的工具

399 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Python CLI 扫描、检测和绘图库存图样的工具

Stock-Pattern

A Python CLI scanner to detect and plot common chart patterns. Includes Harmonic chart patterns

Supports Python >= 3.8

If you :heart: my work so far, please :star2: this repo.


✨ Precise-Patterns has just been released. It is currently in initial development and reimagines the pattern detection process from the ground up, with many new improvements.

See the initial announcement and further discussions here.

These were a series of pattern scanners I wrote for experimentation and fun in 2022. My inspiration was this Medium article Algorithmically Detecting (and Trading) Technical Chart Patterns with Python

Understand how the code works: wiki Pattern Algorithms

Important Info

All patterns are detected, prior to breakout. at the last leg of the pattern. Add the stock to your watchlist and track them further.

This program does not provide any buy or sell signals. It only detects the pattern. It is upto you to decide, if a pattern is valid or tradeable.

Installation

  1. Clone or download the repo:

    git clone https://github.com/BennyThadikaran/stock-pattern.git
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Setup configuration file with setup-config.py and answer the questions to generate a user.json

    py setup-config.py
    
    • Use direction keys to select a choice and press ENTER.
    • TAB key can be used to autocomplete filepaths. Use forward slashes / regardless of your OS to specify filepaths.
    • By default, filepath is mapped to your home folder /home/YourUsername on mac/linux and C:/Users/YourUsername on Windows.
    • You can use ../../ to go to C drive.

    Alternatively, I've written step by step instructions to create user.json manually

Usage

See Quick usage summary

See Usage instructions

See Configuration

For backtest.py usage, see wiki backtest

Notes on structure of OHLC data

  • The following columns are expected: Open, High, Low, Close, Volume. Additonal columns may exist.

Screenshots

HUDCO - Bull VCP 25th Apr 2024

RRKABEL - Bull BAT Harmonic pattern 13th Mar 2024

MGL - Reverse Head & Shoulder 16th June 2022

GSFC - Triangle 13th March 2023

RECLTD - Double Tops 13th Oct 2021

Disclaimer

This program identifies common chart patterns and does it reasonably well (IMHO).

Stock-Pattern is not aimed at replacing a trader's trained eye. It is merely an assistance and learning tool.

CLI options available, for you to backtest the patterns. If you intend to trade these patterns, study them well and trade at your own risk.

Issues· 1 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Pythonchart-patternsfinanceharmonic-patternsmplfinance

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言