A Trading System for Bitcoin


People speak about Bitcoin everywhere on the internet, but how can we trade it? I will try to give you a suggestion.


Financial activity:

Trading

Knowledge level:

Beginner

Reading time: 

10 minutes



Summary
Basic settings
A simple Donchian channel strategy for Bitcoin
Can it work with other cryptocurrencies?
Conclusions


Basic settings

In my opinion, Bitcoin responds well to breakout behavior.

It is known that the Donchian channel is a technical indicator that indicates well the breakouts (the upper band marks the highest price of a security over n periods while the lower band marks the lowest price of a security over n periods. The area between the upper and lower bands represents the Donchian channel).

In conclusion, I think that trading Bitcoin with a strategy based on the Donchian channel indicator could be a good idea.

We will code this idea on the free TradingView platform.



A simple Donchian channel strategy for Bitcoin

I hope you already know PineScript programming or have read my introductory article on trading systems programming on TradingView (A step-by-step guide to code your first automated strategy in TradingView).

This is Bitcoin (daily timeframe and data for BINANCE):

The Bitcoin on TradingView (data from BINANCE) - Screenshot by Author.

And this is the code of the strategy:

Code of “My Donchian Channel Strategy” (Screenshot by Author – Source: TradingView).


In line 7 I defined the channel length (it starts from the value of 10).

From line 10 to line 12 I calculated the upper line, the lower line, and the middle line, too.

I used lines from 15 to 19 to plot the three lines and fill colors inside.

If Bitcoin’s price close over the upper line I buy (line from 22 to 24), and if Bitcoin’s price close below the lower line I sell (line from 26 to 28).

In the opposite situation, I close the position (long or short) – line from 31 to 34.

That’s all!

This is the result with a channel length of 20 (daily chart) and a starting capital of 10000 $:


Backtest of the strategy on Bitcoin (Screenshot by Author – Source: TradingView).

It’s not bad, I think!

Warning: remember that this is only a basic strategy built on a basic idea. It’s not a full and tradable trading system! Don’t trade with real money with this system.

Can it work with other cryptocurrencies?

One of the funniest aspects of algorithmic trading is experimentation.

There are many other cryptocurrencies: try and try again!

This is the result with a channel length of 8 (daily chart) and a starting capital of 10000 $ on Ethereum (data from BINANCE):

Backtest of the strategy on Ethereum (Screenshot by Author – Source: TradingView).

Not bad, again.
It’s a trading idea to work on.


Conclusions

Takeaways
  • Cryptocurrencies respond well to breakout behavior, so you can try to trade them using technical indicators like the Donchian channel.
Suggestions
  • This is the starting point of the research: try different technical indicators, different cryptocurrencies, different timeframes, etc.

A sincere wish of good work to all!


Written by F. GRAMOLA (*).
(*) Member of S.I.A.T., the Italian Society of Technical Analysis (member society of I.F.T.A. – International Federation of Technical Analysts).


Warning
We merely cite our personal opinions for educational purposes only.
All trademarks are the property of their respective owners.
Investing and trading are risky. Don't invest or trade money that you cannot afford to lose.
The above trading system is intended for education and research only.

Post a Comment