cajole

Moving Average - fade when crossed [cajole]

cajole Updated   
This indicator simply provides a moving average (SMA, EMA, etc. can be selected) which hides itself when touched by the price.

Two potential uses:
  • Set the growth rate to be slow, to highlight only very rapid moves on a chart.
  • Use the default settings and change the averaging period until the MA line remains bright. This MA can then act as a good trailing stop for the specific security.

TradingView does not remember indicator settings for specific charts. Consider adding a text label to your chart after you identify the ideal trailing stop. Similar trailing-stop methods are recommended by Kristjan Qullamagie is identical to Jesse Stine's "magic line" concept.
Release Notes:
Add an option to label the last value. Useful when using the script as a trail stop.

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.

Disclaimer

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.

Want to use this script on a chart?