Created
November 14, 2020 22:36
-
-
Save SajidLhessani/f82db2b8a8803cf910ae605a50f46766 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Draw the middle band, higher band, lowest band | |
data['Middle Band'] = data['Close'].rolling(window=21).mean() | |
data['Upper Band'] = data['Middle Band'] + 1.96*data['Close'].rolling(window=21).std() | |
data['Lower Band'] = data['Middle Band'] - 1.96*data['Close'].rolling(window=21).std() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment