kdj指标-kdj指标参数最佳设置

2023-04-29 01:29:44 技术指标 0次阅读 投稿:admin
kdj指标.jpg

关于kdj指标的问题,我们总结了以下几点,给你解答:

kdj指标参数最佳设置


kdj指标参数最佳设置

KDJ指标的中文名称是随机指数,最早起源于期货市场。

KDJ指标的应用法则KDJ指标是三条曲线,在应用时主要从五个方面进行考虑:KD的取值的绝对数字;KD曲线的形态;KD指标的交叉;KD指标的背离;J指标的取值大小。

第一,从KD的取值方面考虑。KD的取值范围都是0~100,将其划分为几个区域:80以上为超买区,20以下为超卖区,其余为徘徊区。

根据这种划分,KD超过80就应该考虑卖出了,低于20就应该考虑买入了。应该说明的是,上述划分只是一个应用KD指标的初步过程,仅仅是信号,完全按这种方法进行操作很容易招致损失。

第二,从KD指标曲线的形态方面考虑。当KD指标在较高或较低的位置形成了头肩形和多重顶(底)时,是采取行动的信号。注意,这些形态一定要在较高位置或较低位置出现,位置越高或越低,结论越可靠。

第三,从KD指标的交叉方面考虑。K与D的关系就如同股价与MA的关系一样,也有死亡交叉和黄金交叉的问题,不过这里交叉的应用是很复杂的,还附带很多其他条件。

以K从下向上与D交叉为例:K上穿D是金叉,为买入信号。但是出现了金叉是否应该买入,还要看别的条件。第一个条件是金叉的位置应该比较低,是在超卖区的位置,越低越好。

第二个条件是与D相交的次数。有时在低位,K、D要来回交叉好几次。交叉的次数以2次为最少,越多越好。

第三个条件是交叉点相对于KD线低点的位置,这就是常说的“右侧相交”原则。K是在D已经抬头向上时才同D相交,比D还在下降时与之相交要可靠得多。

第四,从KD指标的背离方面考虑。在KD处在高位或低位,如果出现与股价走向的背离,则是采取行动的信号。

第五,J指标取值超过100和低于0,都属于价格的非正常区域,大于100为超买,小0为超卖。
一般短线看30分钟KDJ
KDJ指标只能告诉你一个单位时间内的股价高低(9日)。本人觉得用处吧是很大,如果要用,最好吧指标的参数改为60或120等等中长期的参数,这样还能准确点!目前的电脑设定的参数意义不大,说的不好听,会把你引入歧途,让你更云里雾里的看吧清楚,短线看股价是否会跌,吧如看30或60,10分钟K线,只要你吧贪心,还更准确!
kdj的参数不用手动改,都是默认的,参数为9是对应你所在线图周期来说的,如果你所在的界面是日线图,这个默认的9就9日,在周线图上就是9周,所以不用改这些参数,默认就好。
k线组合和均线结合着看,来把握买入卖出时间,这个要靠经验积累,才能比较准确的把握买卖交易,所以不要急于一时,一口气吃不出胖子的,慢慢研究吧!

kdj指标


kdj指标


def get_kdj(self, n, m1, m2):
df = self.df
low_list = df['low'].rolling(n).min()
low_list.fillna(value=df['low'].expanding().min(), inplace=True)
high_list = df['high'].rolling(n).max()
high_list.fillna(value=df['high'].expanding().max(), inplace=True)
rsv = (df['close'] - low_list) / (high_list - low_list) * 100
df['kdj_k'] = rsv.ewm(span=m1).mean()
df['kdj_d'] = df['kdj_k'].ewm(span=m2).mean()
df['kdj_j'] = 3 * df['kdj_k'] - 2 * df['kdj_d']
return df

# 获取macd指标
def get_macd(self, m1, m2, m3):
df = self.df
df['ema_12'] = df['close'].ewm(span=m1).mean()
df['ema_26'] = df['close'].ewm(span=m2).mean()
df['diff'] = df['ema_12'] - df['ema_26']
df['dea'] = df['diff'].ewm(span=m3).mean()
df['macd'] = 2 * (df['diff'] - df['dea'])
return df

# 获取cci指标
def get_cci(self, n):
df = self.df
df['tp'] = (df['high'] + df['low'] + df['close']) / 3
df['ma'] = df['tp'].rolling(n).mean()
df['md'] = abs(df['tp'] - df['ma']).rolling(n).mean()
df['cci'] = (df['tp'] - df['ma']) / (0.015 * df['md'])
return df

# 获取boll指标
def get_boll(self, n):
df = self.df
df['ma'] = df['close'].rolling(n).mean()
df['md'] = df['close'].rolling(n).std()
df['boll_up'] = df['ma'] + 2 * df['md']
df['boll_down'] = df['ma'] - 2 * df['md']
return df

# 获取rsi指标
def get_rsi(self, n):
df = self.df
df['diff'] = df['close'].diff()
df['up'] = df['diff'][df['diff'] > 0].fillna(0)
df['down'] = -df['diff'][df['diff'] < 0].fillna(0)
df['up_ma'] = df['up'].rolling(n).mean()
df['down_ma'] = df['down'].rolling(n).mean()
df['rs'] = df['up_ma'] / df['down_ma']
df['rsi'] = 100 - (100 / (1 + df['rs']))
return df

# 获取wr指标
def get_wr(self, n):
df = self.df
df['high_n'] = df['high'].rolling(n).max()
df['low_n'] = df['low'].rolling(n).min()
df['wr'] = 100 * (df['high_n'] - df['close']) / (df['high_n'] - df['low_n'])
return df

# 获取sar指标
def get_sar(self, n, m):
df = self.df
df['high_n'] = df['high'].rolling(n).max()
df['low_n'] = df['low'].rolling(n).min()
df['sar'] = df['low_n']
df['sar_up'] = df['high_n']
df['sar_down'] = df['low_n']
df['sar_up'][0] = df['high'][0]
df['sar_down'][0] = df['low'][0]
df['sar'][0] = df['low'][0]
df['sar_up_e'] = 0
df['sar_down_e'] = 0
df['sar_e'] = 0
df['sar_up_e'][0] = df['high'][0]
df['sar_down_e'][0] = df['low'][0]
df['sar_e'][0] = df['low'][0]
for i in range(1, len(df)):
if df['sar'][i - 1] == df['sar_down'][i - 1]:
if df['high'][i] > df['sar_up_e'][i - 1]:
df['sar_up'][i] = df['high'][i]
df['sar'][i] = df['sar_up_e'][i - 1] + m * (df['sar_up'][i] - df['sar_up_e'][i - 1])
else:
df['sar'][i] = df['sar_up_e'][i - 1] + m * (df['sar_up'][i - 1] - df['sar_up_e'][i - 1])
df['sar_up'][i] = df['sar_up'][i - 1]
else:
if df['low'][i] < df['sar_down_e'][i - 1]:
df['sar_down'][i] = df['low'][i]
df['sar'][i] = df['sar_down_e'][i - 1] + m * (df['sar_down'][i] - df['sar_down_e'][i - 1])
else:
df['sar'][i] = df['sar_down_e'][i - 1] + m * (df['sar_down'][i - 1] - df['sar_down_e'][i - 1])
df['sar_down'][i] = df['sar_down'][i - 1]
df['sar_up_e'][i] = df['sar_up'][i]
df['sar_down_e'][i] = df['sar_down'][i]
df['sar_e'][i] = df['sar'][i]
return df

# 获取dmi指标
def get_dmi(self, n):
df = self.df
df['high_n'] = df['high'].shift(1).rolling(n).max()
df['low_n'] = df['low'].shift(1).rolling(n).min()
df['tr'] = df['high_n'] - df['low_n']
df['tr_s'] = df['high'] - df['low']
df['tr_s'][0] = df['tr'][0]
df['tr_s'] = df['tr_s'].shift(1)
df['tr_l'] = df['high'] - df['low_n']
df['tr_l'][0] = df['tr'][0]
df['tr_l'] = df['tr_l'].shift(1)
df['tr_h'] = df['high_n'] - df['low']
df['tr_h'][0] = df['tr'][0]
df['tr_h'] = df['tr_h'].shift(1)
df['dmp'] = 0
df['dmm'] = 0
df['dmp'][df['tr_s'] > df['tr_l']] = df['tr_s']
df['dmm'][df['tr_s'] < df['tr_h']] = df['tr_s']

kdj指标三条线代表的意思


kdj指标三条线代表的意思

  大智慧里面的KDJ指标的三条线分别代表:最高价、最低价、收盘价。
  简介:
  KDJ指标又叫随机指标,是一种相当新颖、实用的技术分析指标,它起移胞传先用于期货市场的分析,绍给推组转更矿后被广泛用于股市的中短期来自趋势分析,是期货和股票市场上最常用的技术分析工具。
  随机指标KDJ一般是用于股票分析的统计松调正短建功体系,根据统计学原理,通过一个特定的周期(常为拉老温庆眼极无察顶9日、9周等)内出现过的最高价、最低价及最后一个计算周期的收盘价及这三者之间的比例关系,来计算最后一个计算周期的未成熟随机值RSV,然后根据平滑移动平均线的方法来计算K值、D值与J值,并绘成曲线图来研判股票走势。


声明:稳得一批是理财投资基础知识平台! 并不指导专业性投资! 投资有风险,入市需谨慎!