股票加权均线指标-股票加权均线指标是什么

2023-07-08 入门知识 0次阅读 admin
股票加权均线指标.jpg

关于股票加权均线指标的问题,我们总结了以下几点,给你解答:

股票加权均线指标


股票加权均线指标


def get_ma(self, stock_code, start_date, end_date, ma_list):
df = self.get_k_data(stock_code, start_date, end_date)
for ma in ma_list:
df['MA_' + str(ma)] = df['close'].rolling(window=ma).mean()
return df

# 获取股票MACD指标
def get_macd(self, stock_code, start_date, end_date, fastperiod=12, slowperiod=26, signalperiod=9):
df = self.get_k_data(stock_code, start_date, end_date)
df['DIF'], df['DEA'], df['MACD'] = talib.MACD(df['close'].values, fastperiod, slowperiod, signalperiod)
return df

# 获取股票KDJ指标
def get_kdj(self, stock_code, start_date, end_date, N=9, M1=3, M2=3):
df = self.get_k_data(stock_code, start_date, end_date)
df['RSV'] = talib.RSV(df['high'].values, df['low'].values, df['close'].values, N)
df['K'] = talib.EMA(df['RSV'].values, M1)
df['D'] = talib.EMA(df['K'].values, M2)
df['J'] = 3 * df['K'] - 2 * df['D']
return df

# 获取股票RSI指标
def get_rsi(self, stock_code, start_date, end_date, N=6):
df = self.get_k_data(stock_code, start_date, end_date)
df['RSI'] = talib.RSI(df['close'].values, N)
return df

# 获取股票BOLL指标
def get_boll(self, stock_code, start_date, end_date, N=20):
df = self.get_k_data(stock_code, start_date, end_date)
df['UPPER'], df['MID'], df['LOWER'] = talib.BBANDS(df['close'].values, N, 2, 2)
return df

# 获取股票WR指标
def get_wr(self, stock_code, start_date, end_date, N=10):
df = self.get_k_data(stock_code, start_date, end_date)
df['WR'] = talib.WILLR(df['high'].values, df['low'].values, df['close'].values, N)
return df

# 获取股票CCI指标
def get_cci(self, stock_code, start_date, end_date, N=14):
df = self.get_k_data(stock_code, start_date, end_date)
df['CCI'] = talib.CCI(df['high'].values, df['low'].values, df['close'].values, N)
return df

# 获取股票ATR指标
def get_atr(self, stock_code, start_date, end_date, N=14):
df = self.get_k_data(stock_code, start_date, end_date)
df['ATR'] = talib.ATR(df['high'].values, df['low'].values, df['close'].values, N)
return df

# 获取股票DMI指标
def get_dmi(self, stock_code, start_date, end_date, N=14):
df = self.get_k_data(stock_code, start_date, end_date)
df['PDI'], df['MDI'], df['ADX'], df['ADXR'] = talib.ADX(df['high'].values, df['low'].values, df['close'].values, N)
return df

# 获取股票OBV指标
def get_obv(self, stock_code, start_date, end_date):
df = self.get_k_data(stock_code, start_date, end_date)
df['OBV'] = talib.OBV(df['close'].values, df['volume'].values)
return df

# 获取股票SAR指标
def get_sar(self, stock_code, start_date, end_date, N=4, M=2):
df = self.get_k_data(stock_code, start_date, end_date)
df['SAR'] = talib.SAR(df['high'].values, df['low'].values, N, M)
return df

# 获取股票ROC指标
def get_roc(self, stock_code, start_date, end_date, N=12):
df = self.get_k_data(stock_code, start_date, end_date)
df['ROC'] = talib.ROC(df['close'].values, N)
return df

# 获取股票MTM指标
def get_mtm(self, stock_code, start_date, end_date, N=12):
df = self.get_k_data(stock_code, start_date, end_date)
df['MTM'] = talib.MOM(df['close'].values, N)
return df

# 获取股票PSY指标
def get_psy(self, stock_code, start_date, end_date, N=12):
df = self.get_k_data(stock_code, start_date, end_date)
df['PSY'] = talib.PSY(df['close'].values, N)
return df

# 获取股票VR指标
def get_vr(self, stock_code, start_date, end_date, N=26):
df = self.get_k_data(stock_code, start_date, end_date)
df['VR'] = talib.OBV(df['volume'].values, df['close'].values)
return df

# 获取股票BIAS指标
def get_bias(self, stock_code, start_date, end_date, N=12):
df = self.get_k_data(stock_code, start_date, end_date)
df['BIAS'] = (df['close'] - df['MA_' + str(N)]) / df['MA_' + str(N)] * 100
return df

# 获取股票ASI指标
def get_asi(self, stock_code, start_date, end_date, N=26):
df = self.get_k_data(stock_code, start_date, end_date)
df['ASI'] = talib.ASI(df['open'].values, df['high'].values, df['low'].values, df['close'].values, N)
return df

# 获取股票CR指标
def get_cr(self, stock_code, start_date, end_date, N=26):
df = self.get_k_data(stock_code, start_date, end_date)
df['CR'] = talib.CR(df['high'].values, df['low'].values, df['close'].values, N)
return df

# 获取股票DMA指标
def get_d

股票加权均线指标是什么


股票加权均线指标是什么

大盘加权指数就是由权重股引领的大盘指数走势,也就是白线的线;
不含加权就是平均指数啦,黄色的线条,就是由所有股票平均后得出的走势

股票加权均线指标公式


股票加权均线指标公式

分别在分钟日线周线月线的界面上,直接设置各自的参数就行了,只要不点应介裂成困电用所有周期,那么就是各自使用各自的参数。你乙简例如日线设置33,6来自0分钟设置100,周线设置27,月线设置13,直接设置不同参数就可以可以使用,不需要其他多余设置。

扩展资料:
如何写股票指标公式
第一步:华为P30,鸿蒙2.0手机,打开炒股软件(这里讲的是同花顺炒股软件,其他软件大同小异),调出公式管理器,新建一个技术指标公式,如下图。调出公式管理器的方法有两核运种:一种是快捷键Ctrl+F键见修们章座约讨体;另一种是菜单栏里找:工具→公式管理。

第制呢振安说放个肥迫款题二步:熟悉公式编辑界面。公式编辑界面如下图,分为四个区域:一名称区域,即公式的名称、密码和描述,其中名称和描述是必填项,且不能与其他公式名称相同;二参数区,填写公式里的参数,根据需要填写;三辅助工具区,里面有各种辅助函数、测试按钮以及公式使用环境等工具,公式编辑完成后要在这进行测试和确认完成;四公式编辑区,指标公式的内容就写在这里。

第三步:编写公式。这里以常用的MACD为例。MACD称为指数平滑移动平均线,由快的指数移动平均线(EMA12)减去慢的指数移动平均线(EMA26)得到快待审云慢线DIF,再用2×(快线DIF-DIF的9日加权移动均线DEA)得到MACD柱。在软件内CLOSE/C代表收盘价,SHORT和LONG以及M代表参数,DIF抗省命F、DEA、MACD1(MACD已经被系统占用)和Zero是自己定义的变量,EMA是系统函数,含义是求指数平滑移动平均。编写完之后点击测试函数,保证编译测试成功。

第四步:确定保存指标公式,K笔证左线副图内设置。公式编译测试成功后点击确认,回到股票K线图(按F5键读际头许说更歌立房甚拉切换)。点击左下角设置,进入设置界面,在自定指标里找到编写的公式名称,左键点击一下,中间的“添加→”按钮改衫梁变黑,点击添加,右侧选用指标框里就会出现该公式,点击保存,完成,回到K线界面就有了。检查公式,如果指标公式不正确,回到第四步继续编写改正,直到正确为止塌慧。

猜你感兴趣: 股票加权均线指标