This script is my interpretation of an idea from John Carter in his interview with Richard Moglen.
The idea of moving average ribbons or simply multiple moving averages has been around since moving averages were created. But many of these ideas, such as the Guppy Multiple Moving Averages focus on price closes above a moving average (or multiple moving averages).
In this version, the idea is that the EMAs are compared to each other from shortest to longest. In a completely bullish alignment, the EMAs are referred to as "stacked" in which, for example, the 8 EMA > 13 EMA, the 13 EMA > 21 EMA and so on. When the EMAs are "stacked" in a fully bullish alignment, the EMA cloud is filled green. When the EMAs are "stacked" in a fully bearish alignment, the EMA cloud is filled red.
In addition, I've colored the EMA lines themselves according to if they are rising (green) or falling (red) over a user inputted lookback. The default is "1" period, but it is adjustable. (Generally, I use "1" for the lookback.)
When the EMA lines flip from mixed (rising/falling) to all rising, a green triangle is drawn under the bar/candle. Similarly, when the EMA lines flip from mixed (falling/rising) to all falling, a red triangle is drawn over the bar/candle. This gives the user another potential entry in the context of a stacked EMA cloud. It also can give early signals for entry in a neutral cloud.
Candles/bars are colored according to the EMA cloud & EMA line status. So, for example, a bullish stacked EMA cloud (green) and all EMA lines green, will result in a bright green candle color. IF the cloud is green, but the EMA lines are mixed (red/green), this will result in a dark green candle. Similar logic applies to the bearish conditions which result in red (most bearish) or orange (still bearish) candle colors. IF the EMA cloud is neither bullishly stacked or bearishly stacked, then those candles will appear as gray (neutral).
There are many ways to use this script, but it excels in a trending market. John Carter often sets limit buys in an area near the 21D EMA in names that are trending & he wants to get in. The 13D EMA linewidth is set at 2 and the 21D EMA linewidth is set a 3 to easily identify this area. Now, you can "buy the dip" or "short the rip" within the context of a trending market (which the script identifies with green or red EMA clouds). Or you can wait for some confirmation via the green triangle (or something else like a candle stick pattern or trendline break). Remember to set stops in case price goes against you.
1 final note this is not a "magic bullet", but for a single indicator it does alot of work & personally I've found it to be very useful on multiple time frames. I do recommend combining it with volume (or a volume-based indicator).
Update #1: This updated version allows the user to adjust candle colors, forces the script to wait for bar closes on intraday charts (if conditions are met) before plotting triangles, and removes a link to YT. In addition, non-intraday charts (daily, weekly, etc) will flash a triangle intraday (if conditions are met) before updating completely at the close.
Access to this script is restricted to users authorized by the author and usually requires payment. You can add it to your favorites, but you will only be able to use it after requesting permission and obtaining it from its author. Contact weeklystockcharts for more information, or follow the author's instructions below.
TradingView does not suggest paying for a script and using it unless you 100% trust its author and understand how the script works. In many cases, you can find a good open-source alternative for free in our Community Scripts.
Author's instructions
″Script is free.
Just mention my YT channel name in your request & you're in.
Thanks!
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.