OPEN-SOURCE SCRIPT

34ema trend channel

First of all, thanks to the first designer of this indicator, I just made some modifications to this favorite indicator.Please forgive me for my limited English!
First of all, I would like to say that the modification of King EMA index has given me a new trading experience. Four moving averages can be used for indicators, but I only used two because I think two are enough. These two moving averages are 34ema's high and low, which form a trend channel. When this channel runs downward, it is short trend; when the channel runs upward, it is long trend; when the channel runs horizontally, it is shock trend.
In fact, let's explain the presentation of AUD chart on the left。
1sell is the beginning of the downward trend. When we see the beginning of the trend, the shape of the K-line is a 4-hour downward trend, so we need to observe whether there is a short opportunity when the price rebounds to 2sell. The second is 3Sell and 4sell. They all have one thing in common, that is, they all have one or two k-lines falling and breaking a new low. At this point, when we go to observe the moving average channel, we find that it has become a short trend.
When the card short trend, we need to do is to follow the market to trade. Sell at high prices. When the price does not reach a new low after 6sell, we should be alert because the low point is rising. When 1buy breaks through 6sell, the high point needs to pay attention to whether the trend has changed,
So how to confirm whether the trend has changed from short to long? We can see that when 2buy stepped back on the moving average channel, there was a buying reaction, which is a good confirmation signal. And 2buy-5buy are all low points rising. When 6buy appears, the price rises rapidly and becomes a bigger bull market. That's the power of trends. Specific operation I can explain in Chinese, foreign friends hope to be able to translate and understand.
Now let's talk about how to set indicators.
After opening the indicators, we can see that the first line to the fourth line is the display and hiding of the moving average. I only choose to check direction and dragging direction, which are the channel moving average. They are also the more useful moving average channels for large-scale trend trading.
Then comes the volatility zone, which is the choice of colors in the moving average channel. You can choose the color you like. So what I see in the chart is that I only checked the three options of direction lagging direction vvolatility zone, and set their colors.


首先我想说的是感谢这个指标最初的设计者提供了源码,我只是针对指标的修改,使我获得了一种新的交易体验。指标是可以使用4条均线的,但我其实只用了两条,因为我觉得两条就够用了。这两条均线就是34EMA的HIGH和LOW,这两条均线组成了一条趋势渠道,当这条通道向下运行时为空头趋势,当通道向上运行时为多头趋势,当通道横向运行时为震荡趋势。
其实,我们对于左侧AUD图表的演示作一个解释:
1SELL为下跌趋势的开始,当我们看到趋势开始时K线的形态是4小时的大阴线向下跌,所以我们需要观察价格在反弹到2SELL的时候是否有做空机会。其次是3SELL和4SELL 它们都有一个共同点,就是全部都是1根或两根K线就向下跌,并且破了新的低点。此时我们再去观察均线通道时,发现它已经成为了空头趋势。
当牌空头趋势时,我们需要做的就是跟随市场去交易。逢高卖出。而当6SELL之后价格没有创新低时,我们就应该产生警觉,因为低点在抬高,而当1BUY突破6SELL时,高点在抬高时就需要注意趋势是否已经转变,
那么如何确认趋势是否已经由空头转为多头呢?我们可以看到2BUY时回踩到均线通道时出现了买盘反应,这种反应就是比较好的确认信号。并且2buy-5buy都是低点在抬升,当出现6BUY时,价格又快速拉升成为一个更大的牛市。这就是趋势的威力。具体操作我可以用中文解释,国外的朋友希望可以翻译理解。
下面我们先来说一下指标如何设置。
打开指标之后我们可以看到第一行至第四行是均线的显示与隐藏,而我只选择勾选Direction和lagging direction 这两条就是通道均线,也是大级别趋势交易较为好用的均线通道。
然后就是Volatility zone这是对于均线通道内颜色的选择。这个大家可以随意选择自己喜欢的颜色。所以图表中看到的就是我只勾选了DIRECTION LAGGING DIRECTION VVOLATILITY ZONE这三个选择,并对其颜色进行了设置。

下面我用中文好好来说一下我对这指标的一些使用心得:
1,当通道表现为空头趋势时,只能选择逢高卖出。利用价格回到通道边缘或内部的时候进行买出,止损在通道上方。
2、当价格向上突破通道时,选择空头止损离场,然后等待多头的入场机会。
3、当价格突破下跌的通道时,价格回踩到通道上沿时选择止跌买入。预期后面的多头趋势,但上破通道有一个硬性的要求就是必须突破最近的下跌趋势拐点,形成更高的高点。
4、随着时间的演变,趋势从下跌演变成上涨时,并且低点在抬高,高点也在抬高时,为明显多头趋势,此时只适合逢低买入。
5、什么算低点呢?就是当价格跌到通道上沿或通道里面时可以选择买进。
6、如果价格向下跌破趋势通道但快速收回通道时不算有效跌破,因为必须两根同色K线收盘在下方时才算跌破趋势通道,否则我都认为是主力机构在制作空头陷阱。
所以当你看到一根PINBAR或者是刺透双K线时都算是假破位诱空。

然后是右图上方的XAU 4H错误示例,因为趋势下破了低点,但同时也上破了高点,所以趋势是不明显的,即使从图中可以看到是震荡下跌行情,但均线最怕的就是震荡行情,不管是震荡上升还是横向又或者是下跌,都是不灵的。
所以当大级别左侧为下跌行情时,不要被小级别的反弹趋势通道短期向上就觉得应该考虑做多,其实我们更应该顺势而为。
尽管做为后知后觉者,我们也能吃到趋势的中间部分,不会在场外看着不敢入场。

那么趋势通道做XAU真的就不行吗?答案不是的,只是因为你选择的周期不对,用均线做交易有一个诀窍就是图表周期总有一个适合通道的,如果4小时是震荡下跌,那小时就会更加明显,所以只有选择通道适合的周期才能事半功倍,而不是用通道去选择合适的行情。
当然,用均线通道去做单边的行情是最好不过,但不要忘记,行情走势有70%的时间都是震荡的,只有30%的时间是单边的。
所以如果我们把XAU切换成为小时级别的走势时,你会发现,趋势当通道处于空头排列时,逢高卖出并不是不可以。同是也能看到多空转换时的回踩动作,就比如AUD 4H 和XAU 1H图表在多空转换的时候都有异曲同工之妙,市场绝大多数多空转换的时候就是这样子的。
34EMA指标使用心得分享。
Exponential Moving Average (EMA)KINGTrend Analysis

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?


潜心研究供需量化交易程序中。。。

Nirvana Supply Demand 指标的量化进度不断更新中;

终有一天,必将完成供给需求指标AI交易稳定盈利的目标!

期待ing
更多:

免責聲明