Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
strength update
Browse files Browse the repository at this point in the history
  • Loading branch information
fou3fou3 committed Nov 4, 2023
1 parent 321c47a commit 583ba3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion algorithms/rsi.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def algorithm(prices, window_size=14):
def signal(prices, data, high=70, low=30):
rsi = data
if rsi[-1] > high:
strength = rsi[-1] * (1 / low)
strength = ( rsi[-1] - high ) * ( 1 / low )
return 'sell', strength
elif rsi[-1] < low:
strength = 1 - rsi[-1] * (1 / low)
Expand Down

0 comments on commit 583ba3c

Please sign in to comment.