gary_trades

ADX_TSI_Bol Band Trend Chaser

The idea of this script is to be a low risk strategy on trending stocks (or any other trending market), aiming to achieve minimal draw down (e.g. at time of writing AAPL only had ~1.36% draw down, FB ~1.93% draw down and the SPY was 0.80% draw down and all remained profitable).
Testing proved it shouldn't be used in choppy stocks and best period was on daily charts. The back test filter goes back until 2010 so you can obtain 10 years of data.
The strategy utilizes the 200 Moving Average, a Custom Bollinger Band, a TSI with 52 period weighted moving average and ADX strength.
Although back test dates are set to 2010 - 2020, all other filters (moving average, ADX, TSI , Bollinger Band) are not locked so they can be user amended if desired. However the current settings have been tested with manual trading for quite some time to get this combination correct.
Buy signal is given when trading above the 200 moving average + 5 candles have closed above the upper custom Bollinger + the TSI is positive + ADX is above 20.
As back testing proved that this traded better only in tends then some Sell/Short conditions have been removed from the script and this only takes Long orders.
Only requires 2 additional lines of code to add shorting order and then remove the "buy" condition and this could be used for a downward trending stock instead.
Close for either long or short trades is signaled once the TSI crosses in the opposite direction indicating change in trend strength.
Further optimization could be achieved by adding a stop loss, which I may do in the future.

NOTE: This only shows the lower indicators however for visualization you can use my script "CUSTOM BOLLINGER WITH SMA", which is the upper indicators in this strategy.
This is my first attempt at coding a strategy so I'm happy to receive any feedback or hints on how this could be written better from any experienced coders!
AAPL SPY
Script de código aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Quer usar esse script no gráfico?