Skip to content

Instantly share code, notes, and snippets.

@dharma6872
Created February 10, 2021 07:55
Show Gist options
  • Save dharma6872/f0bfa122b2b03aaecb2029e56b081aad to your computer and use it in GitHub Desktop.
Save dharma6872/f0bfa122b2b03aaecb2029e56b081aad to your computer and use it in GitHub Desktop.
[q_stick] #퀀트
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