OPEN-SOURCE SCRIPT

EMA/RMA clouds by Alpachino

RE-UPLOAD
The indicator is designed for faster trend determination and also provides hints about whether the trend is strong, weaker, or if a range is expected.

It consists of an exponential moving average (EMA) and a slower smoothed moving average (RMA). I chose these because EMA is the fastest and is respected by the market, while I discovered through practice that the market often respects RMA, and in some cases, even more than EMA. Their combination is necessary because I want to take advantage of the best qualities of both averages. Displaying averages based solely on the close values creates a simple line that the market might respect. However, this is often not the case. Market makers know that many traders still believe in the theory that closing above/below an EMA signals a valid new trend. They commonly apply this belief to EMA200. Traders think that if the market closes below EMA, it signals a downtrend. That’s not necessarily true. This misconception often traps inexperienced traders.

For this reason, my indicator does not include a separate line.
I use what are called envelopes. In other words, for both EMA and RMA, the calculation uses the high and low of the selected period, which can be chosen as an input in the indicator.

Why did I choose high and low?
To stabilize price fluctuations as much as possible, especially to allow enough space for the price to react to the moving average. This reaction occurs precisely between the high and low.

Modes:
EMA Cloud – This is the most common envelope in terms of averages. It shows the best reactions with a period of 50.
What should you observe: the alignment of the envelope or its slope.
  • [The more horizontally aligned the envelope is, the more influence the range has on the market.]

  • [The steeper the slope upward/downward, the stronger the momentum the market gains, indicating trend directionality.]

  • [From a price action perspective, a healthy trend generally has an angle of around 25°. You can consider angles higher than 25° as very strong trends.]

Usage:
Breakouts through the entire envelope tend to be strong, which signals that the trend may change. However, what interests you most is that the first test of the envelope after a breakout is the most successful entry point for trades in the breakout direction.

In an uptrend, the first support will be the high of the envelope, and the second (let’s call it the "ultimate support") will be the low of the envelope.
If, during an uptrend, the market closes below the low, be cautious, as the trend may reverse.
If the envelope is broken, trade the retest of the envelope.
In general, if the price is above the envelope, focus on long trades; if it’s below the envelope, focus on short trades.

Double Cloud – Since we already know that highs and lows are more relevant for price respect, I utilized this in the double cloud. Here, I use calculations for EMA and RMA highs and EMA and RMA lows.

The core idea is that since the price often reacts more to RMA than EMA, I wanted to eliminate attempts by market makers to lure you into incorrect directions. By creating more space for the price to react to the highs or lows, I made the cloud fill the area between EMA and RMA highs. This serves as the last zone where the price can hold. If the price breaks above this high cloud during a return, this doesn’t happen randomly—you should pay attention, as it’s likely signaling a range or a trend change.

The same applies to the low cloud for EMA and RMA.
The advantage of the double cloud is that you can see two clouds that may move sideways. This can resemble two walls—and they really act as such.

Usage:
Let’s say we have a downtrend. The market seems to be experiencing a downtrend exhaustion. Here's the behavior you might observe:

The price returns to the EMA/RMA low; the first reaction may still have some strength, but each subsequent return will move higher and higher into the cloud with increasingly smaller rejections downward. This indicates the absorption of selling pressure by bullish pressure. Eventually, the price may close above the cloud, significantly disrupting the downtrend and potentially signaling a reversal.

A confirmation of the reversal is usually seen with a retest of the cloud and a bounce upward into an uptrend.

The second scenario, which you’ll often see, involves sharp and significant moves through both envelopes. This kind of move is the strongest signal of a trend change. However, do not jump into trades immediately—wait for the first retest, which is usually successful. Additional tests may not work, as the breakout might not signify a trend change but rather a range.

When the clouds are far apart, it signals a weak trend or that the market is in a range. You will see that this is generally true. When the clouds cross or overlap, their initial point of contact signals the start of a stronger trend. The steeper the slope, the stronger the trend.

Bands and ChannelscloudsenvelopesexponentialmovingaverageMoving AveragesrangingrmasmoothedmovingaverageTrend Analysistrendtrading

Скрипт с открытым кодом

В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Хотите использовать этот скрипт на графике?

Отказ от ответственности