OPEN-SOURCE SCRIPT

SMA + Trend Strength + Trailing Stop Loss

Atualizado
The 'SMA + Trend Strength + Trailing Stop Loss' indicator was designed for swing trading long positions over the course of days/weeks. The benefit of the indicator is to identify areas where the market of a given asset is showing signs of a strong uptrend, divergences, and fear. A 13-bar simple moving average is color coded to four colors based on 5 given conditions at a time, which are represented as a trend meter on the bottom right of the screen. A trailing stop loss indicator is included to secure your profits or limit your loss in case the market reverses on you unexpected. Please use this indicator responsibly with proper risk management, and never rely on the indicator by itself for buy and sell signals.

When the simple moving average color is green, it means that at least 4 of 5 conditions are confirming a move upwards, this is when you can take an entry into a trade based on your entry strategy. As the trend continues, the color will eventually change to yellow signaling a divergence. This is when you can use your exit strategy to find a good point to sell. It is wise not to take new positions when the color is trending yellow.

If the color changes from yellow to orange, that is a warning sign that the trend is about to change or has begun to change. Prices may have already fallen. However, sometimes the color will change from yellow back to green signaling a continuation of the trend. You can either keep holding or take a new position in this instance.

When the color is red, this signals fear in the market, you should stay out of the market at first. However, as the market consolidates and the color starts changing back to orange, this is an opportunity to take a long position at a reasonably low price.

Simple Moving Average (13-Bar) Color Explanation:
The colors change based on 5 market conditions represented in the trend meter.
Green: Strong Uptrend
Yellow: Divergence Present
Orange: Warning
Red: Fear

Trend Meter Explanation:
The trend meter draws 5 arrows indicating bullish or bearish presence.
LL = Lower Lows - Detects when the market is trending with lower lows.
HH = Higher Highs - Detects when the market is trending with higher highs.
MA = SMA Direction - A formula is used to determine the direction of the SMA.
DI = Directional Index - Identifies when upwards momentum is trending.
RSI = Relative Strength Index - Identifies when the RSI is in an uptrend state.

Note: For advanced users, this indicator has a hidden DMI(4, 4, 4) and RSI(14) indicator used to determine the last two conditions. The Directional Index is based on a DI Plus momentum moving average to determine a momentum trend and the RSI trending over 50 will constitute an uptrend signal as below 50 it will point down.

Trailing stop loss:
The trailing stop loss is determined based on the lowest price of the last 8 bars.
A gray step-line is drawn at the suggested stop activation price.
A red step-line is drawn at the suggested stop limit price.
When the price breaches the trailing stop, a red X will appear below the bar.

You can turn each of these features on or off based on your preference. Happy trading!

snapshot
Notas de Lançamento
New Update: Revision 1
-Added option to change location of the trend meter. You can now place it on top or on the bottom.
-Added a grayscale option that turns all but the color coded MA into shades of grey.

Note - Please leave me a comment with any changes you want to see on this indicator. Thanks!
Notas de Lançamento
Update: Revision 2

-Removed unused code.
Moving AveragesSimple Moving Average (SMA)smastoplossswingswingtradingtrailingstopTrend Analysistrendstrength

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?

Aviso legal