Unleashing the Power: Unveiling a 10,000%+ Profit Surge in 2.5 Years with Advanced Cryptocurrency Algorithmic Trading Using Freqtrade

Here is the 3rd edition of the famous article on building PROFITABLE TRADING STRATEGY. (New Strategy)

1st Edition: “Unlock 4450% Profit with Algorithm Trading on Cryptocurrency: A Freqtrade Case Study” — Link

2nd Edition: “2509% Profit Unlocked: A Case Study on Algorithmic Trading with Freqtrade” — LINK

In the world of cryptocurrency trading, developing an effective algorithmic trading strategy can greatly enhance the potential for success. In this article, we will explore the backtested results of a trading algorithm that combines multiple indicators for trend confirmation, trend strength, momentum, volume analysis, and custom trend identification. The algorithm was implemented using Freqtrade, a popular open-source cryptocurrency trading bot.

We have covered lot of introductory topics in the 1st edition which covers all key basic concepts which I mentioned below, if you are new to “trading”, “algorithm trading”, “freqtrade” platform or “futures trading” concepts, I suggest you to open my previous articles and go through the same.

I’m here to talk about my new strategy which I was working for past few months

Topics covered in 1st edition: (Link)

Introduction to algorithmic trading and its benefits

What algorithmic trading is and how it can be used in the context of crypto futures trading

Some of the benefits of using algorithmic trading for crypto futures include:

Introduction to the freqtrade platform

Here are some key features of the freqtrade platform:

What is Short Trading and Long Trading in Futures Market

How Leverage works and Factors to consider while using Leverage during Trades

There are a few factors that traders should consider when deciding whether and how to use leverage:

  1. Risk appetite: Traders with a higher risk appetite may be more comfortable using larger amounts of leverage, while those who are more risk-averse may prefer to use less leverage or none at all.
  2. Trading strategy: Different trading strategies may be more or less suitable for leveraging, depending on the level of risk involved and the trader’s goals.
  3. Market conditions: The level of leverage that is appropriate for a trade may also depend on the current market conditions, such as the level of volatility or the overall trend of the market.
  4. Trading capital: Traders should also consider their available capital when deciding how much leverage to use, as they will need to have sufficient margin to cover any potential losses.

In general, it’s important for traders to carefully evaluate the potential risks and rewards of using leverage and to use it responsibly, as it can significantly impact the outcome of a trade.

Setting up freqtrade for crypto futures trading

  1. There are lot of tutorials about how to connect Freqtrade using docker in a containerized environment. You can refer to any of the many Youtube tutorials on the same.
  2. Here, Our main agenda is to show case the backtest and forward test results of the algorithm trading on freqtrade, so, I will focus on that more.
  3. If there is a lot of demand and requests in comments for a tutorial on how to setup freqtrade and run your own strategies if requested, I will add that in forth coming article. Thank you

Resources:

https://youtu.be/ASq2aeUHen8

or

https://youtu.be/PrPGKHCx5qY

or

https://youtu.be/H2OkrvSojOI

I’m giving reference only.

Indicators Used:

  1. ADX (Average Directional Index): The ADX indicator is employed as a trend strength confirmation tool. It helps to identify whether a market is trending or trading in a range. Higher ADX values indicate stronger trends.
  2. PSAR (Parabolic SAR): PSAR is used as a trend reversal confirmation indicator. It helps to identify potential points of trend reversals. PSAR dots above the price indicate a bearish trend, while dots below the price indicate a bullish trend.
  3. EMA (Exponential Moving Average): The EMA is utilized as a trend confirmation indicator. It helps to identify the direction of the prevailing trend. Prices above the EMA suggest a bullish trend, while prices below the EMA suggest a bearish trend.
  4. RSI (Relative Strength Index): RSI serves as a momentum indicator. It measures the speed and change of price movements, indicating whether an asset is overbought or oversold. RSI values above 70 suggest overbought conditions, while values below 30 suggest oversold conditions.
  5. Volume Analysis: A weighted average of volume is utilized to identify areas of significant volume impact. This helps to identify potential trading opportunities where strong volumes may lead to significant price movements.
  6. Custom Trend Identification: The algorithm incorporates a custom trend identification based on higher highs and lower lows. An up-trend is assigned a value of +1, while a down-trend is assigned a value of -1. This additional confirmation helps to ensure accurate trend identification.

Backtesting a trading strategy with freqtrade

Backtesting is the process of simulating trades using historical market data to evaluate the performance of a trading strategy. Freqtrade includes a backtesting feature that allows users to backtest their trading strategies by specifying a range of dates and a set of market data to use in the simulation.

To backtest a trading strategy with freqtrade, you will need to follow these steps:

  1. Create a configuration file: Freqtrade requires a configuration file to specify the details of your crypto futures exchange account and your desired trading parameters. To create a configuration file, copy the sample configuration file provided in the freqtrade repository to a new file called “config.json”. Then, edit the file to specify your exchange credentials and desired trading parameters.
  2. Prepare your market data: Freqtrade requires a set of market data to use in the backtest. This data should be in the form of a CSV file with columns for the date, open price, high price, low price, close price, and volume of the asset being traded. You can obtain this data from a variety of sources, such as a cryptocurrency exchange or a market data provider.
  3. Run the backtest: Once you have your configuration file and market data ready, you can run the backtest by executing the following command:
freqtrade backtesting --config config.json --strategy MyStrategy --datadir data/

Replace “MyStrategy” with the name of your strategy function and “data/” with the directory where your market data is stored. This will run the backtest using the settings specified in your configuration file and the market data provided.

  1. Review the results: Once the backtest is complete, freqtrade will generate a report with information on the performance of your strategy. This report will include metrics such as the profit/loss, the number of trades executed, and the win/loss ratio of the strategy. You can use this information to evaluate the performance of your strategy and make any necessary adjustments.
freqtrade strategy with 10000%+ profit in span of 2.5 years

By investing 1000 USDT, (1 USD approximately equal to 1 USDT with 1–2% variance)

for a period of 873 days (from 2021–01–01 07:30:00 up to 2023–05–25 00:00:00)

with maximum open trades at any given point of time being 5

maximum stake in each trade entry being around 199.703 USDT,

has given a Profit of 10802.20% Profit return on investment (ROI).

The Absolute Draw-down mentioned from results is at — 1.18%

Daily Win to Lose Ratio is at 606 days of WIN, 267 Days loss and 0 Days of Draw

Average Daily profit is at12.37% per day

Daily Average Trades is 101 approximate

Market Returns Have been (if you buy and hold Bitcoin (BTCUSDT) for the above mentioned period the returns are mentioned here, instead of trading) — 45.90%

Key Findings from Result:

The algorithm was backtested using historical cryptocurrency price data to evaluate its performance. The following key findings were observed:

  1. Trend Confirmation: The combination of EMA, ADX, PSAR, and the custom trend identification provided robust trend confirmation. Long trades were taken when prices were above the EMA, ADX values indicated a strong trend, PSAR dots were below the price, and the custom trend identification indicated an up-trend. Short trades were taken when prices were below the EMA, ADX values indicated a strong trend, PSAR dots were above the price, and the custom trend identification indicated a down-trend.
  2. Time-Frame Used: I have used 15 minutes timeframe for backtesting, I use same algorithm while trading manually within same time-period, the results are really great and can be implemented in real-time after thorough forward testing in “dry-run” mode is done for minimum of 2–4 months.
  3. Momentum Identification: RSI was effective in identifying momentum conditions. It helped to identify overbought and oversold levels, which assisted in determining optimal entry and exit points for trades.
  4. Volume Impact: The weighted average of volume analysis helped identify areas of significant volume impact. This provided insights into potential areas of increased market activity, allowing the algorithm to capitalize on price movements resulting from strong volumes and avoid fake outs.
  5. Risk Management: The algorithm incorporated stop-loss and take-profit levels to manage risk. Stop-loss orders were placed at the low of the previous candle before the breakout for long trades and at the high of the previous candle for short trades. Take-profit targets were set at 1.5 times the stop-loss value.

Tips for improving the performance of a trading strategy with freqtrade:

Here are a few tips for improving the performance of a trading strategy with freqtrade:

  1. Use historical data to evaluate your strategy: Before using your strategy in live trading, it’s important to test it using a range of historical market data to see how it performs under different market conditions. Freqtrade includes a backtesting feature that allows you to do this by simulating trades using historical data. By testing your strategy on a variety of data, you can get a better sense of its strengths and weaknesses and make any necessary adjustments.
  2. Optimize your strategy’s parameters: Many trading strategies have a set of parameters that can be adjusted to optimize their performance. Freqtrade includes a feature called “Hyperopt” that allows you to optimize your strategy’s parameters by searching for the combination that produces the best results. By optimizing your strategy’s parameters, you can improve its performance and increase the chances of success in live trading.
  3. Test your strategy in different market conditions: Different market conditions can have a big impact on the performance of a trading strategy. To get a better understanding of how your strategy will perform in different conditions, it’s a good idea to test it in a variety of markets, including both bull and bear markets. This will give you a sense of how your strategy behaves under different circumstances and allow you to make any necessary adjustments.
  4. Monitor your trades and adjust your strategy as needed: As you use your strategy in live trading, it’s important to monitor the performance of your trades and adjust your strategy as needed. This can help you identify any problems or weaknesses in your strategy and make adjustments to improve its performance. Some things you might want to consider when monitoring your trades include:

. The win/loss ratio: This is the percentage of trades that are profitable versus those that are unprofitable. A high win/loss ratio is generally a good sign, but it’s important to keep in mind that past performance is no guarantee of future results.

· The profit/loss: This is the overall gain or loss from your trades. It’s important to pay attention to this metric to see how your strategy is performing over time.

· The drawdown: This is the maximum loss from a series of trades. A high drawdown can indicate that your strategy is taking on too much risk, so it’s important to keep an eye on this metric and adjust your risk management techniques as needed.

By monitoring your trades and adjusting your strategy as needed, you can improve the performance of your strategy and increase your chances of success in the market.

5. Usage of different time period candle sticks and advantages: Candlestick charts are a type of chart that is commonly used in technical analysis to visualize the price action of an asset over time. Each candlestick on the chart represents a specific time period, and the chart is composed of a series of these candlesticks. The time period for each candlestick can vary, with common periods being 1 minute, 5 minutes, 15 minutes, 30 minutes, 1 hour, 4 hours, and 1 day.

The choice of time period for the candlesticks can have a big impact on the appearance and interpretation of the chart. For example, a chart with 1-minute candlesticks will show a lot of detail and may be more suited for short-term trading, while a chart with 4-hour candlesticks will show less detail and may be more suited for longer-term trading.

There are a few advantages to using different time periods for candlesticks:

  1. It allows you to see different time frames: By using different time periods, you can view the same asset at different time frames and get a sense of how it is performing over different time horizons. This can be useful for traders who are looking to trade at different scales, such as scalping, day trading, or swing trading.
  2. It can help you identify trends: Different time periods can reveal different trends in the market. For example, a chart with 1-minute candlesticks may show a lot of short-term fluctuations, while a chart with 4-hour candlesticks may show longer-term trends. By looking at different time periods, you can get a better sense of the overall direction of the market and identify trends that may not be apparent on other time frames.
  3. It can help you manage risk: By using different time periods, you can tailor your risk management to the time frame you are trading. For example, if you are trading at a short-term time frame, you may want to use a tighter stop loss to protect against rapid price movements, while if you are trading at a longer-term time frame, you may be able to use a wider stop loss without increasing your risk.

While doing forward testing, it is crucial to monitor results for every 100 trades. How many profit to loss trades happened, what is winning %, what is the maximum draw down that happened. While creating a strategy, total Maximum Number of trades and Maximum amount to enter a trade has to be clear. Also, test your strategy on multiple timeframes from 1m, 5m, 15m, 30m, 1h, 4h, 12h, 1d time frames. This will give you overall idea of how your strategy works at different time intervals. Keep optimizing your strategy till you get profits for 500+ trades, also run dry run tests for 2 months before confirming if your strategy is profitable or not.

Overall, using different time periods for candlesticks can be a useful tool for traders who want to analyze and trade the market at different scales. It’s important to experiment with different time periods and find the one that works best for your trading style and goals.

Conclusion:

The backtested results of the cryptocurrency trading algorithm demonstrated promising performance, showcasing its potential for generating profits in the cryptocurrency markets. By combining multiple indicators for trend confirmation, trend strength, momentum, volume analysis, and custom trend identification, the algorithm was able to accurately identify and capture trading opportunities in both bullish and bearish market conditions.

It’s important to note that past performance does not guarantee future results, and continuous monitoring and optimization of the algorithm are essential to adapt to changing market conditions. Additionally, it is crucial to exercise proper risk management and conduct thorough testing before deploying the algorithm with real funds.

Thank you, Readers.

I hope you have found this article on crypto strategy to be informative and helpful. As a creator, I am dedicated to providing valuable insights and analysis on cryptocurrency, stock market and other assets management.

If you have enjoyed this article and would like to support my ongoing efforts, I would be honored to have you as a member of my Patreon community. As a member, you will have access to exclusive content, early access to new analysis, and the opportunity to be a part of shaping the direction of my research.

Membership starts at just $10, and you can choose to contribute on a bi-monthly basis. Your support will help me to continue to produce high-quality content and bring you the latest insights on financial analytics.

Patreon https://patreon.com/pppicasso

Regards,

Puranam Pradeep Picasso

Linkedin — https://www.linkedin.com/in/puranampradeeppicasso/

Patreon — https://patreon.com/pppicasso

Facebook — https://www.facebook.com/puranam.p.picasso/

Twitter — https://twitter.com/picasso_999

--

--

Puranam Pradeep Picasso - ImbueDesk Profile

Algorithmic Trader, AI/ML & Crypto Enthusiast, Certified Blockchain Architect, Certified Lean Six SIgma Green Belt, Certified SCRUM Master and Entrepreneur