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 open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?