Skip to main content

A mechanical approach to determine the trend of a stock along with breakout and reversal levels.

Project description

Swing

A mechanical approach to determine the trend of a stock along with breakout and reversal levels.

Python version: >= 3.8

If you ❤️ my work so far, please 🌟 this repo.

👽 Documentation

https://bennythadikaran.github.io/SwingTrend

Installation

pip install swingtrend

Basic Usage

from swingtrend import Swing

To initialize with default setting:

swing = Swing(retrace_threshold_pct=5, sideways_threshold=20, debug=False)

See the documentation for more details.

Inspiration

This work was inspired by youtube Channel Matt Donlevey - Photon Trading.

You can watch their video How To Understand Market Structure to understand some of the concepts.

How the class works

See simple explanation of how the program works

To use the Photon method as explained in the video, instantiate the class as Swing(retrace_threshold_pct=None)

In the Photon method, both minor and major pivots can result in trend continuation or trend reversal. (This includes a single bar pullback).

I prefer avoiding the minor pivots by setting a minimum threshold percent. If the threshold is set to 8%, the pullback must retrace atleast 8% or more to be considered an important level for trend reversal or continuation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swingtrend-1.0.2.tar.gz (123.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swingtrend-1.0.2-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file swingtrend-1.0.2.tar.gz.

File metadata

  • Download URL: swingtrend-1.0.2.tar.gz
  • Upload date:
  • Size: 123.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for swingtrend-1.0.2.tar.gz
Algorithm Hash digest
SHA256 7c08c34ca3e183656c928c1adab3671c92119cc506a95819fe50441568ee557e
MD5 3456d77193d5e7c12c4ac58d3e1395db
BLAKE2b-256 c119f079841ba29c901bb5951a5ce1c45b5f239b1492587389ceec3615b792bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for swingtrend-1.0.2.tar.gz:

Publisher: publish-to-pypi.yml on BennyThadikaran/SwingTrend

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file swingtrend-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: swingtrend-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for swingtrend-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 db8895ac2650bf41952df3052f4f359a1b4b1e1ad57ada268da952e3c022974b
MD5 517551728224da458b47a91b55020d5a
BLAKE2b-256 0266c2781fb4f9a21f36e4dc52a2b76590a3efa9776c6c122d0738df5d199d9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for swingtrend-1.0.2-py3-none-any.whl:

Publisher: publish-to-pypi.yml on BennyThadikaran/SwingTrend

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page