Skip to content

Fix: Add support for line_style='dashed' in horizontal line methods#544

Closed
nickcottrell wants to merge 1 commit intojesse-ai:masterfrom
nickcottrell:fix-dashed-line-style
Closed

Fix: Add support for line_style='dashed' in horizontal line methods#544
nickcottrell wants to merge 1 commit intojesse-ai:masterfrom
nickcottrell:fix-dashed-line-style

Conversation

@nickcottrell
Copy link
Copy Markdown

Fixes #530

Problem

The add_horizontal_line_to_candle_chart and add_horizontal_line_to_extra_chart
methods were rejecting line_style='dashed' with a ValueError, even though
dashed lines are documented as supported.

Solution

Added 'dashed' as a valid line style option (mapped to lineStyle = 2) in both
methods.

Changes

  • jesse/strategies/Strategy.py: Added elif condition for 'dashed' line style in
    both horizontal line methods

Testing

Created test script (test_line_style_fix.py) that verifies:

  • ✅ Both methods now accept line_style='dashed'
  • ✅ Dashed style maps to lineStyle = 2
  • ✅ Existing styles (solid, dotted) still work
  • ✅ Invalid styles still raise appropriate errors

  Fixes jesse-ai#530

  - Added 'dashed' as valid line_style option (lineStyle = 2)
  - Applied fix to both add_horizontal_line_to_candle_chart and
  add_horizontal_line_to_extra_chart
  - Resolves ValueError when using line_style='dashed' parameter
@stale
Copy link
Copy Markdown

stale Bot commented Jan 13, 2026

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale No recent activity. label Jan 13, 2026
@stale stale Bot closed this Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale No recent activity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add_horizontal_line_to_candle_chart method does not accept line_style='dashed'

1 participant