-
Notifications
You must be signed in to change notification settings - Fork 131
Configuration
There are a few settings you can configure to alter the behavior of the bot. These settings are stored in the configuration files in the various runtime projects. A sample of the configuration file for the Azure Functions runtime can be found below.
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "",
"AzureWebJobsDashboard": "",
"BindingRedirects": "[ { \"ShortName\": \"Newtonsoft.Json\", \"RedirectToVersion\": \"11.0.0.0\", \"PublicKeyToken\": \"30ad4fe6b2a6aeed\" } ]",
"Exchange": "Binance",
"ApiKey": "KeyValue",
"ApiSecret": "SecretValue",
"PassPhrase": "PassPhrase",
"AzureTableStorageConnectionString": "",
"SqlServerConnectionString": "",
"SqliteConnectionString": "",
"TelegramBotToken": "",
"TelegramChatId": "",
"DiscordWebhookId": "",
"DiscordWebhookToken": "",
"SlackWebhookUrl": "",
"DefaultStrategy": "TheScalper",
"MaxNumberOfConcurrentTrades": 2,
"AmountOfBtcToInvestPerTrader": 0.01,
"TransactionFeePercentage": 0.0025,
"StopLossPercentage": -0.07,
"ImmediatelyPlaceSellOrder": false,
"ImmediatelyPlaceSellOrderAtProfit": 0.02,
"OnlySellOnStrategySignals": false,
"EnableTrailingStop": true,
"TrailingStopStartingPercentage": 0.02,
"TrailingStopPercentage": 0.05,
"CancelUnboughtOrdersEachCycle": true,
"PlaceFirstStopAtSignalCandleLow": false,
"MinimumAmountOfVolume": 300,
"BuyInPriceStrategy": "SignalCandleClose",
"AskLastBalance": 0.2,
"BuyInPricePercentage": 0.005,
"ProfitStrategy":"Reinvest",
"ReturnOnInvestment": "[{\"Duration\":300,\"Profit\":0.05},{\"Duration\":600,\"Profit\":0.02}]",
"QuoteCurrency": "BTC",
"MarketBlackList": "[\"TRX\", \"XVG\"]",
"OnlyTradeList": "[\"ETH\", \"LTC\"]",
"AlwaysTradeList": "[\"ETH\", \"LTC\"]"
}
}
The exchange you want to use. For a lot of the private endpoints (such as placing orders) you will also need to provide an API key and the secret key to use to communicate with the exchange of your choosing. Please make sure that you have withdrawal permissions disabled for the API keys you put in here. No external tool should ever be trusted with any withdrawal privileges. Luckily our source code is available here for you to look at 😎
The connection string used to connect to the Azure Table Storage used to store the trade data. One of these connection strings is required because otherwise the bot doesn't have any place to store our trade data.
The connection string used to connect to the SQL Server database used to store the trade data. One of these connection strings is required because otherwise the bot doesn't have any place to store our trade data.
The connection string used to connect to the Sqlite database used to store the trade data. One of these connection strings is required because otherwise the bot doesn't have any place to store our trade data.
These settings are related to the notification manager you use. When configuring a Telegram notification manager you will need to provide these two settings. Information about how to set up a Telegram bot is available on the Telegram website.
These settings are related to the notification manager you use. When configuring a Discord notification manager you will need to provide these two settings. Information about how to set up a Discord webhook is available on the Discord website.
This setting is related to the notification manager you use. When configuring a Slack notification manager you will need to provide this setting. Information about how to set up a Slack webhook is available on the Slack website.
You can decide which strategy to use from the configuration. Use the classname for the strategy you want to use in this setting. If no strategy is provided the default value set in for the TradeManager
you're using in the Azure Functions or local runtime is used.
Decides how many trader instances you want to be running simultaneously. Each of these traders uses the AmountToInvestPerTrader
defined as it's starting budget for trading. Each trader will take the given amount off your stack and trade with that amount in its own bubble. That way none of your other funds are touched.
How much of the QuoteCurrency
each trader should use as its stake amount.
Buy orders that aren't filled at the next buy cycle can be cancelled automatically.
There are a few options to limit your losses. You can provide a default stop loss percentage at which point the trade will be abandoned by using the StopLossPercentage
variable.
You can immediately place a sell order at a specific profit percentage by using ImmediatelyPlaceSellOrder
and ImmediatelyPlaceSellOrderAtProfit
. This means that as soon as the buy order was filled, a sell order will be placed and will remain in place until it is filled.
When you want to fully rely on your strategy for sell signals you can enable this setting. That way the bot does not use any stops, ROI or other trade exiting mechanisms the bot supports.
Warning: Pay attention that you use a strategy that actually provides sell signals or you might get stuck in trades forever!
The bot supports a trailing stop, which starts when the profit percentage set for the TrailingStopStartingPercentage
variable is reached. For each X percent profit (as defined in the TrailingStopPercentage
variable) the trailing stop is increased.
Use this to tell the bot to put an initial stop at the low of the signal candle as defined by the strategy you use. This ensures that when price drops below the signal candle low the trade is sold.
There are a few settings related to placing your buy order. Depending on the chosen strategy these can be used. The options for defining your buy-in are:
- Ask/last balance - A value of 0.0 will use the ask price, 1.0 will use the last price and values between those interpolate between ask and last price. Using the ask price will guarantee quick success in bid, but the bot will also end up paying more then would probably have been necessary.
-
Percentage below current bid - Uses a percentage below the current bid as defined by
BuyInPricePercentage
. - Match current bid - Matches the current bid.
- Signal candle close - Uses the close of the signal candle defined by the strategy as buy price.
Defines what should be done with any profit that was made.
-
Set aside - Profit is left alone, each trader will only use the amount specified in
AmountToInvestPerTrader
. - Reinvest - Profit that was made will be used in the next trade. Each trader has it's own pool of money that it manages which will be used.
Another way to take profits is by using the return on investment functionality. The duration is a value in minutes and the profit is a double containing a percentage. This list is used to define constraints such as "Sell when 5 hours have passed and profit is at 3%". You can define as many of these as you want and they will be processed in the order they're listed. As soon as a stop loss percentage is set (either by using a trailing stop or by using PlaceFirstStopAtSignalCandleLow
) this setting will be ignored.
The quote currency you want to use for your trades. By default we use BTC, but if you want to trade ETH or any other pairs instead this can be set to ETH. Do take into account that the exchange you're trading on actually supports the given quote currency.
This is a base amount of volume that a coin has to have to qualify for trading. When set to zero will mean that we will not be looking at volume.
A list of market names to never trade on. You only need to specify the base currency here, because the bot can decide how to format the actual currency depending on the exchange you're going to use.
When there are coins listed here they will be the only coins that will be traded. You only need to specify the base currency here, because the bot can decide how to format the actual currency depending on the exchange you're going to use.
A list of coins that will always be traded on. You only need to specify the base currency here, because the bot can decide how to format the actual currency depending on the exchange you're going to use.