-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can i merging two indictors #378
Comments
If I wrote help(ta.inductor) It will print calculations of inductors so can I merge tow indicators to become one indictor ? |
Yes, you can merge two indicators or chain or compose them. You can even create your own indicator which does that and add it to the library or your forked copy of the library. What indicators were you attempting to merge? Please be detailed. Thanks, |
Zscore and Vwap |
To clarify, you want the zscore of vwap? If so, here is a basic outline. import pandas as pd
import pandas_ta as ta
df = # your ohlcv data
# VWAP requires the DataFrame index to be a DatetimeIndex.
# Replace "datetime" with the appropriate column from your DataFrame
df.set_index(pd.DatetimeIndex(df["datetime"]), inplace=True)
# Get vwap and add it to the df
vwap = df.ta.vwap(append=True)
# Input vwap into zscore and add result to the df
zs = df.ta.zscore(close=vwap, append=True)
print(df.columns) # Verify they are there
# Quick plot of zscore(vwap)
zs.plot(figsize=(16,3), color=["blue"], grid=True).axhline(0, color="black") Hope this helps! Kind Regards, |
Yoooh thx |
hey KJ I try it but i want to use my on period how can i do this ? |
If I wrote help(ta.inductor)
It will print calculations of inductors so can I merge tow indicators to become one indictor ?
The text was updated successfully, but these errors were encountered: