-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
resuly
committed
Apr 15, 2018
1 parent
964f530
commit da15a1f
Showing
57 changed files
with
3,226 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
window.$docsify = { | ||
el: '#app' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# 在 ARM7 平台安装 Gunbot | ||
|
||
> 下载对应的 Gunbot XT 版本: https://github.com/GuntharDeNiro/BTCT/releases | ||
> | ||
> 像 node.js 和 pm2 这样的依赖组件已经被打包好,你无需手动安装。 | ||
> | ||
|
||
1. 解压 .zip 文件, 然后在命令行执行以下命令,确保 Gunbot 和 Gunthy GUI 都可以执行: | ||
|
||
`chmod +x gunthy-arm` | ||
|
||
`chmod +x gunthy-gui` | ||
|
||
2. 通过以下命令启动 Gunthy GUI,请保持命令窗口一直是开启状态: | ||
|
||
`./gunthy-gui` | ||
|
||
3. 在系统浏览器中输入并访问 `localhost:5000` | ||
|
||
| ||
|
||
> 你可能需要设置防火墙规则来允许 Gunbot 在5000端口的TCP进出流量,这取决于你的系统设置。 | ||
|
||
|
||
如果你不想启动图形界面,可以直接运行 Gunbot 的核心程序: | ||
|
||
`./gunthy-arm` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Using and combining Gunbot strategies | ||
|
||
Gunbot has 5 different main strategies that can be used to trade: these can be freely combined, where one strategy is being used for buying, and another for selling. Additionally, you can choose for the Emotionless or Ichimoku strategies - these cannot be combined with others. | ||
|
||
|
||
|
||
| Strategy | Description (short) | | ||
| ------------- | ---------------------------------------- | | ||
| `gain` | Buy at a percentage below EMA, sell when your set gain is reached. | | ||
| `stepgain` | Like gain, but after hitting initial buy or sell level, a trend watcher will check if prices will further decrease or increase - making sure to only buy or sell when the trend reverses . | | ||
| `bb` | Buy and sell at configurable points between the lower and upper Bollinger Bands. | | ||
| `pp` | Set a fixed buy and sell price, perfect for coins that stay withing a predictable price range. | | ||
| `tssl` | Trailing Stop / Stop Limit: a moving range for buying and selling, trailing optimal buy and sell levels. | | ||
| `emotionless` | "Just works" strategy. No configurable strategy parameters. Perfect for novice traders. | | ||
| `ichimoku` | Trading algorithm based on the Ichimoku cloud indicator. | | ||
|
||
|
||
|
||
Settings for strategies are global, and apply to all pairs that you set to run on this strategy. When you need to make changes in the strategy settings for individual pairs, you can configure this using overrides in the pair setup (more on this below). | ||
|
||
|
||
|
||
> **Contents:** | ||
> | ||
> 1. [All strategy combinations](#strategies-and-combining-them) | ||
> 2. [Using Overrides](#using-overrides) | ||
|
||
|
||
## Strategies and combining them | ||
|
||
Each combination of strategies has its own section in the config file. If you want to use a combination of settings, pick the right one and proceed to configure the relevant parameters. | ||
|
||
The following combinations can be used, each has its own section in the config file: | ||
|
||
| Strategy name | Buy strategy | Sell strategy | | ||
| --------------- | -------------------------- | -------------------------- | | ||
| `bb` | Bollinger Bands | Bollinger Bands | | ||
| `gain` | Gain | Gain | | ||
| `pp` | Pingpong | Pingpong | | ||
| `stepgain` | Stepgain | Stepgain | | ||
| `tssl` | Trailing stop / stop limit | Trailing stop / stop limit | | ||
| `emotionless` | Emotionless | Emotionless | | ||
| `ichimoku` | Ichimoku | Ichimoku | | ||
| `tsslbb` | Trailing stop / stop limit | Bollinger Bands | | ||
| `tsslpp` | Trailing stop / stop limit | Pingpong | | ||
| `tsslstepgain` | Trailing stop / stop limit | Stepgain | | ||
| `tsslgain` | Trailing stop / stop limit | Gain | | ||
| `bbrsitssl` | Bollinger Bands + RSI | Trailing stop / stop limit | | ||
| `pptssl` | Pingpong | Trailing stop / stop limit | | ||
| `stepgaintssl` | Stepgain | Trailing stop / stop limit | | ||
| `gaintssl` | Gain | Trailing stop / stop limit | | ||
| `bbtssl` | Bollinger Bands | Trailing stop / stop limit | | ||
| `bbgain` | Bollinger Bands | Gain | | ||
| `gainbb` | Gain | Bollinger Bands | | ||
| `bbstepgain` | Bollinger Bands | Stepgain | | ||
| `stepgainbb` | Stepgain | Bollinger Bands | | ||
| `bbpp` | Bollinger Bands | Pingpong | | ||
| `ppbb` | Pingpong | Bollinger Bands | | ||
| `gainstepgain` | Gain | Stepgain | | ||
| `stepgaingain` | Stepgain | Gain | | ||
| `gainpp` | Gain | Pingpong | | ||
| `ppgain` | Pingpong | Gain | | ||
| `stepgainpp` | Stepgain | Pingpong | | ||
| `ppstepgain` | Pingpong | Stepgain | | ||
|
||
|
||
|
||
|
||
|
||
## Using overrides | ||
|
||
On pair level you can define exceptions for parts of a strategy. You could for example use a higher `TRADING_LIMIT` on a pair that you see particular potential in. The following example does just that. | ||
|
||
|
||
```json | ||
"BTC-ADA": { | ||
"strategy": "stepgain", | ||
"override": { | ||
"TRADING_LIMIT": 9000.00, | ||
}, | ||
``` | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Advanced Gunbot usage | ||
|
||
Thanks to community feedback, Gunbot is extendable with tools from many third party devs. | ||
|
||
Such tools will usually either interact with Gunbot over websockets, or by providing a config.js for Gunbot to load. When config.js is being overwritten, Gunbot will automatically pick up the changes, without restarting Gunbot manually. | ||
|
||
You can also run multiple instances of Gunbot on the same machine. Automation of running Gunbot instances can be done with pm2. | ||
|
||
Check the growing list of community resources for Gunbot | ||
|
||
|
||
|
||
## Load external config.js | ||
|
||
You can load config.js from an external location by starting Gunbot manually, and set the external location in an extra parameter. | ||
|
||
Example: | ||
|
||
> ./gunthy-linx64 -config=https://gunthy.org/config.js | ||
|
||
|
||
## Change the port of Gunthy GUI | ||
|
||
By default Gunthy GUI works on port 5000, but you can change this to whatever port you want, by opening command prompt in your Gunbot folder and following these steps: | ||
|
||
|
||
|
||
**Windows:** | ||
|
||
> set PORT=9000 | ||
> | ||
> gunthy-gui.exe | ||
|
||
|
||
**Linux:** | ||
|
||
> PORT=9000 ./gunthy-gui-linx64 | ||
|
||
|
||
**Mac:** | ||
|
||
> PORT=9000 ./gunthy-gui-mac | ||
|
||
|
||
**ARM:** | ||
|
||
> PORT=9000 ./gunthy-gui-arm | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# How to become a reseller? | ||
|
||
If you want to be placed on the resellers list or your name is missing, please post in [this thread](https://gunthy.org/forum/index.php/topic,1241.0.html) or PM [Cat](https://gunthy.org/forum/index.php?action=profile;u=60) in the following format: | ||
|
||
``` | ||
Gunthy Username: | ||
Discount Code: | ||
Direct purchase (Y/N): | ||
Telegram: | ||
Thread/Website (et. al.): | ||
Languages: | ||
Other: | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Bollinger Bands (bb) | ||
|
||
>[Info on Bollinger Bands](https://en.wikipedia.org/wiki/Bollinger_Bands) | ||
Bollinger Bands indicate relative high and low prices, using this information you can buy relatively low and sell relatively high. With this strategy you can configure at which percentage from the lower Bollinger Band Gunbot should buy, and at which percentage from the upper Bollinger Band a sell order should be placed. Bollinger Bands are referred to as `bb` in the config.js file. | ||
|
||
You can optionally use RSI as confirmation to only buy or sell when both a certain point on the Bollinger Bands and a specific RSI level is reached. | ||
|
||
This strategy is often combined with Stepgain, with bb as the buying strategy, then selling with stepgain. | ||
|
||
|
||
|
||
> The formula for the Bollinger Bands as calculated by Gunbot is: | ||
> Middle Band = SMAPERIOD simple moving average (SMA) | ||
> Upper Band = Middle Band + (SMAPERIOD standard deviation of price x STDV) | ||
> Lower Band = Middle Band - (SMAPERIOD standard deviation of price x STDV) | ||
|
||
|
||
|
||
>[BB tuner (thanks @allanster!)](https://gunthy.org/forum/index.php/topic,1788.0.html) | ||
|
||
|
||
|
||
## Relevant indicators | ||
|
||
![bb-strategy-detail](https://user-images.githubusercontent.com/2372008/31969233-2cebf586-b914-11e7-98a0-49471b29051a.png) | ||
|
||
|
||
|
||
## Relevant settings | ||
|
||
Following settings options are available for `bb` | ||
|
||
|
||
|
||
| Parameter | Default value | Description | | ||
| -------------------- | ------------- | ---------------------------------------- | | ||
| `TRADING_LIMIT` | 0.001 | *Values: numerical – represent an amount in primary trading currency.* This value defines the trading limit for buy orders placed by Gunbot. The default value of 0.001 would place maximum orders of 0.001 BTC when used on a BTC_x pair. Only use whole numbers for fiat pairs. | | ||
| `FUNDS_RESERVE` | 0.001 | *Values: numerical – represent an amount in primary trading currency.* Sets an amount of base currency that will not be traded with. For a BTC_x pair, funds in BTC would be reserved, for an ETH_x pair the bot will keep the amount in ETH reserved, etc. It is recommended to use the same value for all pairs you run in this base currency. | | ||
| `PERIOD` | 15 | *Values: 1 / 5 / 15 / 30 / 60* – represents candlestick size in minutes. Only use periods that are available on the charts on your exchange. | | ||
| `BUY_LEVEL` | 0.6 | *Values: numerical – represent a percentage.* This setting can be used as protection against buying above EMA. The default value of 0.1% will prevent the bot from buying when the price is not at least 0.1 % under the lowest EMA. | | ||
| `GAIN` | 0.6 | *Values: numerical – represents a percentage.* Used as a safety setting, defining the minimum gain of all your trades. | | ||
| `EMA1` | 16 | *Values: numerical – represents an amount of candlesticks.* Set this to the amount of candlesticks you want to use for your long EMA calculation. The closing price for each candle is used in the EMA calculation. For example: when you set PERIOD to 5, and want to have 2h for long EMA – you need to set EMA1 to 24 (24 * 5 mins). | | ||
| `EMA2` | 8 | *Values: numerical – represents an amount of candlesticks.* Set this to the amount of candlesticks you want to use for your short EMA calculation. The closing price for each candle is used in the EMA calculation. For example: when you set PERIOD to 5, and want to have 1h for short EMA – you need to set EMA2 to 12 (12 * 5 mins). | | ||
| `HIGH_BB` | 45 | *Values: numerical – represents a percentage.* Relevant: when bb is used as selling strategy & when DOUBLE_UP is activated. This sets the target for selling with bb as selling strategy. The bot will sell when the price hits a point x% from HIGH_BB. | | ||
| `LOW_BB` | 45 | *Values: numerical – represents a percentage.* Relevant: only when bb is used as buying strategy. This sets the target for buying with bb as buying strategy. The bot will buy when the price hits a point x% from LOW_BB. | | ||
| `STDV` | 2 | *Values: numerical (recommended: between 1.9 and 2.1)* – represents a multiplier value used in the bollinger bands calculation. Relevant: when using bb as buying or selling strategy & when DOUBLE_UP is activated. This value defines the multiplier used for calculation of the lower and upper bollinger bands. | | ||
| `SMAPERIOD` | 50 | *Values: numerical – represents a number of candlesticks.* This parameter defines the amount of periods to be used for the simple moving average calculation. Set this value to the value used to chart on the exchange. If you want to use SMA 50 on the exchange charts, set this value to 50. | | ||
| `PANIC_SELL` | false | *Values: true or false.* When set to true, all coins will be sold at market value. This can incur losses! | | ||
| `DOUBLE_UP` | false | *Values: true or false.* When set to true, DOUBLE_UP will try to get rid of bags by averaging down. Works on all strategies. Averaging down can use up a lot of balance, make sure you have enough of your base currency available. Gunbot will start averaging down a bag according to your setting for `DU_METHOD`. | | ||
| `DU_METHOD` | HIGHBB | *Values: HIGHBB or RSI*. This sets the trigger for placing buy orders with Double Up. When set to **HIGH_BB** Gunbot will start averaging down a bag when the actual upper Bollinger Band drops below bought price (not the distance from it as set in `HIGH_BB`), and will then buy again when the upper Bollinger Band drops below the average buy price and the price is below last buy price, as set in `DU_BUYDOWN`. When set to **RSI** buy orders will only be placed when the set `RSI_BUY_LEVEL` is reached and the price is below last buy price, as set in `DU_BUYDOWN`. | | ||
| `DOUBLE_UP_CAP` | 1 | *Values: numerical - represents a ratio.* This defines the ratio to the pairs balance to be used for each consecutive buy when doubling up. Setting it to 0.5 would mean it uses a 0.5:1 ratio for averaging down. It is recommended to set this as high as you can afford, to increase your chance to actually average down and sell at profit. Example with ratio of 1: initial buy of 100 LTC, first double up buy order is 100 LTC, second will be 200 LTC, then 400 LTC, etc. Example with 0.5 ratio: initial buy of 100 LTC, first double up buy order is 50 LTC, then 75 LTC, then 112.5 LTC. | | ||
| `DU_CAP_COUNT` | 3 | *Values: numerical - represents a number.* Limits the amount of times a Double Up order can be placed for a pair. The default setting of 1 would limit Double Up to only 1 buy before it waits to sell. When you set this higher, the bot will invest more and will get a lower average bought price to get rid of your bags faster. | | ||
| `DU_BUYDOWN` | 2 | *Values: numerical, ranging between 0 and 100 - represents a percentage.* The minimum price drop compared to last bought price that needs to occur for Double Up buys to be placed. | | ||
| `STOP_LIMIT` | 60 | *Values: numerical – represents a percentage.* Sets a stop limit to sell a coin at a calculated loss. Setting a stop limit at 60 would cause that all balance for a coin are sold when the current price is >60% lower than bought price. After a stop limit sell order has been placed, the bot will go into buying mode after `TRADES_TIMEOUT` has passed and will buy again when market conditions meet your buying strategy. | | ||
| `BUY_ENABLED` | true | *Values: true or false.* Set this to false to prevent Gunbot from placing buy orders. | | ||
| `SELL_ENABLED` | true | *Values: true or false.* Set this to false to accumulate altcoins. Use `TRADES_TIMEOUT` to prevent fast consecutive buy orders. | | ||
| `RSI_BUY_ENABLED` | false | *Values: true or false.* Setting this to true will make sure Gunbot only buys when both strategy buying conditions and `RSI_BUY_LEVEL` are met. | | ||
| `RSI_SELL_ENABLED` | false | *Values: true or false.* Setting this to true will make sure Gunbot only sells when both strategy selling conditions and `RSI_SELL_LEVEL` are met. | | ||
| `RSI_BUY_LEVEL` | 30 | *Values: numerical, ranging between 0 and 100.* Set the RSI to the level you want to allow the strategy to buy at. Additionally used as RSI level for Double Up buy orders. | | ||
| `RSI_SELL_LEVEL` | 70 | *Values: numerical, ranging between 0 and 100.* Set the RSI to the level you want to allow the strategy to sell at. Only acts as an added confirmation. | | ||
| `MIN_VOLUME_TO_BUY` | 0.001 | *Values: numerical – represents the total value of a coins holdings in base currency.* Sets a threshold for buy orders. If you own less than the set amount, buy orders will still be placed. This prevents owning very small quantities (dust) blocking buy orders. Only use whole numbers for fiat pairs. | | ||
| `MIN_VOLUME_TO_SELL` | 0.001 | *Values: numerical – represents the total value of a coins holdings in market currency.* Sets a threshold for sell orders. If you own less than the set amount, sell orders will not be placed and the bot goes into buying mode again. Only use whole numbers for fiat pairs. | | ||
| `TRADES_TIMEOUT` | 600 | *Values: numerical – represent time in seconds.* This sets a timeout preventing any trades to be placed for a pair after the last order and after starting the bot. Use this to prevent double buys or fast consecutive buy orders when averaging down. Affects buy and sell orders. When the timeout is active you will see `Waiting to Trade - Safety Switch is on` in the logs. | | ||
| `OKKIES_MODE` | true | *Values: true or false.* Setting this to true disables buy orders when there is too much price and volume pressure on BTC. Configurable with `BTC_MONEY_FLOW`. Only use this if BTC pumps have a significant effect on your trading pair. | | ||
| `BTC_MONEY_FLOW` | 35 | *Values: numerical, ranging between 0 and 100.* Sets the value on the Money Flow Index (MFI) you want `OKKIES_MODE` to disable buy orders. As soon as MFI hits the set value or drops below it, `OKKIES_MODE` will be enabled. | | ||
| `TA_ALWAYS_ON` | false | *Values: true or false.* When set to true, all indicators are updated each cycle. When set to false, indicators will get updated once every period. Only set this to true if you have unmetered data available. | | ||
| `RSI_DU_BUY ` | 30 | *Values: numerical, ranging between 0 and 100.* Use this to specify the RSI level for buying when `DU_METHOD` is set to RSI. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Candlestick period | ||
|
||
>[Info on candlestick patterns](https://en.wikipedia.org/wiki/Candlestick_pattern) | ||
The `PERIOD` you set for candlesticks in your strategy is very important, since it has a big effect on how `EMA1` and `EMA2` are calculated. This article provides a really quick overview of what the impact of `PERIOD` is. | ||
|
||
A single candlestick is a visualization of the opening, closing, high and low prices within a certain timeframe. The most common used values for this timeframe (`PERIOD`) are 5 minutes, 15 minutes and 30 minutes. The closing price of each candlestick is used for calculating `EMA1` and `EMA2`. | ||
|
||
Using shorter candlesticks results in more price movement around EMA, this can be great for trading, but also be risky because you are fixated on short term trends only. | ||
|
||
In the image below, you can see the effect on EMA (the green and red lines) when using different candlestick sizes, while keeping other variables the same. | ||
|
||
![ema](https://user-images.githubusercontent.com/2372008/32069470-900b0cd0-ba89-11e7-93f1-fbdfa80b3001.png) | ||
|
||
> tl;dr: Set `PERIOD` low to trade on short trends, set it higher to trade on longer trends. | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.