Among the hottest cryptocurrencies at the moment is definitely Ripple (XRP), which after going through a difficult period due to legal troubles with the SEC (United States Securities and Exchange Commission) that wanted to classify it as a security, then found new momentum thanks to the positive resolution of the issue, and the fact that the President of the United States, Donald Trump, included it among the cryptos that will be part of the state’s strategic reserve.
With a market capitalization that has recently returned to third place among the world’s cryptocurrencies, just behind BTC (Bitcoin) and ETH (Ethereum), XRP has established itself thanks to the progress of Ripple in the payments sector, but also due to the increased adoption of stablecoins like Ripple USD (RLUSD), which is expected to be integrated into Ripple Payments by the end of 2025.
This article will explore the possibility of using XRP to build a robust algorithmic trading strategy, based on a reversal approach using Bollinger Bands.
What are Bollinger Bands and how do they work in trading
This indicator is named directly after its inventor John Bollinger, who analyzed the behavior of prices as they move away from or closer to their moving average. Bollinger wisely decided to include two bands, calculated as the standard deviation of the simple average of prices.
The Bollinger Bands are therefore composed of 3 elements and are calculated using the following mathematical functions:
UpperBand = average price of the last N periods plus 2 standard deviations;
MedianPrice = average price of the last N periods (20 is the recommended number);
LowerBand = average price of the last N periods minus 2 standard deviations.
Reversal strategy on Ripple: logic of the trading system and initial performance
The strategy that will be adopted is an automatic system with ‘mean-reverting’ logic, which uses Bollinger Bands as a market reversal point. Upon reaching prices on the upper band, one will sell, while on the lower band, one will buy.
The session under consideration runs from 00:00 GMT to 23:59 GMT. These times are conventionally chosen to make it coincide with the solar day, as cryptocurrencies are quoted 24 hours a day.
Assuming to work with $10,000 per operation, the closing of the trade will occur upon reaching a profit target of $3,000 as the initial attempt value. It will be very useful right from the start to also use a fixed stop loss, which we assume to be $1,000, that can somehow protect our capital from operations with very high losses.
By applying this strategy to the XRP/USDT pair on a 15-minute time frame, it is possible to see how this “operational engine” would have behaved from 2017 to today. Previous data are not considered as they are insignificant and unreliable compared to when XRP then began to establish itself among the main cryptocurrencies in the world, increasing its price in 2017 to almost 50 times the average value recorded in 2016.
In figures 2, 3, and 4, the metrics obtained from the mean-reverting strategy just described can be appreciated: the results are encouraging. Overall, the equity line is increasing, and this is certainly a good starting point. However, the decline present in the last period should not be overlooked.
By analyzing the results more closely, it is noted that the average trade stands around $18.63, which compared to the amount of the single operation ($10,000) is equivalent to 0.19%, a value that does not guarantee to cover the operational costs.
Optimization of the trading system: time slots and operational window
Trying to define a different operational window might perhaps yield a better result, assuming that there is a sort of bias, that is, a time of day when the tendency for reversal is more pronounced.
By optimizing the start time of operations and its duration (expressed in the number of 15-minute bars each), the results in Figure 5 are found. Operating from 00:00 and up to the next 28 bars, or until 07:00, things improve significantly: the total profit of the system rises to $288,200 with over 70% fewer operations (2,799 compared to almost 10,000), and consequently, the average trade rises to $103.
Decidedly better results but indicating a still rough strategy, with a more substantial average trade but still not very high, and a rather high drawdown when compared to the net profit (Net Profit/Max Drawdown ratio = 6.58).
First of all, one could try to optimize the initially hypothesized stop loss and take profit values. In Figure 6, it is shown how varying them in steps of $500 yields interesting results with a stop at $1,500 and profit around $8,000-10,000. As an example, one can choose to use $8,500, which maximizes the Net Profit/Max Drawdown ratio.
Improvement of the long performance of the trading system on XRP (Ripple)
Considering that the strategy still makes many trades, there is probably still room to further filter the operations, especially on the side of the long trades that show weaker metrics (see Figure 4). To do this, one could use some price pattern that can identify the best conditions in which to execute the operations, filtering those with a lower probability of success.
In this regard, we will use a proprietary list that brings together many price combinations, different from each other, which will be used to understand in which situations XRP seems to respond better to the entry logic (long) of this system.
Analyzing the various combinations of patterns, it is found, for example, that if one operates long only when the pattern “MyPtnLY” 15 occurs and does not operate long when in the presence of “MyPtnLN” 30, a good compromise is achieved between the main reference parameters (Net profit, Average trade, Max Intraday Drawdown). There are also better results for individual parameters, but the patterns that generate them have a logic that is not very in line with the logic of the system, so the combination 15 is preferred for operating and 30 for not operating long.
With pattern 15, one will go long if the closing of the candle of the last session was lower than the closing of 2 sessions ago. With pattern 30, however, one will not enter long if the closing of the previous session is in the lower 20% of the range (high – low).
This combination of filters results in an increase in both the average trade, which rises to $400, and the net profit, which now exceeds $716,000. Additionally, the drawdown decreases below $45,000.
A good improvement is also visible from the more regular shape of the equity line, even if in the second part of 2024 it seems to have lost a bit of its shine, and only time will confirm the validity of our choices during the optimization phase.
Conclusions on the reversal strategy on XRP with Bollinger Bands
The reversal strategy with Bollinger Bands has certainly proven effective on the XRP/USDT pair, even though it would require further refinements to be ready to operate live on the market.
Even though it has now reached the Olympus of cryptocurrencies, XRP is still quite young and presents many opportunities for traders who want to engage with different types of market approaches. As always, we leave it to the reader to experiment and develop this idea.
See you next time and happy trading!
Andrea Unger