ElliotV8_original_ichiv3_NoTSL A Good Simple Strategy (Patreon)
Downloads
Content
Introduction
In this video/blogpost I will show you the results of an algorithmic trading strategy that I once found on Github. It shows some very promising results in the backtest so it might also be profitable in live trading. But let me show you fisrst what I am talking about after the intro…
The author(s)
According to the comments in the code, this strategy is created by a person called Rallipanos and changes were made by IcHiAT
I dit not find any other sources or a website from Rallipanos on Github and google.
And also searching for IcHiAT only gave me this empty github page.
So if you are or know the authors of the code. You know it, the credits are for you. I’m just the guy who tests this to see if it has a probability to make us some money in the market.
The strategy
As for the strategy itself. It can be found on Github by searching for the name of the class or the filename.
If you are logged in on GitHub, you can find it in many repositories. I myself found it on this page: Code search results (github.com)
jilv220/freqtrade-stuff (github.com)
freqtrade-stuff/ElliotV8_original_ichiv3.py at main · jilv220/freqtrade-stuff (github.com)
raw.githubusercontent.com/jilv220/freqtrade-stuff/main/ElliotV8_original_ichiv3.py
We start off by skipping the loading of the libraries and seeing that the code makes use of parameter optimization from this first section.
There is also an additional indicator configured here. The Elliot Wave Indicator.
The following section shows the configured ROI table where profits are made after certain time limits are reached. However if you look at this carefully, you see that this ROI table is commented out. So the ROI has been set elsewere.
Also the strategy has some protections that are used when a certain maximum drawdown is reached. A stoploss guard, pairs with low profit are excluded and a cooldown period for when these are reached.
Here we see the actual used ROI setting for this strategy. It has been set to sell at 99 percent profits at any moment. Or to sell at the 200 minute mark if there is a loss of minus 100. At least that’s what I think the author wants it to do.
The set parameter for stop loss is minus 0.20 and this means that the strategy has been set to sell at a 20 percent loss after entering a trade.
Then there are some other parameters set for the parameter optimization and some more protection settings as well.
Here in this code you can see that the trailing stop loss has been set to True, which I overlooked initially. Now Im not particilarly fond of using the trailing stop loss because it can lead to unrealistic results in the backtests.
So I tested this algo with both this trailing stop loss set and unset. So that you can see the difference of setting this parameter too.
Finally there are some order type settings and the timeframe this strategy is supposed to work best on. We’ll see later if this is actually the case here.
After also some plotting settings we start to see which indicators are used in this trading algo.
They are the Exponential, Hull and Simple moving average, Elliot Wave oscillator and finally some different length RSI indicators.
Then the actual buy and sell signals are configured in the coming Python methods.
Buying
The strategy has multiple buying conditions.
In general it looks for opportunities when the fast RSI is below 35, suggesting an oversold condition.
It checks if the closing price is below an adjusted EMA value (low offset parameter), indicating a potential undervaluation.
Two sets of conditions based on the EWO: one where EWO is above a high threshold (aggressive momentum buying) and another where it is below a low threshold (possible reversal from a significant drop).
Additional checks ensure there is enough trading volume to support the entry.
Selling
The sell conditions are triggered if the price rises significantly above the determined HMA or adjusted EMA (high offset parameters), combined with a relative change in RSI values, indicating that the asset may be overbought.
These conditions are designed to take profits during upward price movements or prevent losses when the initial buy conditions no longer hold.
Backtest results
Trailing stop loss
Before I begin to show you these results I want to make a small remark about them. The showed you just now also had the trailing stop loss function activated by default. I am not a fan of this since it can make the backtest results look more favorable and thus giving it a bias. Therefore fooling yourself that this is a great working strategy while in fact it is not.
Unfortunately I found this out later because I overlooked this when I did the initial backtests. However after I did another full test with this trailing stop disabled, it did give me a chance to compare these results with each other and find out how much of a difference it would be.
Bias
There is also another thing about bias. Since the results I will show you are quite astonishing I also wanted to check if there could be any coding errors that would add a lookahead bias in the code. But after using the build in lookahead analysis it showed me that this was not the case.
Trailing stop loss results overview
The results of the trailing stop loss were as follows:
Now can you really believe that this relatively simple algo strategy will deliver this amount on the 5 minute timeframe?
This equity curve is simply amazing and looks to good to be true.
No trailing stop loss overview
And it really is because if I leave the trailing stop loss setting out of the equation. It shows a complete different result.
Now I will not argue that over 63000 USDT is a phenomenal result, because it still is. But the difference between using trailing stops or not in a backtesting situation is almost 175000 USDT.
So you see, you should really be aware of these things and most of the time be critical about the results you see. That’s also the case with the second, no TSL results.
You should always test this again on your own system and configuration. And also do a forward test of this algo over several weeks or even months. After that you will finally get an idea on the probabilities of an algorithm in real market circumstances.
On my setup with the no trailing stop version the equity curve looks like this:
You can see in the week in may or June 2021 there is a huge rise in profits during that week.
And that is mainly because the strategy catched som pumps in that week during the backtest. Remember that this is just a lucky draw and might not ever happen in the future or even in similar backtests if you start the backtest period one day earlier or later.
As for the drawdown this strategy might suffer in the future. The average drawdown is around 6 to 7 percent on this plot and the largest drawdowns it had were around 22 percent at max. The plot here only shows the max drawdown over the plotted period.
You can see on the win/loss ratio plot here that most of the time the strategy had weeks where there are more winning than losing trades. Please note however that this is not representative for the profitability overall, because lots of wins with small gains can easily be negated by the few losing trades with high losses.
It’s also remarkable that this strategy performs so well on the 5 minute timeframe. The other timeframes seem to have big problems making this a profitable strategy and I wonder why this is the case. More investigation seems to be necessary to find out the reasons behind this.
If anyone tests this strategy out on their own system and has similar positive results then please put these in the comments section below so that we all can see your confirmation as well.
Strategy League
With this score on the 5 minute timeframe there should be no surprise that the strategy scores high on the leaderboard. With a firm position in the top 15 I could argue that this algo has proven itself worthy of a place in my forward testing bot to see if it also performs well in real life as well.
And to see how this would perform under real market circumstances you can always check one of my live streams. I especially made one to find out if the best algo’s also perform well in the real market, albeit with a fictitious amount of course.
Please remember that all backtests and their results you see on the internet and youtube are only hypothetical exercises and you should always do your own research before any real trading with these strategies.
For now this is the end of this video/post. And I hope you liked it.
If you do then hit the like to show your appreciation. Subscribe and click the bell icon to be informed when I upload new video’s.
Thanks to all my Patrons that support me. If you want to get all the output, code, samples and more, these are all on my Patreon page. The link is in the description down below.
See you in the next video/post,
Goodbye.