TradingView
millerrh
20 de Jul de 2021 04:08

Breakout Trend Follower V2 

Bitcoin / United States DollarCoinbase

Descrição

This is a variation on my other Breakout Trend Follower script. In the other script, you can use a moving average to act as a filter for your trades (i.e. if the price is below the moving average, it won't go long). After making the tool that detects trends on higher timeframes, I wanted to see if that might be a better filter than a moving average.
So this script lets you look at higher time frame trends (i.e. are there higher highs and higher lows? If so, this is an uptrend). You only take trades when you are with the trend. You have the ability to select up to two trends to act as a filter. Each trend direction is shown on a table on the chart for easy reference. The current pivot highs and lows are plotted on the chart so you can see when you might be breaking both the current timeframe's trend and higher level trends.

What I found was that in general this does not perform as well as the other strategy, but it does seem to be a lot more picky with trades. Showing higher win rates and a better profit factor. It just takes a lot less trades and the net profit isn't as good.
Comentários
Sunshine562
Dear Millerrh, I want the minimum width of the bollinger bands to be 1.5%. The candle must be closed below the bollinger bands for a Long Position and above the bollinger bands for a Short Position. How can I write this in your script.
Actually my strategy is Bollinger Bands and Stochastic Oversold (long = below 20, short = above 80). Is it also possible to add this into the strategy

I love to hear from you.

Greetings, Afra from the Netherlands
millerrh
@Sunshine562, Hi, your requirements have nothing to do with the intent of this script. I'd search for a Bollinger Band script that you can leverage if I were you to find something closer to what you are looking for.
Sunshine562
@millerrh, thnks for your answer. I am happy with your script so i thought maybe i can do this together, but i will find for something closer.
Crypto-Engineer
thanks for this, very nice work. can you add take profit and stop lost also? you can see a nice run up of all signals, but not necessarily the close is profitable, this could be resolved by a smart take profit/stop loss point.
millerrh
@Crypto-Engineer, It actually has a trailing stop under the most recent swing low of whatever timeframe you are on (same as my other Breakout Trend Follower script). I do have on my list of things to do a profit target option though. I'll probably do that to the other strategy first and make sure it works better before porting to this one.
Crypto-Engineer
@millerrh, thanks for swift response, but I heard trailing stop is not dependable in tradingview
millerrh
@Crypto-Engineer, I've traded alongside the previous version of this for awhile now and it matches my trades. This is not some default "trailing stop" function that tradingview provides. Rather, I'm figuring out the swing lows of the trend and placing a stop order there. So the execution of the order is just a stop order at that level.
Mais