Gunbot V22 Stable Release Presents the Brand New Open-code Feature: Custom Strategies JS.
Gunbot V22 Custom Strategies
The strategy code has access to a single outside object called “gb,” which contains several trading methods and plenty of data to work with
There are virtually no restrictions to what you can do with the provided trading methods, aside from the exchange-specific restrictions like API rate limits, open orders limits, and so on…
Warning: Custom code can be hazardous, and there are no protections against double orders or any other unwanted behavior. Since You can use external modules, be extremely careful when running a strategy code. You did not write yourself because a malicious actor can gain access to your whole system.
How to create and run a Gunbot custom strategy in 5 easy steps.
Step 1 create a new custom strategy, name it as you like, and use “custom” as the BUY and SELL method.
Step 2 specify the filename with your strategy logic and place that file in your Gunbot folder (where your .exe file is located).
Step 3 head over to the Data tab, where you control how the indicator data is generated. You can access these indicators in your strategy, and there’s no limit to using these indicators.
Step 4 assign your customized strategy to a trading pair/s as you would normally do with any other regular Gunbot strategy.
Step 5 fire the bot! Hit the “Start Trading” button, keep calm, and Gunbot.
Gunbot comes loaded with hundreds of configurable strategy options, and you can use these options for first-class trading strategies. Still, if pre-made strategies are not your thing, now you can let your genius go and fine-tune your bot with your own custom-made trading strategy. You can use these options.
The Gunbot V22 Stable Edition has been released, and This Beast is Unleashed
Here’s How to Setup Gunbot V22 from scratch Step by Step guide
In this guide, I will assume that you already have your Gunthy Wallet address and you already set up your desired exchange API Keys as needed.
Gunbot V22 Setup – Where to Download the Gunbot Trading Software
You can download the latest stable release from the Gunthar Repo on Github.
For Windows users, download the zip file and unzip it to your desired location. Make sure it contains the following files and folders inside.
Here is a screenshot of the Gunbot folder after downloaded and unzipped
- Backups Folder with config and logs folders (here is where Gunbot saves your config backup files)
- CS folder with tables, fonts, and icons, nothing for us there.
- GUI folder, same here, just dev-related stuff.
- Here, the JSON folder lets you find your JSON state file with some important info sometimes needed to find bugs.
- Logs folder, here goes the autoconfig logs
- Node Modules folder, canvas, technical indicators, again irrelevant to most of us
- Tulind folder, same here no need to touch anything inside
- Autoconfig JSON file, this is where your autoconfig jobs go, either if you write them on your own or if you download a strategy with autoconfig setup, replace this file with the one you’ll get.
- Config file, this file contains all your Gunbot info, from the pair, selected, strategy, and exchange… everything needed to run the bot is written here.
- Config-js Example file, just an example file, you can delete or keep if you need a reference.
- Conversion JSON file, do not touch, no need.
- GunbotGUI file, this is your Gunbot GUI database file, where your GUI password is stored. You can delete it from time to time if it gets too big, and no big change will occur; all you have to do after that is to set a new password.
- Gunthy-Win Exe file, this is the executable file you need to keep running to access the GUI through the browser and is where you see the Gubot grid running, AKA the Gunbot Core contains all the magic.
- New GUI SQLite file, no need to touch
- TG Config JSON file, here is where your Telegram bot info is stored
- UTA Config JSON file, this file contains all the indicators from the Tulip library. UTA is also known as the Ultimate Trading Analysis
If you’re a Windows user, all you have to do now is double-click the Gunthy-Win.exe file or right-click open to fire Gunbot core.
You will see the console’s localhost port set to default at Localhost:5000, now open your browser and look it up.
Bear in mind this guide is for a Windows Operating System Computer; every step explained in this guide is intended for a regular home pc user.
There you will see the Gunbot V22 main page asking you to set up your password; after that, you will be redirected to the Easy Edit Wizard, a straightforward way to help you set up your spot strategy in no time.
Gunbot V22 Easy Setup Wizard
Step 1, select your exchange and click next.
Step 2, fill your exchange API keys information, passphrase if is required by your exchange, make sure to add the trading fees that your chosen exchange charge per trade, and finally add your Gunthy Wallet address (the same you registered as your Gunbot License)
After that, hit the next, review that everything is correct, and save.
Easy right? Now your exchange info is added and saved to your config file.
At this point, you can secure your bot even more by adding Two-factor Authentication (2FA), but more on that and a How to Secure Gunbot Video later; keep reading…
Gunbot V22 Trading Strategy Configuration
How to Choose and Setup a strategy in Gunbot
First, you have to click on the Strategies tab, and you’ll see that Gunbot comes with 19 pre-configured strategies, ready to use.
Please note that Gunbot strategies are set by default to “Buy” and “Sell” using the same method.
You can use it like that or change it to your liking.
For example, you can buy with “stepgain” and sell with “bb,” there are 2 ready-made strategies that approach the “bbta-tssl” strategy and the “gain-stochrsicross.”
For this guide, let’s select the “gain strategy” click on the name because you can also clone it, and if you click on the x, it will delete the strategy.
So, click on “Gain” and scroll down to start editing some values.
Gunbot V22 Strategy Parameters and Setup Explained
Gunbot V22 Gain Strategy BUY Setup
The first tab you see is the “BUY” setup; let’s tell Gunbot when we want to buy.
In this strategy, we do that by selecting a buy level, expressing the percentage you would like to buy based on the lowest Exponential Moving Average (EMA) according to your set values.
This example 1 means “BUY” when the price is 1% lower than the lowest EMA.
Additionally, you can use the “take buy” option, which is similar to the trailing strategy, and it will trail the entry price once conditions are met based on the “Take Buy Range,” a percentage as well.
Gunbot V22 Strategy SELL Setup
You will set a percentage of gain you want to makeover your entry price on the sell tab. In this example, 1 will be equal to a 1% gain after trading fees.
The take profit option is to close at break-even, but if you choose “Take Profit Only,” the bot will trail the selling price based on the value you add in the “Take Profit Range” section. In the example, 0.5% is set by default.
Alternatively, you can set Double Check Gain. This parameter is handy in strategies that don’t offer gain protection or buy and sell multiple times, such as the MACD strategy.
Gunbot V22 Strategy BALANCE Setup
Here you set your “Trading Limit,” the value here represents how much of your total balance in the Base coin you want to use for each trade.
Alternatively, you can set a percentage or use your whole capital by choosing “all-in” (not recommended in most cases)
Note that the defaults in Gunbot are set in BTC, you will need to set to a round number for USDT if you use it as a Base coin, so instead of 0.002, which is meant for BTC, you will set 25 for example, if you choose USDT or any fiat coin as your base currency.
Minimum Volume to Buy and Sell will be the same 0.001 if BTC and 10 for USDT, but you need to make sure you “follow the exchange minimum trading rules” when you set up this number respecting their rules.
Funds reserve is what you don’t want to use for trading; for example, you could have $2000 as your total capital, but you want to trade with $1000, in that case, you add $1000 in your “Funds Reserve” box so the bot won’t touch it.
Keep quote if you want to hold the Quote coin; this would be useful, for example, if you use Binance Coin (BNB) or Kucoin (KCS) and want to keep a balance untouched and use it to pay for the trading fees.
You could also “Keep Quote” of BTC since Bitcoin is always Quote vs. USDT and vs. fiat currencies in most cases.
Gunbot V22 Strategy Indicators Setup
Do you want to add confirming indicators to your Gunbot strategy?
Here’s How to set the details and add confirming indicators to your strategies
But first, let’s set the Time Frame (period) you want to trade at; make sure your exchange supports your chosen period and adjust the EMA and Candles values accordingly.
After that, you can add extra confirming indicators to your strategy like ADX, MFI, RSI, and so on. Just remember that Gunbot uses the “AND” principle and not “IF.”
So basically, you will be telling Gunbot to sell or buy when the main strategy parameters are met “AND” RSI values, “AND” ADX values, “AND” MFI values, and so on, do you understand?
All these conditions have to take place in the same cycle.
Gunbot V22 Dollar-Cost Average Setup
How to setup Dollar-cost average (DCA) AKA Double up in Gunbot
First, you enable “Double Up” to use this feature, then you can set the DU cap, meaning the amount on the Base coin you want to use to average down the bought price.
In this case, 1 means the same amount you have in a 1:1 ratio; the “Cap Count” indicates how many times you would like to double up; keep in mind that next time it will be again 1:1 of your base capital at that point.
As the “DU Method,” you can use RSI, High BB, or a percentage lower than your last bought price, and in “DU buydown,” you will set a percentage of how low you want to start averaging down.
My personal preference as DU method is “a percentage,” then I use the same percentage as “DU buydown,” so in that case, my DU fires once a percentage lower than my buy prices are met, instead of waiting for an RSI of HIHGBB signal.
Gunbot V22 Reversal Trading Setup
The Gunbot Reversal Trading (RT) is a Risk Management Strategy instrumental in down-trends.
Here you can activate and set the values you want to use for this method; all numbers indicate a percentage you want to buy or sell your quote coins to accumulate first and profit as soon as the market reverses without adding more base coins to those transactions.
Read more about using Reversal Trading as a Risk Management Method, and every parameter setup is explained.
Gunbot V22 Trail-Me Setup
Trailing your entry and exit prices is like the holy grail of crypto trading bot users!
Who doesn’t want to buy lower on a dip or sell higher than your set gain on a pump?
This is exactly what you can achieve with the trail me feature in Gunbot; you basically set a percentage for the bot to “trail” and can be done for your strategy Buy and/or Sell, RT Buy and/or Sell, DCA Buy, and/or Sell.
It’s amazing! Obviously, you don’t want to go crazy with it and use it for all those conditions, but if you use it wisely, you will feel satisfied once you ride a pump and sell at the very top.
Note: Trail me is not intended to use for the Emotionless Strategy, and it wouldn’t make sense to use it for the TSSL Strategy, which is based on trailing as buy and sell methods.
For any other Gunbot strategy, remember, the trailing will start after the main strategy parameters are met.
Gunbot V22 Margin Setup, these parameters are valid only for Margin and Futures Trading and can only be used in exchanges that support those trading choices like BitMex, Kraken Futures. Binance Futures, FXT, and similar…
I will explain that in another article; for now, I’m just covering Gunbot Spot Trading Strategies.
Gunbot V22 Miscellaneous Setup
In this section, you can take advantage of the Stop Loss method if you want to use it as your Risk Management Strategy.
The “Stop Limit” box is where you set a percentage you want to sell at a loss below your break-even price. If you don’t want to use this method is recommended that you set a very high number here; by default is set to 9999, so you won’t incur losses unless you manually set that up.
If you choose to cut your losses, you can also disable the buy option in your strategy by activating the “SL Disable Buy” option; you can also set several sales after which the bot won’t sell anymore.
This feature can be useful for testing, where you can set Stop Loss after that don’t buy anymore and/or sell once and don’t sell any more after that either.
The Stop Loss action is performed by placing a Limit order at your desired percentage below your break-even price.
But you can use the “Panic Sell” button to place a Market Order instead; this can be helpful in a big dump where your order can be placed and not filled if placed as limited; instead, Gunbot will execute a market order immediately.
All other settings are relevant only for Margin and Futures trading. Still, I want to highlight the “Ignore Trades Before” feature, where you tell Gunbot not to consider any trades before the set time, which you will add using a tool like Current Millis that convert our regular time to milliseconds.
And that is the last thing you need to set up your Gunbot Strategy; keep in mind that most settings use a default value, and you need to change some values to adapt to the market situation and your trading style.
Please Do Not use any setting explained here as this article is just meant to show you all the available options.
This guide is for you to understand the different parameters of a theoretical Gunbot strategy. Not a strategy for you to use; if that is what you need, please go to our Gunthy Marketplace and download one already made.
Ok with that out of the way, let’s dive into Pair Selection.
Gunbot V22 How to Add new Pairs
Go to the “pairs” tab and click on it to get into the setup module; here, choose the exchange, type the pair, assign a strat to it(the one you just set up), then click on Add and scroll down to see it added.
Click on the pair name and make sure it is “Enabled” and it has the correct strategy assigned to it, the one you just setup, or you can use any other strat you would like to use (provided is already set and ready to go)
If you add more than one pair or you want to add the same pairs to another exchange, you can take advantage of the “Copy Settings to Target Pair” Feature.
Just below that, you will find the “Override Settings” feature; this is a beneficial perk that you can use to literally override any setting from the main strategy and use it on a particular pair.
Anything you add here will be the action that Gunbot will execute.
And that’s all there is to it; after that, save, and you’re ready to hit the button to “Start Trading.”
I truly hope this guide helps you to gain a better understanding of how Gunbot works, which without a doubt is The Ultimate Trading bot Platform in the Market Today.
Take advantage of Gunbot’s pre-built and simple trading strategies with basic order execution methods if you’re a new trader or customize a very complex and dynamic one if you’re a seasoned trader.
In any case, Gunbot V22 allows for every personal trading style, and you can deploy across one or more cryptocurrency exchanges around the world.
Now that Gunbot V22 Stable Version has been Released, Come Along Get the Crypto Trading Bot Now, and Take Your Automated Trading Game to the Next Level!
Gunbot Spot Grid Strategy
As you may know, @boekenbox (Pim) always provides more value to our community, and he just did it again.
Enter the Gunbot Spot-Grid Native Strategy. Yes, Gunbot has a new strategy Included by default!
You can now run the popular “spot grid” strategy without using autoconfig at all.
The strategy is slightly improved on the following points:
- It no longer rebuys instantly after selling. Instead, it does buy trailing directly after selling: if the price drops, the rebuy usually happens lower than the last sell. If the price goes up further, it will rebuy slightly above the last sell rate.
- You can easily set the max number of allowed buy orders.
- It has an option not to buy again after the next sell order.
- Simplified usage: trailing ranges and DCA levels are hardcoded. If you want to tune DCA levels, you can use the “grid multiplier” option.
To use it, go to the advanced strategy editor and create a new strategy with “spotGrid” as buying and selling method. Only the visible options have any effect on trades.
The default settings are 1:1, the same as the Gunthy Marketplace setup; just set your trading limit and make sure min volume to sell is set correctly.
This strategy uses market orders only.
There is no DU at all in this strategy, just the options you have in the strategy editor for spotGrid.
Here are Pim’s Spot Grid Strategy default values:
Gunbot Spot-Grid Strategy Setup in 3 Simple Steps
Step 1: Create a New Strategy using the default spotGrid strategy as Buy and Sell Methods.
Step 2: Go to the “Basic” tab in your Gunbot GUI and set the values as you see on the image or use your own.
Step 3: Go to the “Advanced” tab in your Gunbot GUI and set the values as you see on the image or use your own.
After that, just hit the “Start Trading button and Profit!
The SpotGrid strategy respects the “Watch Mode” parameter; you can set it to true in the GUI or the “bot” section of your congih.js file.
The Buy and Sell options are also respected if you enable them on the pair overrides.
Dollar-Cost Average (DCA) levels distance is equal to 2x the trading fees.
The “Auto Gain” (AUTO_GAIN: true) option is enabled by default in the strategy; this will set a dynamic gain target, which will decrease when your position size increases.
Overrides are only needed if you want any pair-specific changes to individual strategy parameters.
All orders will trail, then, after selling, rebuys at a slightly higher rate or trails down if possible, but it will always be back in a position quickly.
Gunbot SpotGrid Advanced Strategy
This is yet another strategy implemented and added to the Gunbot GUI by Pim.
How to create the spotGridAdvanced in the GUI strategy editor.
To create a spotGridAdvanced strategy, click on the “Strategies” tab on the GUI and it will prompt the “Create New Trading Strategy” window, name it and look for the “spotGridAdvanced” name on the dropdown menu, then use it as Buy and Sell methods, hit create after that.
The SpotGridAdvanced strategy works exactly like the spotGrid strategy, but it has these 2 main changes.
- The trailing range is configurable with a multiplier setting similar to how “grid multiplier” works.
- The Spot Grid Advanced strategy has a mode for “continuous trading,” which allows for profitable trading phases even when a bag is below your break-even price.
Here is the “continuous trading” logic explained
Imagine you are “bagged,” meaning your strategy bought (average-down) five times in a row, but still, your break-even is unreachable for now because the prices keep going down…
Normally, we would wait until the price goes back up and we can “get out,” or for prices to drop more so, we can DCA (Dollar-Cost Average) more…
Here is when the continuous trading feature kicks in!
Example of the SpotGridAdvanced strategies working normally and with the “continuous trading” formula at work so that you can see the difference.
After your configured number of buy orders, Gunbot will set the sell target above the last buy rate.
Once the price hits that target, it will sell a part of your bag at that rate, which is a guaranteed gain compared to the last buy rate.
- If the price drops again, the strategy buys again, and the next sell target will be based on this newer buy order rate.
- If, after the sell order, the new price rises considerably, the strategy will place another buy order in roughly the same size as the last sell order.
In both cases, the SpotGrid Advanced Strategy will continue with regular grid DCA orders if the price drops further.
Continuous trading orders are made with a smaller size than your regular trading limit to balance active trading and possible negative effects on the overall position’s break-even price.
Note: For the “continuous trading” to work, you must set your “Trading Limit” amount at least 2 times greater than the minimum order size set by your exchange trading rules.
Here’s an example of the SpotGridAdvanced Strategy at work
Some other additions to the SpotGrid Advanced strategy so far are…
The TL Multiplier can use it to increase or decrease the invested amount with each consecutive buy order.
Example with trading limit 100 USDT and max buy count 3
1: each buy order is for 100 USDT
1.5: first buy 100, second buy 150, third buy 225
2: first buy 100, second buy 200, third buy 400.’
Sets the ratio between the last buy order to invest in base-coin and the amount used for trades during continuous trading—a value between 0 and 1.
When set to 0.5, halve of the previous DCA trade’s base amount will be used for continuous trading. Setting 1 would use the same amount as the last DCA buy order.
It is strongly recommended to only change trading limit multiplier settings when in no position. (and be cautious with it in general, as it can burn through funds very fast)
The current “buy count” derives from the current position size (your current quote balance), your settings for Trading Limit, Trading Limit Multiplier, and Keep Quote.
Changing any of those while in a position will affect the count.
Your buy count value will determine the distance between your DCA orders; the bigger it is, the bigger the DCA distance will be.
Here is an example of the Advanced default values for the spotGridAdvanced strategy:
The Gunbot SpotGrid Advanced Strategy is still being tested, and it will always get better but now is available to you once you download the Gunbot v22 Stable Release.
If your SpotGridAdvanced strategy is selling your full position after “continuous trading,” but those “sell” prices seem wrong to you…
This could be due to having a trading history that has gone through long periods without selling a complete position.
Here’s what you can do to fix that for your Spot-Grid Advanced Strategy:
- Stop the bot entirely, close the Gunbot core console and your browser.
- Delete the JSON folder; this is fine, but you can rename it if you want to be safer.
- Set “IGNORE_TRADES_BEFORE” at an earlier time, right after your last complete sell order (regardless if it was profitable or not)
Note: Make sure you add the UNIX values (in your ITB), use the current time in milliseconds tool from https://currentmillis.com/
Here are some additions Pim has implemented as the strategy keeps developing:
A new parameter to control how far above the last sell rate Continuous Trading (CT) should place another buy order…
“CT_RESTART_MULTIPLIER“: This parameter sets the distance between a CT “SELL” and the following “BUY” above Sell price.
The CT Restart Multiplier value is set at “1” as default and recommended to leave it as it is.
This setting tells Gunbot to set the Buy target above the last sell rate once the price is at 1x the distance between the support and resistance lines above the last sell.
Setting the value to 0.5 will set it at 0.5x.
Please Note: These values are “Not Percentage.”
New additions to the Spot Grid Advanced Strategy
“TREND_OPEN“: If you set it to “true,” this setting will only allow opening a new position when the trend is bullish (according to the 15minutes and 4hour time frames readings)
“TREND_BLOCK_DCA“: If you set it to “true,” this setting will allow DCA orders allowed if the trend is not bullish (according to the 15minutes and 4hour time frames readings)
“TREND_LOWER_DCA“: If you set it to “true,” this setting will double the DCA distance when if the trend not bullish (according to the 15minutes and 4hour time frames readings)
The Trend is monitored using various EMAs and indicators on both the 4h and 15m charts, using candle close data.
Note: The strategy itself does not need to run on either of these chart periods.
You can take advantage of the Spot Grid Strategy Fully Automated for Free to Gunbot Owners by Pim @boekenbox in the Gunthy Marketplace.
Spot Grid Advanced Strategy Update
Two new settings added to the strategy to control the DCA (Dollar-cost Average) distances when the TREND_LOWER_DCA is used, and the trend is not bullish: TREND_GRID_MULTIPLIER and TREND_CT_MULTIPLIER.
TREND_CT_MULTIPLIER: This multiplier will adjust the CT buy target while the trend is not bullish and the TREND_LOWER_DCA is used. A value of 2 will double the distance, and a value of 1 will give you the same result as when the TREND_LOWER_DCA is disabled.
TREND_GRID_MULTIPLIER: This Multiplier will adjust the next DCA target while the trend is not bullish and the TREND_LOWER_DCA parameter is used. A value of 2 will double the distance, and a value of 1 will give you the same result as when the TREND_LOWER_DCA is disabled.
Stay tuned because this strategy will get more options for you to customize its trading behavior soon…
Final Note: This is Not Trading Advice. You can use the Gunbot Spot Grid and the SpotGrid Advanced strategies with the given values or fine-tune it to your liking.