Adaptive Trailing Stop


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.


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.
Favori Komutlardan Çıkart Favori Komutlara Ekle
« Je suis las des cruautés de mes semblables, qui ne sont pas mes pareils.

« Je prendrai l’essor et je m’envolerai vers la mer.

« Je connaîtrai le goût des brises du large. J’entendrai les grands cris de la tempête.


Great stuff friend! The use cases are helpful, but I have to say I enjoy reading your knowledge about the construction and how your code and ideas can be used in other scenarios or indicators. Thanks!
+3 Cevap Gönder
alexgrover wroclai
@wroclai, Thanks for the feedback, explaining both the calculation and the indicator would require an enormous amount of time but i can maybe give it a try when i judge the code is worth talking about :)
+1 Cevap Gönder
wroclai alexgrover
@alexgrover, No worries! ANYTHING you share is absolutely appreciated!
+1 Cevap Gönder
Thanks yet again - great stuff
+1 Cevap Gönder
alexgrover Old_tom
@Old_tom, Thanks for the support :)
Cevap Gönder
This is incredible! Thanks!
+1 Cevap Gönder
alexgrover stluvin
@stluvin, Thanks for the support :)
Cevap Gönder
Thanks for another great share!!
+1 Cevap Gönder
@Duyck, your welcome, i appreciate your support :)
Cevap Gönder
That so marvelous Alex.
After read through the article; although it's title is called Adaptive Trailing Stop, but it's functions not just operated as like as others trailing stop that so amazing.

Thanks again for the posting; as usual said so keep up your great works; appreciated =D
+1 Cevap Gönder
Ana Sayfa Hisse Senedi Takipçisi Forex Takipçisi Kripto Takipçisi Ekonomik Takvim Nasıl Çalışır Grafik Özellikleri Ücretlendirme Tanıdık yönlendirme Kurallarımız Destek Merkezi Web Sitesi & Aracı Kurum Çözümleri Görsel Bileşenler(Widget) Grafik Çözümleri Hafif Grafik Kitaplığı Blog ve Haberler Twitter
Profil Profil Ayarları Hesap ve Ödemeler Tavsiye edilen arkadaşlar Koinler Destek Kayıtlarım Destek Merkezi Yayınlanmış Fikirler Takip Edenler Takip ediliyor Özel Mesajlar Sohbet Çıkış