If you are ready and frantic to empower in Trend following strategy Bitcoin, this direct will help you get started. sustenance this as a blueprint for Bitcoin investment. Do customize engineering science according to your on-line financial situation that suits your needs. Trend following strategy Bitcoin has been praised and criticized. Nov 28, · Cherry Picking Trend Strategy. The next strategy is also a simple and classic trend following system which is available in the same course mentioned previously. The difference is that this strategy uses different parameters and is able to go either long or short depending on the trend. Here is an example short trade from this strategy on bitcoin. in one case you know how Bitcoin trend following strategy works, it is a no-brainer to sympathise that Bitcoin is there to stay. If we try to understand the technology and its underlying principles, it is right to say that the price will keep uphill terminated the eld to come.
Bitcoin trend following strategyUsing Simple Trend Following Strategies To Profit From Bitcoin • Decoding Markets
I used three EMA lines to determine the trend direction. I return 1 for an uptrend, and -1 for a downtrend. The entry price is going to be the high of the current candle for long trades.
The stop-loss price will be 3 times the current ATR away from my entry price. In this strategy, I want to enter trades all at once, but exit at two points. I will exit first half of my position at the previous high of the trend. Here is what I mean by the high of the uptrend the blue line is my target :. To code this, I first select the high prices of the last 20 candle bars. And then simply return the maximum of them.
And of course, the opposite goes for short trades. In other words, after my position is reduced, I want to move my stop price to break-even. Updating the self. Jesse automatically picks up on it, cancels the previous stop order, and submits a new one. It couldn't get any easier! To learn more about events and see a list of all available event methods in Jesse, make sure to read its documentation.
For this strategy, I intend to exit the second half of my position in a dynamic situation. The idea behind this situation is to exit when the price is highly overbought and about to take a serious correction. This method gets executed after every new candle only if we have an open position. Hence, it is used to update a position. Which means we don't need to check if the position is open or not. The next thing to consider here is that I want to exit only the second half of my position.
In other words, I want to liquidate the open position if it has been reduced. To explain why this issue is happening, we need to take another look at the take-profit and entry:. The error told us that the entry and the take-profit are the same at some points. A filter is just a function that returns a boolean value. A filter is passed by returning a True value, and vice versa. The name could be anything, but it is a generally good practice to either start or end the name of a filter method with the word filter.
This filter's job is to make sure that the trade we're trying to enter is worth it. To make it recognize my filter, I need to add it to the filters method which is a pre builtin method that returns a Python list:.
What that means is that no parentheses must be present at the end of it:. This time everything goes smoothly. The simpler you can keep your strategies, the easier it will be to debug them and even improve them over time.
Writing strategies with Jesse is as simple as trading your strategies manually. So next time you find a strategy introduced in a trading book, or by a trading guru, just write the code for it, and backtest it. See our Reader Terms for details. This is just a very basic strategy that uses moving average crossovers to identify upward and downward trends. We simply go long at the beginning of an uptrend and then exit our trade when the trend changes.
It is long only and the original system uses weekly timeframes. We obtained bitcoin price data for free from Blockchain on Quandl.
This works out at a compound annual return of This is actually less than the buy and hold return of The next strategy is also a simple and classic trend following system which is available in the same course mentioned previously.
The difference is that this strategy uses different parameters and is able to go either long or short depending on the trend. The annualised return in this example is Whereas buy and hold would have lost money in Of course, it should be noted that going short bitcoin is not easy and may have been even harder prior to Trend following strategies work well for new and inefficient markets that exhibit speculative price trends.
Whereas in more developed markets, mean reversion strategies tend to prevail. Here we have tested two basic trend following models that were designed some time ago and they have shown to produce good results trading bitcoin. We could easily have presented two different trend strategies here and shown much greater performance. But that would simply be a lesson in curve fitting and you would have difficulty trusting those results.
Instead, we have presented two strategies that were initially designed for stocks and shown that they can also be applied to bitcoin. Thus, validating the strength of these systems. Hindsight is a wonderful thing but these strategies would have worked well in the past and will continue to work in the future, if not on bitcoin then on some other trending market. Joe Marwood is an independent trader and the founder of Decoding Markets.
He worked as a professional futures trader and has a passion for investing and building mechanical trading strategies. If you are interested in more quantitative trading strategies, investing ideas and tutorials make sure to check out our program Marwood Research. This post expresses the opinions of the writer and is for information, entertainment purposes only.