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

Candle indicators #1146

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Candle indicators #1146

wants to merge 5 commits into from

Conversation

sgflt
Copy link
Contributor

@sgflt sgflt commented Apr 7, 2024

Fixes #1145.

Changes proposed in this pull request:

  • HammerIndicator

  • InvertedHammerIndicator

  • HangingManIndicator

  • DownTrendIndicator

  • UpTrendIndicator

  • added an entry with related ticket number(s) to the unreleased section of CHANGES.md


public class DownTrendIndicator extends AbstractIndicator<Boolean> {

private static final int UNSTABLE_BARS = 5;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The choice of 5 here is unnecessarily opinionated no? How about as a constructor param?


public class UpTrendIndicator extends AbstractIndicator<Boolean> {

private static final int UNSTABLE_BARS = 5;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

*/
public class HammerIndicator extends CachedIndicator<Boolean> {

private static final double BODY_LENGTH_TO_BOTTOM_WICK_COEFFICIENT = 2d;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these be constructor params rather than hardcoded?

*/
public class HangingManIndicator extends CachedIndicator<Boolean> {

private static final double BODY_LENGTH_TO_BOTTOM_WICK_COEFFICIENT = 2d;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above. Perhaps these values can be used as defaults in a no-arg constructor.

@sgflt sgflt marked this pull request as draft May 13, 2024 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement reversal candles indicator
2 participants