The Crypto Bot



Gunbot installationUnpack the release .zip file.2a. When you’re not planning to use the WebGUI, prepare the config.js file with your bot settings, exchange api keys, strategies and pairs (detailed info below).2b. When you’re planning to use the WebGUI, proceed reading here below.Start the Gunbot executable.Windows: double click gunthy.exeLinux/ARM/Mac: make sure Gunbot is executable, run chmod +x gunthy-linx64 start Gunbot with ./gunthy-linx64WebGUI installation (optional)First, make sure you have a recent version of Node.js installed. ()In a command prompt, go to the folder where you unzipped Gunbot. Run the following command: npm installStart the WebGUI with this command: node app.jsConnect to your WebGUI by opening you have trouble connecting to the WebGUI, make sure that your local firewall accepts incoming and outgoing traffic on port 3000. If you have set an external IP or hostname in the config file, and are seeing empty values or “??” in the WebGUI, then visit and add the browser exception to the security alert you will be notified about. Then retry connecting to the WebGUI.Setting up the configuration fileAll Gunbot settings are done in a single file names “config.js”. This is where you set up your exchange API keys, add pairs and define your strategies. When the config file is overwritten while Gunbot is running, the changed settings will be loaded automatically. In the next sections all parameters are explained. Make sure that no parameters are removed when setting it up. Make sure the JSON-Formatting stays intact. Test for syntax errors on (remove API key before testing).Client settingsThese settings are used to setup the port number and hostname to be used for the WebGUI. "port": 3000,You can change the port for the WebGUI here. "hostname": "127.0.0.1"The IP address or hostname to be used for the WebGUI. Defaults to your localhost. An external IP can also be set.WebSockets settings (ws)These settings are used to setup the port number and hostname for WebSockets. "port": 3000,You can change the port for WebSockets here. "hostname": "127.0.0.1"The IP address or hostname to be used for WebSockets. Defaults to your localhost. An external IP can also be set.Bot settings"debug": false, Values: true or falseUsed to show debug messages in the bot, when set to true."period_storage_ticker": 2000, Values: numerical - represent a numberThis parameter defines how many of the received prices from the exchange are being kept in the array for calculating other indicators. It is critical that you don’t set this value too low, otherwise you don’t have enough values for functions like the trend watcher or local EMA calculation. A new price gets added to this array every time the tickers are updated, or every time a new cycle starts faster than the set time for "interval_ticker_update" – the latter only happens if you run very little pairs in your bot."interval_ticker_update": 25000, Values: numerical – represents time in millisecondsThis parameter defines after how many milliseconds new prices are being pulled from the exchange for each pair (default value of 25000 = 25 seconds). This value is related to "period_storage_ticker”, since it defines how often new prices are being added to the array. "timeout_buy": 60000, Values: numerical – represent time in millisecondsThis is an internal timeout that prevents the bot from buying again within the set amount of milliseconds after a buy order has been placed."timeout_sell": 60000, Values: numerical – represent time in millisecondsThis is an internal timeout that prevents the bot from selling again within the set amount of milliseconds after a sell order has been placed."WATCH_MODE": false, Values: true or falseWhen set to true, Gunbot will process the configured pairs, but will not place actual buy or sell orders. Good for testing."VERBOSE": true, Values: true or falseSetting this to true will lead to more detailed information being shown in the console. "BOT_DELAY": 1Values: numerical – represents a multiplier value used in the formula to delay the botBot delay processing a new pair for a random amount of milliseconds. Useful for when Poloniex complains about sending to many requests.Formula: random value between 200 an 400 ms * BOT_DELAY Tradingview settingsthese are only relevant if you’ve bought the Tradingview plugin, otherwise just leave it on the default values"TV_GAIN": 0.6, Values: numerical – represent a percentageSet a minimum gain in % that trades initiated by Tradingview must comply to. When sell orders are being placed by Tradingview that would have a lower gain than this value, Gunbot will not place the order. Use this to prevent selling at loss."TV_TRADING_LIMIT": 0.001,Values: numerical – represent an amount in primary trading currency.This value defines the trading limit for orders placed through Tradingview The default value of 0.001 would place maximum orders of 0.001 BTC when used on a BTC_x pair."TV_TRADING_LIMIT_BUY": 0.001,Values: numerical – represent an amount in primary trading currency.This value defines the trading limit for limit buy orders placed through Tradingview The default value of 0.001 would place maximum orders of 0.001 BTC when used on a BTC_x pair."TV_PYRAMID": false,Values: true or falseSetting this value to true enables the use of pyramid contracts through Tradingview.This might possibly trigger a large amount of trades. Be sure to have checked your strategy and balances before trying this."TV_TRADING_LIMIT_SELL": 0.001,Values: numerical – represent an amount in primary trading currency.This value defines the trading limit for limit sell orders placed through Tradingview The default value of 0.001 would place maximum orders of 0.001 BTC when used on a BTC_x pair."TV_PROTECTION": true,Values: true or falseWhen set to true Gunbot will check there is an overall profit before selling, as specified in TV_GAIN. When set to false, Gunbot will execute all TradingView without interfering with a custom strategy."RETRY_TV_ORDER": false,Values: true or falseThis parameter can be used to prevent consecutive orders being placed when orders are not successful. Set this to false to disable looping of orders.Imap listener settings (for Tradingview plugin)"enabled": false,Set this to true to enable the Tradingview plugin. You need to acquire a licence for this."authorized_froms": "[\"noreply@\"]",Set the Tradingview sender email address that you want to use."user": "YOUR_EMAIL_HERE",Set your own email address here. This address listens for mails from Tradingview."password": "YOUR_PASSWORD_HERE",Input the password for your own email address."host": "imap.",The address of the IMAP server that the plugin needs to connect to."port": 993,The port number for the IMAP server"tls": true,Defines if TLS encryption is used for the IMAP connection.ExchangesIn this section you insert your API key and secret for the exchanges you want to trade on. You don’t need to remove the exchanges you do not want to trade on.PairsIn the pairs sections you can configure which pairs to use, on which exchange, which strategy should be used, optional overrides are possible.The notation scheme for pairs is slightly different for each exchange. Configuring a pair trading BTC (primary) for LTC would look like this for each exchange:Poloniex: BTC_LTCBittrex: BTC-LTCKraken: BTCLTCCryptopia: LTC_BTCConfiguring a pair to use bb as strategy, and override the DOUBLE_UP value set in the bb strategy would look like this:"BTC_DASH": { "strategy": "bb", "override": {"DOUBLE_UP": true}}StrategiesGunbot has four different strategies that can be used to trade. These can be freely combined, where one strategy is being used for buying, and another for selling.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).Strategies use a generic set of parameters, which are the same for each strategy. Only the relevant parameters are being used to process the strategy. Bollinger bands (bb)You can configure at which percentage from the lower Bollinger bands Gunbot should buy, and at which percentage from the higher Bollinger band a sell order should be placed.43815022542500The formula for the Bollinger bands 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)GainSet Gunbot to buy when the price reaches a fixed percentage below EMA, and sell when the price is x percent higher than the price it bought for.StepgainStepgain is similar to gain, but here you set a minimum buy level below EMA and a second, lower buy level. Gunbot will buy when the price stops dropping after reaching the first buy level, or when it reaches the second. With selling, you define a minimum gain in percentage compared to the bought price, and a second sell level at which you’d definitely want to sell. A sell order will be placed when the first level is reached and the price no longer increases, or when the second level is reached.Pingpong (pp)This strategy can be used for pairs that move up and down between a predictable price range for longer periods. You set fixed prices at which Gunbot should buy and bining strategiesEach 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: bb – pure bollinger bandsgain – pure gainpp – pure pingpongstepgain – pure stepgainbbgain – buy using Bollinger bands, sell with gaingainbb – buy with gain, sell with stepgainbbstepgain - buy using Bollinger bands, sell with gainstepgainbb – buy using stepgain, sell using Bollinger bandsbbpp - buy using Bollinger bands, sell with pingpongppbb – buy with pingpong, sell with Bollinger bandsgainstepgain – buy with gain, sell with stepgainstepgaingain - buy with stepgain, sell with gaingainpp – buy with gain, sell with ppppgain – buy with pingpong, sell with gainstepgainpp – buy with stepgain, sell with ppppstepgain – buy with pingpong, sell with stepgainStrategy settings"TRADING_LIMIT": 0.001,Values: numerical – represent an amount in primary trading currency.This value defines the trading limit for limit 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."PERIOD": 5,Values: 1 / 5 / 15 / 30 / 60 – represents candle stick size in minutesDefines the candle stick size used for EMA and BB calculation. Check the charts on your exchange to check which sizes are supported."BUY_LEVEL": 0.1,Values: numerical – represent a percentageThis 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 percentageRelevant: only when gain is used as selling strategyThis sets the target for selling with Gain as selling strategy. The bot will sell when the set percentage above last buying price is reached."EMA1": 24,Values: numerical – represents an amount of candle sticksSet this to the amount of candle sticks 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)."EMA1": 12,Values: numerical – represents an amount of candle sticksSet this to the amount of candle sticks 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": 40,Values: numerical – represents a percentageRelevant: when gain 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 40% from HIGH_BB."LOW_BB": 40,Values: numerical – represents a percentageRelevant: only when bb is used as buying strategyThis sets the target for buying with bb as buying strategy. The bot will buy when the price hits a point 40% 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": 20,Values: numerical – represents a number of candle sticksThis 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 20 on the exchange charts, set this value to 20."BUYLVL1": 0.6,Values: numerical – represents a percentageRelevant: only when stepgain is used as buying strategyThis sets the level 1 target for buying with stepgain as buying strategy. "BUYLVL2": 2,Values: numerical – represents a percentageRelevant: only when stepgain is used as buying strategyThis sets the level 2 target for buying with stepgain as buying strategy. "BUYLVL3": 70,Values: numerical – represents a percentageRelevant: only when stepgain is used as buying strategyThis sets the level 3 target for buying with stepgain as buying strategy. "SELLLVL1": 0.6,Values: numerical – represents a percentageRelevant: only when stepgain is used as selling strategyThis sets the level 1 target for selling with stepgain as selling strategy. "SELLLVL2": 2,Values: numerical – represents a percentageRelevant: only when stepgain is used as selling strategyThis sets the level 2 target for selling with stepgain as selling strategy. "SELLLVL3": 70,Values: numerical – represents a percentageRelevant: only when stepgain is used as selling strategyThis sets the level 3 target for selling with stepgain as selling strategy. "BUYLVL": 2,Values: 1 / 2 / 3 – represents stepsRelevant: only when stepgain is used as buying strategyThis sets which step should be considered when using stepgain as buying strategy.1: Buy when price drops below BUYLVL1 and stops dropping or hits BUYLVL22: Buy when price drops below BUYLVL2 and stops dropping or hits BUYLVL33: Buy when price hits BUYLVL3"SELLLVL": 2,Values: 1 / 2 / 3 – represents stepsRelevant: only when stepgain is used as selling strategyThis sets which step should be considered when using stepgain as selling strategy.1: Buy when price rises above SELLLVL1 and stops rising or hits SELLLVL22: Buy when price rises above SELLLVL2 and stops rising or hits SELLLVL33: Buy when price hits SELLLVL3"LASTPOINTS": 5,Values: numerical – represents a number prices from the arrayRelevant: only when stepgain is used as buying or selling strategyThis sets how many of the latest collected prices should be used as averaged value for LASTPOINTS in the trend watcher calculation."AVGPOINTS": 250,Values: numerical – represents a number prices from the arrayRelevant: only when stepgain is used as buying or selling strategyThis sets how many of the latest collected prices should be used as averaged value for AVGPOINTS in the trend watcher calculation.Uptrend: LASTPOINTS / AVGPOINTS = >1 Downtrend: LASTPOINTS / AVGPOINTS = <1 "AVGMINIMUM": 0.00000001,Values: numerical – represents a priceRelevant: only when stepgain is used as buying or selling strategyThis defines the minimum price level to consider in AVGPOINTS."GUNTHY_API": false,Values: true or falseYou can use the GUNTHY_API to get BB and EMA from a Gunbot server. Only set this to true if you set 15 minute candles on Bittrex, or any candle stick size on Cryptopia."PP_BUY": 0.00000001,Values: numerical – represents a priceRelevant: only pp Is used as buying strategy Set the excact price you want Gunbot buying for when using pp as buying strategy."PP_SELL": 0.12345678,Values: numerical – represents a priceRelevant: only pp Is used as selling strategy Set the excact price you want Gunbot buying for when using pp as selling strategy."PANIC_SELL": false,Values: true or falseWhen set to true, all coins will be sold at market value. This can incur losses! "DOUBLE_UP": false,Values: true or falseWhen set to true, DOUBLE_UP will try to get rid of bags by averaging down. Works on all strategies.No limit is set for buy orders placed when averaging down, make sure you have enough of your primary currency available. Gunbot will start averaging down a bag when the higher Bollinger band value drops below the last bought price. "STOP_LIMIT": 60,Values: numerical – represents a percentageSets 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 is being sold when the current price is >60% lower than bought price. After a stop limit sell order has been placed, no further buy orders will be placed until the price reaches a point again that is above the level of that of the sell order, thus preventing a negative spiral where a rebuy would occur soon after hitting stop limit, because the price keeps dropping."BUY_ENABLED": true,Values: true or falseSet this to false to prevent Gunbot from placing buy orders. "MIN_VOLUME_TO_BUY": 0.0001,Values: numerical – represents the total value of a coins holdings in primary currencySets a threshold for buying 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."MIN_VOLUME_TO_SELL": 0.0001Values: numerical – represents the total value of a coins holdings in primary currencySets a threshold for selling orders. If you own less than the set amount, sell orders will not be placed and the bot goes into buying mode again. ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download