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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c08c34ca3e183656c928c1adab3671c92119cc506a95819fe50441568ee557e
|
|
| MD5 |
3456d77193d5e7c12c4ac58d3e1395db
|
|
| BLAKE2b-256 |
c119f079841ba29c901bb5951a5ce1c45b5f239b1492587389ceec3615b792bd
|
Provenance
The following attestation bundles were made for swingtrend-1.0.2.tar.gz:
Publisher:
publish-to-pypi.yml on BennyThadikaran/SwingTrend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swingtrend-1.0.2.tar.gz -
Subject digest:
7c08c34ca3e183656c928c1adab3671c92119cc506a95819fe50441568ee557e - Sigstore transparency entry: 175760016
- Sigstore integration time:
-
Permalink:
BennyThadikaran/SwingTrend@51ce4f70c555db90d2fcae01ed58ff9a837899f9 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/BennyThadikaran
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@51ce4f70c555db90d2fcae01ed58ff9a837899f9 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db8895ac2650bf41952df3052f4f359a1b4b1e1ad57ada268da952e3c022974b
|
|
| MD5 |
517551728224da458b47a91b55020d5a
|
|
| BLAKE2b-256 |
0266c2781fb4f9a21f36e4dc52a2b76590a3efa9776c6c122d0738df5d199d9d
|
Provenance
The following attestation bundles were made for swingtrend-1.0.2-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on BennyThadikaran/SwingTrend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swingtrend-1.0.2-py3-none-any.whl -
Subject digest:
db8895ac2650bf41952df3052f4f359a1b4b1e1ad57ada268da952e3c022974b - Sigstore transparency entry: 175760017
- Sigstore integration time:
-
Permalink:
BennyThadikaran/SwingTrend@51ce4f70c555db90d2fcae01ed58ff9a837899f9 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/BennyThadikaran
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@51ce4f70c555db90d2fcae01ed58ff9a837899f9 -
Trigger Event:
push
-
Statement type: