indicators/test/rsi_test.py

10 lines
239 B
Python
Raw Normal View History

2024-12-03 16:44:31 +00:00
from datetime import datetime, timedelta
from indicators import rsi
from ohlc import ohlc
today = datetime.today()
data = ohlc('SPY', start_date = today - timedelta(days = 365), end_date = today)
rsi_values = rsi(data)
print(rsi_values)