OPEN-SOURCE SCRIPT

Multi Moving Average Crossing (by Coinrule)

Moving Averages are among the most common trading indicators. They are straightforward to interpret and effective to use.

One of the limitations of using moving averages is they can provide buy and sell signals with a relatively high lag, making it very difficult to spot the lows and tops of the trend.

Moving averages calculated with a low number of periods like the MA9 (the average of the previous nine price periods) react very fast to price moves providing prompt signals. On the other side, more signals may end up with more false-signals and more trades in a loss.

On the contrary, moving averages calculated with a higher number of periods like the MA100 (which considers the previous one hundred price periods) give more reliable signals, but with a delay.

A system catching the crossing of the MA50 over the MA100 is a good compromise for successful long-term strategies. It provides, on average, reliable buy signals.

The Multi Moving Average Crossing Strategy tries to optimize the exit without waiting for the same opposite crossing (MA50 below MA100). It uses the MA9 crossing below the MA50, instead, to spot a better time for selling.

The setup is as follows.

  • BUY when the Moving Average 50 crosses above the Moving Average 100
  • SELL when the Moving Average 9 crosses below the Moving Average 50


The higher is the time frame to calculate the Moving Averages, the better is the overall performance of the strategy. The 4-hour (or 6-hour) time frame seems to be the best, even if it results in fewer trades. If you want to trade more still with good results, the 1-hour time is a good compromise.

Advantages of the strategy

This strategy seeks to catch those that are more likely relevant uptrends and close the trade relatively quickly. More trades mean more opportunities. This is especially effective if you run the strategy on all the available coins on the market, as you could do with Coinrule.

Generally, a Multi Moving Averages approach beats the classic crossing strategy involving only two Moving Averages. We backtested a sample of twenty trading pairs to assess the benefits empirically.

The results show that the Multi Moving Average Strategy

  • outperforms 13 out of 20 times
  • has 95% higher average return
  • has 67% higher median return



The strategy assumes each order to trade 30% of the available capital and opens a trade at a time. A trading fee of 0.1% is taken into account.







Bitcoin (Cryptocurrency)CryptocurrencygoldencrossMoving AveragesTrend Analysistrendfollowing

Skript med en öppen källkod

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. Du kan ange den som favorit för att använda den i ett diagram.

Vill du använda det här skriptet i ett diagram?


Also on:

Frånsägelse av ansvar