SMA + Trend Strength + Trailing Stop Loss

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!

Release Notes: 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!
Release Notes: Update: Revision 2

-Removed unused code.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Whats the best time frame for this? 15m? 30m? 1hr? 1d?
NoobPro1 erkdaddy
@erkdaddy, I prefer 1W or 4D for the strongest signals.
Thank you for your time
unfortunately, no suggestions for now. I just started using Tradingview the other day. Have been using software from Sweeden that did not quite live up to my expectations. Do you have any suggestions for settings in the screener, technical, that fit the concept in your script, or something like that
Mick DK
NoobPro1 pipesmoker1
@pipesmoker1, other than what was said in the description. I use momentum based trade signals with price action to execute my entries and exits when this indicator is showing me a good market condition. It's best to keep your strategy simple, and to stay persistent with it. That's all I can really think of suggesting.
Thank you very much for the indicator

NoobPro1 pipesmoker1
@pipesmoker1, I'm glad that you like it. Please let me know how you think I can improve this indicator.
can it be used in intraday??
NoobPro1 subhdash1984
@subhdash1984, using this indicator for intra-day timeframes would reduce the accuracy of the indicator. You are more then welcome to try and use it as a supporting indicator (not meant to provide entry/exit signals). However, the most accurate signals would be produced when used with multi-day/week trading timeframes.
Home Stock Screener Forex Screener Crypto Screener Economic Calendar About Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Private Messages Chat Sign Out