关于设置均线参数的问题,我们总结了以下几点,给你解答:
手机同花顺如何设置均线参数
同花顺软件 ,在右下角【k线设置】里面可以添加obv指标。
同问。。。
设置均线参数
def set_ma_param(self, ma_short=5, ma_long=10):
self.ma_short = ma_short
self.ma_long = ma_long
# 计算均线
def ma(self, data):
data['ma_short'] = talib.SMA(data['close'].values, self.ma_short)
data['ma_long'] = talib.SMA(data['close'].values, self.ma_long)
return data
# 计算macd
def macd(self, data):
data['macd'], data['macdsignal'], data['macdhist'] = talib.MACD(data['close'].values,
fastperiod=self.macd_fastperiod,
slowperiod=self.macd_slowperiod,
signalperiod=self.macd_signalperiod)
return data
# 计算kdj
def kdj(self, data):
data['k'], data['d'] = talib.STOCH(data['high'].values,
data['low'].values,
data['close'].values,
fastk_period=self.kdj_fastk_period,
slowk_period=self.kdj_slowk_period,
slowk_matype=self.kdj_slowk_matype,
slowd_period=self.kdj_slowd_period,
slowd_matype=self.kdj_slowd_matype)
data['j'] = 3 * data['k'] - 2 * data['d']
return data
# 计算rsi
def rsi(self, data):
data['rsi'] = talib.RSI(data['close'].values, timeperiod=self.rsi_timeperiod)
return data
# 计算cci
def cci(self, data):
data['cci'] = talib.CCI(data['high'].values,
data['low'].values,
data['close'].values,
timeperiod=self.cci_timeperiod)
return data
# 计算wr
def wr(self, data):
data['wr'] = talib.WILLR(data['high'].values,
data['low'].values,
data['close'].values,
timeperiod=self.wr_timeperiod)
return data
# 计算boll
def boll(self, data):
data['upper'], data['middle'], data['lower'] = talib.BBANDS(data['close'].values,
timeperiod=self.boll_timeperiod,
nbdevup=self.boll_nbdevup,
nbdevdn=self.boll_nbdevdn,
matype=self.boll_matype)
return data
# 计算atr
def atr(self, data):
data['atr'] = talib.ATR(data['high'].values,
data['low'].values,
data['close'].values,
timeperiod=self.atr_timeperiod)
return data
# 计算dmi
def dmi(self, data):
data['plus_di'], data['minus_di'], data['adx'], data['adxr'] = talib.ADX(data['high'].values,
data['low'].values,
data['close'].values,
timeperiod=self.dmi_timeperiod)
return data
# 计算roc
def roc(self, data):
data['roc'] = talib.ROC(data['close'].values, timeperiod=self.roc_timeperiod)
return data
# 计算obv
def obv(self, data):
data['obv'] = talib.OBV(data['close'].values, data['volume'].values)
return data
# 计算sar
def sar(self, data):
data['sar'] = talib.SAR(data['high'].values,
data['low'].values,
acceleration=self.sar_acceleration,
maximum=self.sar_maximum)
return data
# 计算trix
def trix(self, data):
data['trix'] = talib.TRIX(data['close'].values, timeperiod=self.trix_timeperiod)
return data
# 计算vr
def vr(self, data):
data['vr'] = talib.ATR(data['high'].values,
data['low'].values,
data['close'].values,
timeperiod=self.vr_timeperiod)
return data
# 计算cr
def cr(self, data):
data['cr'] = talib.ATR(data['high'].values,
data['low'].values,
data['close'].values,
timeperiod=self.cr_timeperiod)
return data
# 计算dma
def dma(self, data):
data['dma'] = talib.ATR(data['high'].values,
data['low'].values,
data['close'].values,
timeperiod=self.dma_timeperiod)
return data
# 计算dmi
def dmi(self, data):
data['plus_di'], data['minus_di'], data['adx'], data['adxr'] = talib.ADX(data['high'].values,
data['low'].values,
data['close'].values,
timeperiod=self.dmi_timeperiod)
return data
# 计算trix
def trix(self, data):
data['trix'] = talib.TRIX(data['close'].values, timeperiod=self.trix_timeperiod)
return data
# 计算vr
def vr(self, data):
data['vr'] = talib.ATR(data['high'].values,
data['low'].values,
data['close'].values,
timeperiod=self.vr_timeperiod)
return data
# 计算cr
def cr(self, data):
data['cr'] = talib.ATR(data['high'].values,
data['low'].values,
data['close'].values,
timeperiod=self.cr_timeperiod)
return data
# 计算dma
def dma(self, data):
data['dma'] = talib.ATR(data['high'].values,
data['low'].values,
data['close'].values,
timeperiod=self.dma_timeperiod)
return data
# 计算dmi
def dmi(self, data):
data['plus_di'], data['minus_di'], data['adx'], data['adxr'] = talib.ADX(data['high'].values,
data['low'].values,
data['close'].values,
timeperiod=self.dmi_timeperiod)
return data
# 计算trix
def trix(self, data):
data['trix'] = talib.TRIX(data['close'].values, timeperiod=self.trix_timeperiod)
return data
# 计算vr
def vr(self, data):
data['vr'] = talib.ATR(data['high'].values,
data['
同花顺如何设置均线参数
首先打开同花顺究建种核软件,再打开个股K线图,然后双击日线栏。
找到均线1,接着找到日线设置与显示条数,然来自后点击确定,均线即可设置完成了。