This post was inspired by a comment from a follower on the last post where I released and talked about my new python trigger script. There were some great questions and I thought it would be useful for everyone to see the responses in a post. I cover some random bot settings, back testing, blacklisting pairs, how I manage red bags, etc. Read on for some juicy insights!
In case you didn’t see the post on the new python trigger script, you can read it here. Follower @torabayashi posted a great comment with some awesome questions and I felt the responses wouldn’t be seen by other followers, so wanted to give it some more love. You can see the original comment here, and I’ll respond to the individual sections and questions here. Keep in mind, I’m responding with my own experiences. I don’t claim to be an expert, or suggest you try any of this – I’ve made and lost in crypto, just like everyone else.
Here we go….
First of all, thank you so much for being willing to share your work. Starting around 2020 Jan I studied Python to learn how to apply machine learning, and worked with Freqtrade for a while, then tried Cryptohopper,
Similar path. I’ve been “coding” since I was a kid off and on, but went into a totally different field, and did it mostly for fun and little personal projects. Things like Arduino and Raspberry Pi projects, nothing fancy. Picked up some “google” knowledge on python in 2019, but never applied it to crypto until earlier this year, starting with this project. I’ve never tried Freqtrade or Cryptohopper, but might check them out at some point.
…finally landed on the same 3Commas / FTX combination that you have.
I’ve also been liquidated a few times on Binance, so I definitely feel your comment when you say Binance is unforgiving… Have lost a lot of money as well as made a lot of money, but always learning regardless!
Seems to be a common experience. I started on Binance as well and have been liquidated more times than I can count. I had heard a ton about FTX.com on Crypto Twitter but really wasn’t keen on switching. At one point I was looking to hold a certain token, can’t remember what it was (probably a Sam coin), but it was only on FTX, so I signed up. I was blown away. Not just by the platform and interface, or the soft liquidations, but the whole FTX ecosystem and all things Sam. I’ve never looked back.
1% daily may sound ludicrous to the typical person but I can attest that it is definitely possible with automated crypto trading. I’ve seen even 2-5% daily, like from 2021 Jan to April. The challenge lies in creating something that works consistently in all market trends (bull, bear, sideways) and “black swan” scenarios like we saw with 2020 March in relation to Corona and crashes like May 2021.
The traditional finance guys will never get it, and perhaps one day the returns will normalize when they see the light and jump on board, but yeah, a steady low risk 3Commas bot system could get you 1% per day on average without even thinking about it. In a trending market (bull or bear) 2 to 5% is my experience as well, with the correct bot settings. During the Jan to April 2021 I was even clocking 30% plus on some days, using leverage in the 5x to 15x range. It was a no brainer, price was only going up, so no liquidations and only profits. Until of course it wasn’t going up anymore! I took some losses, but still ended up higher than where I would have been without the aggressive moves.
1. In the bot setup, you have “UPDATE_MAX_SAFETY_ORERS = 4” ; would you be able to share the %s of the deals at each level of used safety orders (e.g. 50% of all deals close at 0 SOs)?
– If it is skewed towards 0 to 1, I usually take this as a sign that the hypothesis regarding the entry point is promising.
This really varies by day and week, and I was setting this bot up during the ranging market, so I would be maxing out safety orders when moving down to the support line and hitting one or two SO’s when we were moving back up to resistance. Again, this was a number I was playing with for testing, I generally go higher to close deals faster. Typically in the 8 to 10 range. I would say though that this is not really the setting to look at for the answer you’re after. Instead I would look at how far down, percentage wise, the SO’s go. You can have 10 SO’s that cover down to 5%, or 5 SO’s that cover down to 10%, or whatever.
I think you’re trying to ask do I think the trigger is giving good entry points. Overall, yes. I could easily complete 30 to 70 deals a day in profit with only 4 or 5 bots running at a time, with none of them hitting stop losses – in a ranging market. That tells me the technique works pretty good.
Having said that, at some point a deal will start at a peak. I haven’t found a way to avoid that. All I can hope for is the SO’s are enough to get me in profit when/if the price recovers.
2. When a position does use the last safety order, are you manually adding funds?
– What criteria are you using to determine when, at what price, and how much to add (e.g. nearest support level)?
I’ve always been one to not use stop losses, mostly because that locks in a loss – and I hate losing. So I would typically cancel the deal (not market close), and then manually DCA down in FTX. I would look for the next obvious/likely support level and put in a bid at that level with at least 3 or 4 times the current position value, hoping for a bounce. I put the
FUNDS_USAGE parameter in the config.py file to hold a reserve for that purpose. I would at times still transfer in from another sub account to help out if needed.
However, I’ve found there’s quite a bit of opportunity cost to doing this. How long should you hold those red bags for when there’s other coins mooning? So I built into the script a “stop loss” of sorts. That’s the
SWITCH_PERCENT parameter. You could also crank this up to 100 and use the bot’s built in SL if you want. The bot’s is probably faster reacting, and also has the timeout feature. The idea with letting the script handle it is that it might also switch your position. So if your long deal was all SO’d out, and you hit the
SWITCH_PERCENT setting while the coin was also meeting the trigger criteria, the long position would close and you would take up a short position on the same coin.
The tricky part here is balancing the win rate with the risk reward ratio. DCA bots don’t have good risk to reward ratios by default, so you need to profit on many deals to compensate for that when you’re switching or using a SL.
– Since your SO volume and martingale volume coefficient are quite low, I imagine it means SOs aren’t being used often and your entry point is working well?
Yes and no. The SO’s are being used quite a bit here because of the low SO volume and martingale coefficient, but that’s because I’m not averaging down fast enough to profit on smaller bounces. So I end up staying with the deal longer, waiting for another/bigger bounce. The default settings in the parameters in the code is what I was testing with, but only because I was using limited funds and wasn’t able to crank those higher. I would say they are too low for most bot setups, but they will work. If you’re new to bots and the setups, these should really be higher. I will be adding a couple posts in the future that cover the settings I normally use for both trending and ranging markets. The settings here will work ok for a trending market, or a ranging market – but not optimal for either. As a starting point, go with at least a 1.2 on the martingale coefficient if you have the funds. The SO volume should be 50% to 100% higher than the base order for most cases.
3. What would you do in a situation where the bags are accumulating and you run out of funds to add manual safety orders?
Cut a bag loose, and use those funds to recover your other bags. You’ll need to decide which is bag is least likely to bounce in the short term as the one to cut. I would also zoom out on all the bags, and look at other bags and the market in general. If there’s no support close by, then I sometimes just cut them all. Remember the bots play both ways, so the time holding on to a red bag could be in profit if you played it the other way. Again, it comes down to opportunity cost and your preference, and how you like to work your settings.
4. What kind of backtesting did you do to land on your current settings?
– Would you possibly be able to share this?
For this setup I didn’t do any back testing at all. It was based on another idea I came across a while back, and also a way to automate a way I was trying to manually trade.
I have setup a few back testing scripts in TradingView, though I use them to evaluate higher level strategies. I personally don’t find TradingView back testing works well with how the bots function, mostly because the the bots run in real time, and that doesn’t seem to fit well with the back testing model. I suppose it might on the lower time frames, but then you have limited data to work with. Additionally, this particular script just polls the price “whenever”, it’s not looking at candles/OHLCV data which is how the back testing on TradingView works. I’m working on another script where I did quite a bit of back testing to see if it will work as an alternative to this script, and it looks promising. Instead of triggering deals on volatility, it will start bots that are trending. I think it will work well because you can “front load” your bot parameters for a trending market, and even play with some leverage, since you know the bot is only active in a trend. I’m hoping to find some time to work on that more soon.
5. What is your criteria for blacklisting a pair?
– I think Freqtrade has code to auto-blacklist / whitelist certain pairs based on things like volume, perhaps it could be useful?
Adding that functionality to the script would be cool, yes. It’s something I would like to add eventually, but it’s not high on my priority list – though it wouldn’t be that difficult to implement I don’t think. For now the black list is manual. I’m familiar with some perps that don’t trend or even range much, so I block those, and there’s some with super low volume, so I blacklist those as well. A few others I discover by accident. You can see them when you have a bag that’s only used one or no SO’s and has been around for a few days. I’ll have a quick look at the chart, then add it to the list if it’s not going anywhere.
6. Do you see certain pairs working better than others (closes more deals, closes faster, uses less SOs, more overall profit)?
Yes, but not consistently. I generally see one pair make a run, then it hits accumulation, while another pair is running, then it hits accumulation, and so on. That was the frustrating part when manually trying to find the next one that was going to do a 10 or 20% daily candle. I created this particular script to pick those out, so I wouldn’t have to decide which ones to exclude.
– Perhaps there is an opportunity in letting the code weigh more successful pairs more heavily by increasing their order size. Freqtrade might also have something along these lines.
That’s a good point, and as long as you have enough data points. It may be possible to pull that data from 3Commas as well. I know they show it on the bots dashboard page, but I haven’t looked into it much.
I suppose it’s a good option, though my take on it for this script was to just jump on the fastest train and jump off and on to the next fastest one and so on. So limiting to only a certain set of pairs wouldn’t fit with that thinking.
Having said that, this is exactly the kind of thing I’m looking at on the next script. On that one I’m activating bots to make and close deals continuously for a certain pair, as long as it’s trending stronger than other pairs. This approach could have some merit there. There’s also other ways of doing it without weighting the pairs, like looking at trend strength instead. My only other issue with adding that kind of weighting flexibility and modifying the order size based on it would be code complexity. I’m still in the early stages of my python experience, but maybe down the road I could manage it.
I also wanted to share with you a couple things since you have already shared a great deal.
First of all, there is a Tradingview script that I have had moderate success with, called Reversal Finder:
It identifies when there is a “bounce” in the price, after a spike up or down. It seems similar in concept to the hypothesis your python bot uses, so perhaps it will be useful to you. Sort of similar to your switch functionality. I had a bot running on SXPUSDT 15~30sec, with ~70% or so of the deals closing within minutes. My friend was able to modify the pine script code to allow for backtesting, I might able to share that soon too. Combined with DCA, it could possibly come close to being fully automated with a high % return.
Thanks for sharing that. I hope it’s ok I shared it here. If not, let me know and I’ll remove it from here and in the comment. I’ve only taken a cursory look, but it looks promising. I’ll have a deeper play with it in the next few days.
While the script I wrote is not highly modular, it’s also not too difficult to modify it to use a different trigger. Feel free to fork it and have a go if you want. You could also wait until the next script is released (when I find some time to work on it) since it uses OHLCV data from FTX for calculating the trigger, it could make it easier to build in your trigger.
Secondly, the same friend has recently launched a paid strategy called ZoneSwitch. It is more of a trend following strategy primarily for BTC or ETH, opening a long or short at 3-4x leverage depending on the trend reversal:
I don’t get anything from promoting this, just wanted to share since I believe the backtesting data is very promising.
That’s cool, I like sharing. I think it’s great to see people succeed in this space and to take an idea you’ve put so much time and energy into and get some return from it.
I hope that covers some of the questions appropriately, and hopefully if also gives some insight for the rest of the followers into some of the settings I use. In the next few posts I will be covering some bot settings I’ve found work for me in both trending and ranging markets. These can be used with the trigger script in the previous post, or your own trigger. Sign up below so you don’t miss those.
Stay up to date on all the posts and how-to’s, Subscribe!