Skip to content

Instantly share code, notes, and snippets.

@nikkoxgonzales
nikkoxgonzales / stochastic_rsi.py
Created July 31, 2021 18:49
TradingView Stochastic RSI implementation using python since TA-Lib fails to do this.
# Credits to this wrong code: https://gist.github.com/mouchh/b236f6a3a75b6a216b10e6fc44cf090f
import talib
import pandas as pd
k = 3
d = 3
period = 14
rsi = talib.RSI(np_array_closes, period)
df = pd.DataFrame(rsi)