mirror of
https://github.com/wassname/pandas-ta.git
synced 2026-09-09 11:28:26 +08:00
BUG #506 atrts not in study method
This commit is contained in:
@@ -198,7 +198,7 @@ $ pip install pandas_ta[full]
|
||||
|
||||
Latest Version
|
||||
--------------
|
||||
Best choice! Version: *0.3.59b*
|
||||
Best choice! Version: *0.3.60b*
|
||||
* Includes all fixes and updates between **pypi** and what is covered in this README.
|
||||
```sh
|
||||
$ pip install -U git+https://github.com/twopirllc/pandas-ta
|
||||
@@ -707,6 +707,7 @@ help(ta.study)
|
||||
```python
|
||||
# Download Chart history using yfinance. (pip install yfinance)
|
||||
# It uses the same keyword arguments as yfinance (excluding start and end)
|
||||
# Note: It automatically sets the index to be a DatetimeIndex
|
||||
df = df.ta.ticker("aapl") # Default ticker is "SPY"
|
||||
|
||||
# Period is used instead of start/end
|
||||
@@ -723,9 +724,9 @@ df = df.ta.ticker("aapl", period="1mo", interval="1h") # Gets this past month in
|
||||
# A Ticker & DataFrame Dictionary with a Study applied
|
||||
tickers = ["SPY", "AAPL", "SQ"]
|
||||
s = ta.CommonStudy
|
||||
asset = {f"{t}_D": ta.df.ta.ticker(t, period="1y", cores=0, study=s, timed=True, returns=True, ds="yf") for t in tickers}
|
||||
print(asset.keys())
|
||||
spydf = asset["SPY_D"]
|
||||
assets = {f"{t}_D": ta.df.ta.ticker(t, period="1y", cores=0, study=s, timed=True, returns=True, ds="yf") for t in tickers}
|
||||
print(assets.keys())
|
||||
spydf = assets["SPY_D"]
|
||||
|
||||
# For more info
|
||||
help(ta.yf)
|
||||
|
||||
@@ -46,6 +46,7 @@ def cdl_inside(
|
||||
offset = v_offset(offset)
|
||||
|
||||
# Calculate
|
||||
# TODO: Return if high or low has nan
|
||||
inside = (high.diff() < 0) & (low.diff() > 0)
|
||||
|
||||
if not asbool:
|
||||
|
||||
+11
-10
@@ -48,10 +48,10 @@ Category: Dict[str, ListStr] = {
|
||||
# Momentum
|
||||
"momentum": [
|
||||
"ao", "apo", "bias", "bop", "brar", "cci", "cfo", "cg", "cmo",
|
||||
"coppock", "cti", "er", "eri", "fisher", "inertia", "kdj", "kst", "macd",
|
||||
"mom", "pgo", "ppo", "psl", "pvo", "qqe", "roc", "rsi", "rsx", "rvgi",
|
||||
"slope", "smi", "squeeze", "squeeze_pro", "stc", "stoch", "stochf",
|
||||
"stochrsi", "td_seq", "trix", "tsi", "uo", "willr"
|
||||
"coppock", "cti", "er", "eri", "fisher", "inertia", "kdj", "kst",
|
||||
"macd", "mom", "pgo", "ppo", "psl", "pvo", "qqe", "roc", "rsi",
|
||||
"rsx", "rvgi", "slope", "smi", "squeeze", "squeeze_pro", "stc",
|
||||
"stoch", "stochf", "stochrsi", "td_seq", "trix", "tsi", "uo", "willr"
|
||||
],
|
||||
# Overlap
|
||||
"overlap": [
|
||||
@@ -73,20 +73,21 @@ Category: Dict[str, ListStr] = {
|
||||
# Trend
|
||||
"trend": [
|
||||
"adx", "amat", "aroon", "chop", "cksp", "decay", "decreasing", "dpo",
|
||||
"increasing", "long_run", "psar", "qstick", "short_run", "trendflex", "tsignals",
|
||||
"ttm_trend", "vhf", "vortex", "xsignals"
|
||||
"increasing", "long_run", "psar", "qstick", "short_run", "trendflex",
|
||||
"tsignals", "ttm_trend", "vhf", "vortex", "xsignals"
|
||||
],
|
||||
# Volatility
|
||||
"volatility": [
|
||||
"aberration", "accbands", "atr", "bbands", "donchian", "hwc", "kc", "massi",
|
||||
"natr", "pdist", "rvi", "thermo", "true_range", "ui"
|
||||
"aberration", "accbands", "atr", "atrts", "bbands", "donchian",
|
||||
"hwc", "kc", "massi", "natr", "pdist", "rvi", "thermo",
|
||||
"true_range", "ui"
|
||||
],
|
||||
|
||||
# Volume.
|
||||
# Note: "vp" or "Volume Profile" is excluded since it does not return a Time Series
|
||||
"volume": [
|
||||
"ad", "adosc", "aobv", "cmf", "efi", "eom", "kvo", "mfi", "nvi", "obv",
|
||||
"pvi", "pvol", "pvr", "pvt", "wb_tsv"
|
||||
"ad", "adosc", "aobv", "cmf", "efi", "eom", "kvo", "mfi", "nvi",
|
||||
"obv", "pvi", "pvol", "pvr", "pvt", "wb_tsv"
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,8 @@ def yf(ticker: str, **kwargs) -> DataFrame:
|
||||
|
||||
Returns:
|
||||
Exits if the DataFrame is empty or None
|
||||
Otherwise it returns a DataFrame of the Chart History
|
||||
Otherwise it returns a DataFrame of the Chart History with a
|
||||
DatetimeIndex
|
||||
"""
|
||||
verbose = kwargs.pop("verbose", False)
|
||||
if ticker is not None and isinstance(ticker, str) and len(ticker):
|
||||
|
||||
Reference in New Issue
Block a user