This script utilises the RSI and EMA indicators to enter and close the trade.

The relative strength index ( RSI ) is a momentum indicator used in technical analysis . RSI measures the speed and magnitude of a security's recent price changes to evaluate overvalued or undervalued conditions in the price of that security. The RSI is displayed as an oscillator (a line graph) on a scale of zero to 100. The RSI can do more than point to overbought and oversold securities. It can also indicate securities that may be primed for a trend reversal or corrective pullback in price. It can signal when to buy and sell. Traditionally, an RSI reading of 70 or above indicates an overbought situation. A reading of 30 or below indicates an oversold condition.

An exponential moving average ( EMA ) is a type of moving average (MA) that places a greater weight and significance on the most recent data points. The exponential moving average is also referred to as the exponentially weighted moving average . An exponentially weighted moving average reacts more significantly to recent price changes than a simple moving average simple moving average ( SMA ), which applies an equal weight to all observations in the period.

The strategy enters and exits the trade based on the following conditions.

ENTRY

RSI has a decrease of 3.

RSI <40.

EMA100 has crossed above the EMA50.

EXIT

RSI is greater than 65.

EMA9 has crossed above EMA50.

This strategy is back tested from 1 April 2022 to simulate how the strategy would work in a bear market and provides good returns.

Pairs that produce very strong results include ETH on the 5m timeframe, BNB on 5m timeframe, XRP on the 45m timeframe, MATIC on the 30m timeframe and MATIC on the 2H timeframe.

The strategy assumes each order is using 30% of the available coins to make the results more realistic and to simulate you only ran this strategy on 30% of your holdings. A trading fee of 0.1% is also taken into account and is aligned to the base fee applied on Binance.