Skip to content

Commit

Permalink
Resolve git issue CryptoSignal#95
Browse files Browse the repository at this point in the history
  • Loading branch information
shads2 committed Jan 22, 2018
1 parent 5b0bc58 commit 38a1564
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/strategies/breakout.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ def get_breakout_value(self, historical_data):
if (data_period[4] == data_period[2]) and (data_period[1] == data_period[3]):
hit += 1

percent_positive_trend = hit / len(historical_data)
if historical_data:
percent_positive_trend = hit / len(historical_data)
else:
percent_positive_trend = 0

return percent_positive_trend

Expand Down

0 comments on commit 38a1564

Please sign in to comment.