Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GH-116] Add ichimoku cloud width #147

Merged
merged 1 commit into from
Jun 18, 2023
Merged

[GH-116] Add ichimoku cloud width #147

merged 1 commit into from
Jun 18, 2023

Conversation

jealous
Copy link
Owner

@jealous jealous commented Jun 18, 2023

The Ichimoku Cloud is a collection of technical indicators that show support and resistance levels, as well as momentum and trend direction.

In this implementation, we only calculate the delta between lead A and lead B (which is the width of the cloud).

It contains three windows:

  • window for the conversion line, default to 9
  • window for the baseline and the shifts, default to 26
  • window for the leading line, default to 52

Formular:

  • conversion line = (PH9 + PL9) / 2
  • baseline = (PH26 + PL26) / 2
  • leading span A = (conversion line + baseline) / 2
  • leading span B = (PH52 + PL52) / 2
  • result = leading span A - leading span B

Where:

  • PH = Period High
  • PL = Period Low

Examples:

  • df['ichimoku'] returns the ichimoku cloud width with default windows
  • df['ichimoku_7,22,44'] returns the ichimoku cloud width with window sizes 7, 22, 44

@jealous jealous self-assigned this Jun 18, 2023
The Ichimoku Cloud is a collection of technical indicators
that show support and resistance levels, as well as momentum
and trend direction.

In this implementation, we only calculate the delta between
lead A and lead B (which is the width of the cloud).

It contains three windows:
* window for the conversion line, default to 9
* window for the baseline and the shifts, default to 26
* window for the leading line, default to 52

Formular:
* conversion line = (PH9 + PL9) / 2
* baseline = (PH26 + PL26) / 2
* leading span A = (conversion line + baseline) / 2
* leading span B = (PH52 + PL52) / 2
* result = leading span A - leading span B

Where:
* PH = Period High
* PL = Period Low

Examples:
* `df['ichimoku']` returns the ichimoku cloud width with default windows
* `df['ichimoku_7,22,44']` returns the ichimoku cloud width with window sizes
  7, 22, 44
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.03 🎉

Comparison is base (fc0a86d) 98.57% compared to head (57700c7) 98.61%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #147      +/-   ##
==========================================
+ Coverage   98.57%   98.61%   +0.03%     
==========================================
  Files           1        1              
  Lines         841      864      +23     
==========================================
+ Hits          829      852      +23     
  Misses         12       12              
Impacted Files Coverage Δ
stockstats.py 98.61% <100.00%> (+0.03%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jealous jealous merged commit b075674 into master Jun 18, 2023
5 checks passed
@jealous jealous deleted the feature/ichimoku branch June 18, 2023 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants