OPEN-SOURCE SCRIPT

Three EMAs Trend-following Strategy (by Coinrule)

Trend-following strategies are great because they give you the peace of mind that you're trading in line with the market.

However, by definition, you're always following. That means you're always a bit later than your want to be. The main challenges such strategies face are:

Confirming that there is a trend
Following the trend, hopefully, early enough to catch the majority of the move
Hopping off the trade when it seems to have run its course

This EMA Trend-following strategy attempts to address such challenges while allowing for a dynamic stop loss.

ENTRY

The trading system requires three crossovers on the same candle to confirm that a new trend is beginning:

Price crossing over EMA 7
Price crossing over EMA 14
Price crossing over EMA 21

The first benefit of using all three crossovers is to reduce false signals. The second benefit is that you know that a strong trend is likely to develop relatively soon, with the help of the fast setup of the three EMAs.

EXIT

The strategy comes with a fixed take profit and a volatility stop, which acts as a trailing stop to adapt to the trend's strength. That helps you get out of the way as soon as market conditions change. Depending on your long-term confidence in the asset, you can edit the fixed take profit to be more conservative or aggressive.

The position is closed when:

The price increases by 4%
The price crosses below the volatility stop.

The best time frame for this strategy based on our backtest is the 4-hr. Shorter timeframes can also work well, although they exhibit larger volatility in their returns. In general, this approach suits medium timeframes. A trading fee of 0.1% is taken into account. The fee is aligned to the base fee applied on Binance, which is the largest cryptocurrency exchange.
binanceBitcoin (Cryptocurrency)BTCCandlestick analysiscoinbasecoinrulecryptoCryptocurrencyExponential Moving Average (EMA)Ethereum (Cryptocurrency)Trend Analysis

Skrip sumber terbuka

Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai sumber terbuka supaya pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara percuma, tetapi penggunaan semula kod dalam penerbitan ini adalah dikawal oleh Peraturan dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Ingin menggunakan skrip ini pada carta?


Juga pada:

Penafian