Skip to content

Conversation

@nickcottrell
Copy link

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
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.

add_horizontal_line_to_candle_chart method does not accept line_style='dashed'

1 participant