Stochastic(KD)学习交流帖

 

自己想结合这个指标写EA,但是发现这个指标看盘用了挺久,只知道用法,对于他的具体情况,还很模糊,想认真学习一下,就开个帖子为了学习交流。 也会写自己的总结与思考,如果有错误请让我知道,感谢!


原文链接:http://www.metatrader5.com/en/terminal/help/indicators/oscillators/so

译文:

Stochastic Oscillator(随机震荡指标)

The Stochastic Oscillator Technical Indicator compares where a security’s price closed relative to its price range over a given time period. The Stochastic Oscillator is displayed as two lines. The main line is called %K. The second line, called %D, is a Moving Average of %K. The %K line is usually displayed as a solid line and the %D line is usually displayed as a dotted line. There are several ways to interpret a Stochastic Oscillator. Three popular methods include:

    随机震荡指标是将收盘和给定周期内的价格波动范围作比较,并通过两条线来描述这个比较。主线被称为%K, 第二条线叫做%D,这个%D是%K的移动平均线。%K线通常用实线表示,%D线通常用虚线表示。有许多方式可以解释这个指         标,以下是三种最普遍的方式,包括:

Buy when the Oscillator (either %K or %D) falls below a specific level (for example, 20) and then rises above that level. Sell when the Oscillator rises above a specific level (for example, 80) and then falls below that level.

     1. 买入条件:当振荡器(无论是%K线还是%D线)低于一定水平(比如低于20),然后(%K线或者%D线)有运行至该水平(20)之上;

         卖出条件:当振荡器运行到一定水平之上,如80之上,然后又跌落回80之下。

Buy when the %K line rises above the %D line and sell when the %K line falls below the %D line.

     2. 买入条件:%K线运行至%D线之上 

         卖出条件:%K线运行至%D线之下 

Look for divergences. For instance: where prices are making a series of new highs and the Stochastic Oscillator is failing to surpass its previous highs.

     3.  找背离信号。比如,价格持续创新高(或新低),但是指标并没有相应的新高(或新低)出现。

You can test the trade signals of this indicator by creating an Expert Advisor in MQL5 Wizard.

(您可以在MQL5 Wizard中测试此指标的交易信号) 

Stochastic Oscillator

Calculation(计算)

Four variables are used for the calculation of the Stochastic Oscillator: 

    随机震荡指标的计算使用了4个变量:

%K periods. This is the number of time periods used in the stochastic calculation.

1. K%周期,计算指标时用的时间周期个数。 (计算用到的K线根数)

%K Slowing Periods. This value controls the internal smoothing of %K. A value of 1 is considered a fast stochastic; a value of 3 is considered a slow stochastic.

2. %K 减缓周期,  这个值控制%K的内部平滑。 值为1时被认为是一个快速震荡(更灵敏); 值为3被认为是慢速震荡(较迟缓);

%D periods. This is the number of time periods used when calculating a moving average of %K.

3.  %D周期,这个是,当计算%K的移动平均时,用到的周期个数。

%D method. The method (i.e., Exponential, Simple, Smoothed, or Weighted) that is used to calculate %D.

4. %D 方式, 这个方式,即是计算%D用的方式,即: 指数、简单、平滑、加权

 

The formula for %K is:

计算%K的公式: 

%K = (CLOSE - MIN (LOW (%K))) / (MAX (HIGH (%K)) - MIN (LOW (%K))) * 100

Where:

说明: 

CLOSE — today’s closing price;    (ClOSE, 表示今日收盘价(我理解为当前收盘价))

MIN (LOW (%K)) — the lowest minimum in %K periods;  (MIN (LOW (%K)), 表示在给定的%K周期内出现过的最低价格)

MAX (HIGH (%K)) — the highest maximum in %K periods. (MAX (HIGH (%K)), 表示在给定的%K周期内出现过的最高价格

 

The %D moving average is calculated according to the formula: 

%D移动平均的计算公式: 

%D = SMA (%K, N)

Where: 说明:

N — smoothing period; (N,表示平滑周期)
SMA — Simple Moving Average. (SMA, 表示简单移动平均线)

 

+++++++++++

| 总结与思考 |

+++++++++++

这个指标将当前价格与一定周期内的价格波动范围作比较。

%K = (CLOSE - MIN (LOW (%K))) / (MAX (HIGH (%K)) - MIN (LOW (%K))) * 100

%K线公式解读:

1. 当前收盘价格-K周期内的最低价; 如果价格涨了,会得到一个较大的值,如果价格跌了,会得到一个较小并接近于零的值(当前价格越接近最低价格,值就越接近零,所以这个值也一定是正值)。

2. K周期内的最高价格-K周期内的最低价格=K周期内的波动幅度 (一定是个正值)

3. 第一步的值/第二步的值=当前价格在过去K周期内价格的一个位置

4. 由于第一个值一定是小于等于第二个值的,所以这个值在0和1之间波动,最后乘以100,这个值就在0-100间波动了 

(其实我是一边看公式一边解释给自己的…终于彻底看懂这个指标的原理了!)

 

%D线公式解读:

 %D = SMA (%K, N)

1. 它只是一个%K值的简单移动平均线

2. N表示平滑周期 (其实我还不知道平滑周期是怎么平滑的,谁能教教我?我先去搜搜…)

 

所以这个东西,告诉我们的信息是:

当前价格,在过去的K个周期内的价格波动中,处于一个什么位置。 

所以,正确的使用姿势是:

1. 震荡指标需要配合趋势指标使用

2. 当趋势指标显示趋势向上,这个KD震荡指标告诉我们,在当前多少根K线中,价格处于一个什么样的相对位置。

如果是向上趋势,需要KD指标显示一个较低水平帮助我们寻找相对好的买点;(涨势中找相对低点去买,简称低买)

如果趋势向下,需要KD指标显示一个较高水平,帮我们找到相对好的卖点。 (跌势中找相对高点去卖,简称高卖)

3. 最后两个括号才是高买低卖的真正奥义,才不是传言中的抄底摸顶!

 

(恭喜自己自学完成Stochastic指标顺利完成!特此与大家分享喜悦!) 

 
为了督促自己,以后还会开其他指标学习贴,希望可以尽快将自己的各种想法自如地表述成EA进行测试~
 
现实中使用该指标的金叉死叉来进行交易机会的提示,因为该振荡指标比较灵敏,先于价格变动出现信号提示
原因: