alexgrover

Adaptive Trailing Stop

Introduction

The ability to adapt to possible markets states is important in technical analysis, this is why making adaptive indicator might help get better results. I propose a trailing stop indicator using recursion that can adapt to the efficiency ratio. I have added alerts since it's a often requested feature.

The Indicator

Its quite classical, bands are firstly made then a trailing stop is built around them. The bands are recursive, this allow for faster calculations in general but it also allow for a faster adaptivity. An higher length or factor will make the indicator detect longer term trends, factor determine the raising power of the efficiency ratio.

When smooth is checked the trailing stop will appear smoother.


When adaptive is unchecked the indicator will still act as a trailing stop but might be more affected to ranging markets.


Set a static/trailing stop loss :

You can set your stop loss based on the indicator, a static stop loss can be set at the value of the trailing stop when you enter the market. You can also set it as trailing stop, the indicator will follow the trend thus allowing for potential profits to grow's.


Determine The Trend Direction :

You can generate buy sell signals based on the indicator position relative to the price, when the indicator is lower than the price this indicate a up trending market, when the indicator is higher than the price this indicate a down trending market. If the trailing stop move this indicate a strong current trend.

False signals with trailing stops can happen, the price might go toward the trailing stop making it generate another signal, when market is ranging and exhibiting cyclical behaviour this can affect the indicator and the user might get stuck in a series of false signals, higher length/factor values can fix that at the cost of less early signals.


Identification Of Support And Resistance

Bands during low volatility/ranging markets can return potential reversal points when crossing with the price. The indicator can also do it, even if high/low crosses are better suited to determine support and resistance levels when using a trailing stop. You can use support/resistance identification in conjonction of the current trend detected by the indicator.


Conclusion

The indicator is fully operational in fixed mode while having potential down points in adaptive mode. As you can see the code that return the bands is fully recursive and might provide a great way to create adaptive bands in the future.

I have been asked to give more detail about the indicator uses rather than the construction, i hope the showcased uses are convenient.

Note that the showcased uses can be applied to any trailing stop.

Thanks for reading.

Check out the indicators we are making at luxalgo: www.tradingview.com/u/LuxAlgo/
Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?