Skip to content

Instantly share code, notes, and snippets.

@zachlim98
Created December 4, 2020 04:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zachlim98/dd0d1dfaad4a49abe1715c007a0fcc38 to your computer and use it in GitHub Desktop.
Save zachlim98/dd0d1dfaad4a49abe1715c007a0fcc38 to your computer and use it in GitHub Desktop.
def RSI_base(data,ticker):
MACD = md(close=data[ticker])
data["MACD_diff"] = MACD.macd_diff()
RSI = RSIIndicator(close=data[ticker])
data["RSI"] = RSI.rsi()
data["Buy_Signal"] = 0
data["Sell_Signal"] = 0
data["SL"] = 0
data["TP"] = 0
data["Pos"] = 0
data["TW"] = 0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment