Created
February 10, 2021 07:55
-
-
Save dharma6872/f0bfa122b2b03aaecb2029e56b081aad to your computer and use it in GitHub Desktop.
[q_stick] #퀀트
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
def q_stick(Data, ema_lookback, opening, close, where): | |
# The variable Data refers to the OHLC array you are using | |
# The variable ema_lookback refers to the selected lookback period | |
# The variable opening refers to the open column in the OHLC array | |
# The variable close refers to the close column in the OHLC array | |
# The variable where refers to where the Q-Stick will be put | |
for i in range(len(Data)): | |
Data[i, where] = Data[i, close] - Data[i, opening] | |
Data = ema(Data, 2, ema_lookback, where, where + 1) | |
return Data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment