如何用Excel编制指数移动平均线EMA?
在所有的均线中,最常见的是简单移动平均线Simple Moving Average,简单移动平均线的计算很容易理解,均线上各个点的值来自N个收盘价的算术平均值,只需将这些收盘价加在一起再除以N即可。但今天介绍的是指数移动平均线EMA(exponential moving average)。指数移动平均线与简单移动平均线的区别在于:简单移动平均线对于所有交易日的报价给予的权重是一样的,而指数移动平均线赋予不同交易日的报价不同的权重,报价离当前越近权重越大,对移动均线的走势影响也越大。
The Double divergence – A Powerful Trading Concept
Just a single divergence is not a strong enough signal and I typically recommend building confluence (other signals) around divergence systems. In 如何用MACD指标买卖股票? my indicator strategy course, we included a few divergence systems as well.
In this article, I introduce a different approach to trading divergences and the so-called double divergence can potentially improve the signal quality, compared to regular divergences.
A short recap: As we have said in a different article, a divergence on the RSI indicator signals losing momentum. The screenshot 如何用MACD指标买卖股票? below shows that, on the left, the price made a higher high, but the RSI did not make a new high. This tells us that the price action wasn’t actually that strong and although the price moved higher, the candles leading up to the new top weren’t as strong. The RSI, which analyses candle strength, confirmed it with the divergence.
The next example shows that the price made new lower lows during the downtrend. Again, the RSI didn’t confirm this move and made higher lows, indicating that the candles moving lower did not show a 如何用MACD指标买卖股票? lot of bearish strength.
The double divergence
Every trader who has traded divergences before knows that the prediction value of a divergence alone is oftentimes not very high and especially during established trends, divergences are not a reliable sign for a price reversal. That’s when the double divergence comes in.
A double divergence occurs when a series of multiple higher price highs forms (or lower lows) while the indicator prints lower highs. In the screenshot below, we use the MACD histogram, but you can use the RSI or any other momentum indicator as well.
The screenshot below shows a double divergence during a downtrend. Looking at price only already shows that the trend waves are becoming shallower and less strong. The price cannot as easily push lower and each trendwave is weaker.
The MACD shows multiple divergences, but just going with the first divergence alone would be a losing system. The patient trader would wait for multiple divergences to form. Also, it is advisable 如何用MACD指标买卖股票? to wait until the price makes a new higher high and completely signals a trend shift.
The screenshot below shows another example of a double divergence. At first, we saw a regular single divergence but the price did not reverse and kept 如何用MACD指标买卖股票? on going lower.
Then, the MACD confirmed the downtrend once again and posted lower lows (green lines – convergence). After the convergence, the trend weakened and the trend waves became shorter. The MACD now shows a double divergence and the market reversed higher.
Thus, trading a single divergence on its own does provide less accuracy compared to a double divergence. Of course, sometimes a single divergence will cause a trend reversal already, but waiting for double divergences could increase the trade quality.
The last screenshot shows a double divergence and it is also apparent 如何用MACD指标买卖股票? that the price action is becoming increasingly weaker. The price candes and trend waves leading lower are short and not as strong.
At the bottom, the price also printed a pinbar which is generally considered a reversal signal if it occurs in the right context.
This article provides insightful information about how to improve signal quality. Of course. waiting for a double divergence to occur requires more patience because it does not happen as often as a single divergence, but reducing system noise and adding confluence factors can often make a strategy more robust by being more selective.
如何用MACD指标买卖股票?
专业全面的深度量化服务
一站式量化研究平台
海量金融大数据
多资产回测框架
本地SDK
量化因子库
组合优化器
海量因子监控与分析
因子选股策略生成器
量化知识库
模拟交易与策略管理分析
Alpha Model
量化研究客户端
与专业合作伙伴共同成长
QQ四群:561410907(宽客招募中)
客户服务热线: 4000-820-386
邮箱: [email protected]
公司总部:上海市虹口区塘沽路463号虹口科技金融大厦16楼
python获取股票实时行情之后如何快速计算技术指标?
(可选1) 如果你用Python的目的是数据分析,可以直接安装Anaconda:Python数据分析与挖掘好帮手—Anaconda,它内置了Python和pip.
请选择以下任一种方式输入命令安装依赖:
1. Windows 环境 打开 Cmd (开始-运行-CMD)。
2. MacOS 环境 打开 Terminal (command+空格输入Terminal)。3. 如果你用的是 VSCode编辑器 或 Pycharm,可以直接使用界面下方的Terminal.
安装TA-Lib的时候可能会遇到没有VC++14.0的报错,这时候我们需要手动安装,在 https://www. lfd.uci.edu/~gohlke/pyt honlibs/#ta-lib 中下载你对应的Python版本的 TA-Lib whl文件。
2.基本使用
默认情况下,pandas ta 取 open 、high、low、close、volume、adj_close 列作为指标参数,本文的列名正好对应的上,无需再去特别命名。
aberration, above, above_value, accbands, ad, adosc, adx, alma, amat, ao, aobv, apo, aroon, atr, bbands, below, below_value, bias, bop, brar, cci, cdl_pattern, cdl_z, cfo, cg, chop, cksp, cmf, cmo, coppock, cross, cross_value, cti, decay, decreasing, dema, dm, donchian, dpo, ebsw, efi, ema, entropy, eom, er, eri, fisher, fwma, ha, hilo, hl2, hlc3, hma, hwc, hwma, ichimoku, increasing, inertia, jma, kama, kc, kdj, kst, kurtosis, kvo, linreg, log_return, long_run, macd, mad, massi, mcgd, median, mfi, midpoint, midprice, mom, natr, nvi, obv, ohlc4, pdist, percent_return, pgo, ppo, psar, psl, pvi, pvo, pvol, pvr, pvt, pwma, qqe, qstick, quantile, rma, roc, rsi, rsx, 如何用MACD指标买卖股票? rvgi, rvi, short_run, sinwma, skew, slope, sma, smi, squeeze, squeeze_pro, ssf, stc, stdev, stoch, stochrsi, supertrend, swma, t3, td_seq, tema, thermo, tos_stdevall, trima, trix, true_range, tsi, 如何用MACD指标买卖股票? tsignals, ttm_trend, ui, uo, variance, vhf, vidya, vortex, vp, vwap, vwma, wcp, willr, wma, xsignals, zscore
这里的值如果出现 100 ,就是出现DOJI形态。支持以下全部蜡烛形态:
2crows, 3blackcrows, 3inside, 3linestrike, 3outside, 3starsinsouth, 3whitesoldiers, abandonedbaby, advanceblock, belthold, breakaway, closingmarubozu, concealbabyswall, counterattack, darkcloudcover, doji, dojistar, dragonflydoji, engulfing, eveningdojistar, eveningstar, gapsidesidewhite, gravestonedoji, hammer, hangingman, harami, haramicross, highwave, hikkake, hikkakemod, homingpigeon, identical3crows, inneck, inside, invertedhammer, kicking, kickingbylength, ladderbottom, longleggeddoji, longline, marubozu, matchinglow, mathold, morningdojistar, morningstar, onneck, piercing, rickshawman, risefall3methods, separatinglines, shootingstar, shortline, spinningtop, stalledpattern, sticksandwich, takuri, tasukigap, thrusting, tristar, unique3river, upsidegap2crows, xsidegap3methods