Skip to content

Instantly share code, notes, and snippets.

@SajidLhessani
Created August 27, 2021 21:21
Show Gist options
  • Select an option

  • Save SajidLhessani/f9e88976759c1c8b88269c8ad1ed9a85 to your computer and use it in GitHub Desktop.

Select an option

Save SajidLhessani/f9e88976759c1c8b88269c8ad1ed9a85 to your computer and use it in GitHub Desktop.
# Create a variable n with a value of 10
n = 10
# Create a column by name, RSI and assign the calculation of RSI to it
df['RSI'] = ta.RSI(np.array(df['Close'].shift(1)), timeperiod=n)
df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment