This website is available in your language Deutsch Close. Offering your audience to invest via Coinhouse allows you to generate significant commissions. Choose to pay in Euro or Bitcoin! An additional offer to improve your performance when customers pay a Premium subscription. Our platform compiles all your data for you in your dedicated space. Find click here performances and payments in 3 clicks. Do not hesitate to contact us, a dedicated team is available to answer your needs.
Social Levelling. Practice your typing and keyboard skills while having fun, compete with typists from around the world. ETH Price. Crypto Utility. Simple discord bot to display the current ethereum price. Chewey Bot. Web Dashboard Automod. Crypto Monitor. Crypto price alerts for over exchanges and trading pairs combined with email alerts all free of charge. Its feature-rich commands will keep your server from having fifteen bots to only one! Provably Fair Bot. Economy Gaming.
A casino game bot that caries out provably fair games with guild specific currencies. A never seen before bot for financial charting. TradingLite Heatmaps. AD's - Bot. Crypto Gaming. Crypto Fun. Many technical trading strategies look for candlestick patterns, which we may explore in later articles. An excellent book for learning some of these patterns is Technical Analysis for Financial Markets.
For a brief overview, you can also view Investopedia's article, Understanding Basic Candlestick Charts. Now that we've seen an example of the data and understand each row's meaning, let's move on to configuring freqtrade to run our strategy. We have the required data for backtesting a strategy, but we need to create a config file, which will allow us to control several parameters of our strategy easily.
Then we are ready to go. You don't need to worry about anything else for the time being, but you should make sure to understand what the other configuration options mean, so be sure to visit the relevant docs. Here, we will be defining a simple moving average strategy similar to the one in the Python for Finance series. If you haven't read that yet, make sure to checkout.
You can find more details in Investopedia. I am going to tell you a little secret. Trading is really very simple, and you only have to do two things right:. Let's translate the Moving Average Crossover strategy in freqtrade using pandas. Notice that we are passing a dataframe as an argument, manipulating it, then returning it.
Working with dataframes in this way is what all of our functions will be doing. If you're interested in seeing indicators other than simple moving averages, have a look at the docs of ta-lib. The function definitions in this class use type hinting to define argument and return value types. Using qtpylib , we can easily find the crossover point.
By default, the generated freqtrade strategy file includes more options, such as ROI Return On Investment and stop-loss, discussed in part two of the article series. We'll disable them for now:. Having defined our simple strategy, now we want to evaluate it using historical data using backtesting , which allows us to place trades in the past to see how they would have performed. Backtesting isn't a perfect representation of how well our strategy would have performed because other factors affect returns in live markets, such as slippage.
To perform backtesting with freqtrade, we can run the following command using the class and functions we just created:. Sell reason stats This report shows us the performance of the sell reasons. Based on our strategy, we only used the sell signal, so we only have 1 row. We will see this in the next article of the series. Left Open Trades Report This part of the report shows any trades that were left open at the end of the backtesting. In our case, we don't have any and in general, it is not very important as it represents the ending state of the backtesting.
Summary metrics Personally, this is the area I usually look at first. The most important parts to point out are the following:. To understand the report in its entirety, make sure to read the relevant docs. We can see that only six trades occurred. These trades generated a profit of 5. This result is not impressive, considering the risk involved. However, this strategy is as simple as it gets and has vast room for improvement:. Comparing to buy and hold Just holding ETH, i.
It is important to test our strategy in different conditions - that is not only when the market is growing, but also when it is shrinking. Trading more coin-pairs We only considered Ethereum, which is one of the hundreds of coins we can trade.
This limit only allows for one trade to happen at a time, which is clearly suboptimal. Using more advanced strategies We used arguably one of the simplest strategies out there, which used only simple moving averages as indicators. Adding complexity doesn't necessarily mean better performance, but there's a massive number of indicator combinations we can backtest against eachother to find the best strategy.
Optimizing parameters Currently, we haven't attempted to optimized any hyperparameters, such as moving average period, return of investment, and stop-loss. Smaller time periods We only considered daily candlesticks, which is one of the reasons why the bot finds only about 0. A bot can potentially make more profit by making more frequent trades and looking at more fine-detailed candlesticks. To utilize freqtrade's plot commands, we will need to alter the docker-compose.
The only thing we need to do is comment out one line and uncomment another. See the following excerpt from the file to see an example:. This tells docker-compose to pull the freqtrade Docker image that contains the correct plotting libraries. These must be defined inside the strategy specified with the -s option. By default, this creates a plotly html file available in the plot directory:. You can view a full version of this interactive plot here. Hover over the plot to see how the bot actually does what we wanted it to do, as defined by our simple moving average strategy:.
To see what else you can do with plot-dataframe , run docker-compose freqtrade plot-dataframe -h or visit the relevant docs. I want to acknowledge freqtrade's helpful, well-written documentation, from which this article has taken much inspiration. I'd like to thank the developers for their effort in creating such an fantastic tool for all of us to use.
Currently he is working as a Research Data Scientist on a Deep Learning based fire risk prediction system. The internet's best data science courses View Courses. Toggle navigation. You are reading tutorials. Author: Ioannis Prapas Data Scientist.
How to backtest strategies and trade cryptocurrency with Python using freqtrade. In this first part, you'll see: Freqtrade's basic functionality and crypto-market terms — We'll learn how freqtrade works, how to navigate the command-line tool to download historical market data, create a new configuration file, and a new strategy. Backtesting a strategy on historical data to determine our strategy's performance — We'll see how to generate full reports, as well as plots to visualize our bot's simulated trades.
In the second part, we'll go into more advanced topics, such as: Trading with more coin pairs Understanding and defining Return On Investment ROI and Stoploss Optimizing our strategies Live deployment Suggestions for further improvement. Note Please be aware of freqtrade's disclaimer paraphrased : "This software is for educational purposes only.
Freqtrade is a cryptocurrency algorithmic trading software written in Python. It allows you to: Develop a strategy : easily using Python and pandas. We'll be creating a simple strategy in this article, and you can view freqtrade's example strategies repo.
Download market data : quickly download historical price data of the cryptocurrency of your choice. Backtest : test your strategy on historical data. Backtesting is a critical step to see if your strategy has any chance of making money in the real world. It is not a guarantee for actual performance since market conditions are more complex than the downloaded data. Optimize : find the best parameters for your strategy with hyperopt.
Select coin pairs to trade : your selection can be static or dynamic based on simple filters, such as if trading volume greater than a certain amount. Dry run : test a strategy on live data with a simulated wallet. Live run : deploy a strategy using real money via a crypto exchange's API.
This is the last step after you know what you are doing and are willing to lose all your money. Use a Telegram Bot : control and monitor your strategies through Telegram.
Investments and trading come with risks. ladi.crptocurrencyupdates.com is a Affiliate for several products and this website contains affiliate links. We may. View Contabo's terms & conditions and other legal pages. The Crypto Bot - Gunbot Our new Video Install Guide for Gunbot v22 is out! For this tutorial we are going to use a M SSD VPS hosting package from Contabo.