关于obv均线内容导航:
1、obv均线
def get_obv_ma(self, n, array=False):
"""
:param n:
:param array:
:return:
"""
result = talib.MA(self.obv, n)
if array:
return result
return result[-1]
# 获取macd
def get_macd(self, fastperiod=12, slowperiod=26, signalperiod=9):
macd, signal, hist = talib.MACD(self.close, fastperiod,
slowperiod, signalperiod)
return macd[-1], signal[-1], hist[-1]
# 获取kdj
def get_kdj(self, n=9, array=False):
k, d = talib.STOCH(self.high,
self.low,
self.close,
fastk_period=n,
slowk_period=3,
slowd_period=3)
if array:
return k, d
return k[-1], d[-1]
# 获取rsi
def get_rsi(self, n=1, array=False):
result = talib.RSI(self.close, n)
if array:
return result
return result[-1]
# 获取wr
def get_wr(self, n=10, array=False):
result = talib.WILLR(self.high, self.low, self.close, n)
if array:
return result
return result[-1]
# 获取cci
def get_cci(self, n=14, array=False):
result = talib.CCI(self.high, self.low, self.close, n)
if array:
return result
return result[-1]
# 获取boll
def get_boll(self, n=20, dev=2.4, array=False):
mid = talib.MA(self.close, n)
std = talib.STDDEV(self.close, n)
up = mid + std * dev
down = mid - std * dev
if array:
return up, down
return up[-1], down[-1]
# 获取atr
def get_atr(self, n=14, array=False):
result = talib.ATR(self.high, self.low, self.close, n)
if array:
return result
return result[-1]
# 获取dmi
def get_dmi(self, n=14, array=False):
result = talib.DX(self.high, self.low, self.close, n)
if array:
return result
return result[-1]
# 获取trix
def get_trix(self, n=12, array=False):
result = talib.TRIX(self.close, n)
if array:
return result
return result[-1]
# 获取布林带
def get_boll(self, n=20, dev=2.4, array=False):
mid = talib.MA(self.close, n)
std = talib.STDDEV(self.close, n)
up = mid + std * dev
down = mid - std * dev
if array:
return up, down
return up[-1], down[-1]
# 获取布林带
def get_boll_width(self, n=20, dev=2.4):
mid = talib.MA(self.close, n)
std = talib.STDDEV(self.close, n)
up = mid + std * dev
down = mid - std * dev
return (up[-1] - down[-1]) / mid[-1]
# 获取均线
def get_ma(self, n, array=False):
result = talib.MA(self.close, n)
if array:
return result
return result[-1]
# 获取均线
def get_ema(self, n, array=False):
result = talib.EMA(self.close, n)
if array:
return result
return result[-1]
# 获取均线
def get_sma(self, n, array=False):
result = talib.SMA(self.close, n)
if array:
return result
return result[-1]
# 获取均线
def get_wma(self, n, array=False):
result = talib.WMA(self.close, n)
if array:
return result
return result[-1]
# 获取均线
def get_tma(self, n, array=False):
result = talib.TMA(self.close, n)
if array:
return result
return result[-1]
# 获取均线
def get_hma(self, n, array=False):
result = talib.HMA(self.close, n)
if array:
return result
return result[-1]
# 获取均线
def get_kama(self, n, array=False):
result = talib.KAMA(self.close, n)
if array:
return result
return result[-1]
# 获取均线
def get_zlema(self, n, array=False):
result = talib.ZLEMA(self.close, n)
if array:
return result
return result[-1]
# 获取均线
def get_tema(self, n, array=False):
result = talib.TEMA(self.close, n)
if array:
return result
return result[-1]
# 获取均线
def get_trima(self, n, array=False):
result = talib.TRIMA(self.close, n)
if array:
return result
return result[-1]
# 获取均线
def get_vwma(self, n, array=False):
result = talib.VWMA(self.close, n)
if array:
return result
return result[-1]
# 获取均线
def get_mama(self, fastlimit=0, slowlimit=0, array=False):
result = talib.MAMA(self.close, fastlimit, slowlimit)
if array:
return result
return result[-1]
# 获取均线
def get_fama(self, fastlimit=0, slowlimit=0, array=False):
result = talib.FAMA(self.close, fastlimit, slowlimit)
if array:
return result
return result[-1]
# 获取均线
def get_sar(self, array=False):
result = talib.SAR(self.high, self.low)
if array:
return result
return result[-1]
# 获取均线
def get_sar_ext(self, startvalue=0, offsetonreverse=0, array=False):
result = talib.SAREXT(self.high, self.low, startvalue, offsetonreverse)
if array:
return result
return result[-1]
# 获取均线
def get_adx(self, n=14, array=False):
result = talib.ADX(self.high, self.low, self.close, n)
if array:
return result
2、obv均线怎么设置
在日K线均线状态下,连续按"F8",到60分钟K线均线图,右键任点一条线,弹出操作框,点"调整指标参数",将任一数值修改成"55"即可.