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

To import: 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.

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.

To get 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.1.tar.gz (104.5 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.1-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: swingtrend-1.0.1.tar.gz
  • Upload date:
  • Size: 104.5 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.1.tar.gz
Algorithm Hash digest
SHA256 0becc0abc08a8c4df3d3ac83701c2d17c8e32a368835d587d3cf6e21f3e758c6
MD5 9590b925b488f6a956e3cac72ea82ca1
BLAKE2b-256 46645d81ff854e48bffd994c4aab91774ef2a0404f62dcc90de67e0e909a69b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for swingtrend-1.0.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: swingtrend-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 17.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b73ce9a234c6e2c5c4558d12e8beb8eee18ff149893f41eb17a24d1cb1d523c7
MD5 b136aae45b1954efb626ffcced243db9
BLAKE2b-256 697ca21a8fb6cfc5aad898846c6e87be532de7a3fa6051e11ad4d941cafd8b54

See more details on using hashes here.

Provenance

The following attestation bundles were made for swingtrend-1.0.1-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