What's new

Level up your trading game with Naxbot

Naxbot R is the world's first fully programmable crypto trading bot with an integrated metaheuristic optimization engine. Join us today to automate the mundane aspects of trading, so you can spend more time crafting profitable strategies. Self-hosted with no DRM or licensing, buy once - own forever!

Setup

  • Views Views: 959
  • Last updated Last updated:
  • Setup & Configuration​


    Naxbot R is configured via the config.json file that resides within the `data` directory.

    Upon first launch of the bot, the file will be generated for you automatically with some default options. This page serves to elaborate further on the individual options.

    General Settings​


    general.bot_mode
    Acceptable values: Plot, Crawl, Backtest, Optimize:
    • Plot creates a .csv file in the data/plots directory using the data created by your Strategy.lua. This is mainly for diagnostic purposes, to see if your script is working as intended.
    • Crawl starts the bot in its main mode. Upon every candle close, all trading pairs listed in general.trading_pairs will be evaluated and signals will be generated (if applicable).
    • Backtest tests the current Strategy against the trading pairs listed in general.trading_pairs and creates a detailed summary of all trades taken and their results in the data/backtests directory.
    • Optimize runs the heuristic Optimizer on the Strategy defined in strategy.lua using the parameter constraints defined in the Optimizer section in your config.json

    general.exchange_name
    Acceptable values: ftx-futures, binance

    general.timeframe
    Acceptable values: OneMinute, FiveMinutes, FifteenMinutes, OneHour, FourHours, OneDay

    Specifies the timeframe the bot trades & tests on.

    general.quote_asset
    The quote asset used for trading. The value depends on your exchange.

    general.trading_pairs
    A list of trading pairs to be used in the Plot, Crawl and Backtest modes.

    Crawler Settings​


    These settings are mainly relevant for Crawl mode, but may be used in some other bot modes as well.

    crawler.enable_leverage
    Whether or not to enable trading with leverage. It's generally recommended to leave this set to true, unless the exchange doesn't support it.

    crawler.use_fixed_leverage
    Normally, Naxbot R will calculate the ideal leverage on a trade-by-trade basis. However, some exchanges will enforce an account-wide leverage, in which case you should override the leverage by settings this value to true and adjusting crawler.fixed_leverage accordingly.

    crawler.fixed_leverage
    The fixed leverage to apply to all trades.

    crawler.max_risk_in_trades
    The % value of your max capital that you are willing to risk at any given point in time. If all currently open trades fail, you will lose this percentage from your max capital.

    For example: Say you have $10,000 capital, and your max risk in trades is 15%. If you are at your max, and all your open trades fail, you will lose 15% of $10,000, which is $1,500.

    Tip: The max number of open trades can be calculated as such: max_open_trades = crawler.max_risk_in_trades / crawler.risk_percent

    crawler.max_trading_balance
    Set this to your total trading capital for accurate risk assessment (even if not all of your capital is on the exchange).

    crawler.risk_percent
    The % value of your max capital that will be risked for every new trade. If the stop loss is hit, this is the amount that will be lost.

    For example: Say you have $10,000 capital and your risk percent is 2%. Every trade that hits stop loss will then cost you $200.

    crawler.tp_count
    The amount of take profit targets the bot should set.

    crawler.tp_weights
    A list of weights to be applied to the take profit targets. These are percentages.

    For example: A value of [50, 30, 20] will sell off 50% of the position at TP1, 30% at TP2, and 20% at TP3.

    3commas​


    Naxbot R can be integrated with 3commas' Smart Trade functionality for fully automatic trading.

    NOTE: Naxbot R's auto-trade functionality is currently in development. In the future, it will aim to replace the 3commas module.

    commas.enabled
    Whether or not this module is enabled.

    commas.account_id
    The ID of your 3commas trading account. This can be obtained by heading to your dashboard, and clicking on any of your accounts' headers. The account ID will be in the URL like so: https://app.3commas.io/accounts/[account id]

    commas.api_key
    Your API key for 3commas.

    commas.secret_key
    Your secret key for 3commas.

    HTTP​


    Naxbot R can send trade signals to an arbitrary endpoint you configure. Any data Naxbot R sends is signed using Sha256 HMAC with a key set by you.

    http.enabled
    Whether or not this module is enabled.

    http.endpoint
    The URL to your endpoint. Supports HTTPS.

    http.hmac_secret_key
    Any secret key you choose. The POST body will be signed using this key, and the key will be sent alongside the header.

    Telegram​


    Naxbot R can send trade signals into any Telegram chat or channel. For this, you will need to create a Telegram chat bot.

    telegram.enabled
    Whether or not this module is enabled.

    telegram.chat_id
    The ID of the chat where signals should be posted in.

    telgram.token
    The token of your Telegram chat bot.

    Optimizer​


    Naxbot R features a metaheuristic strategy Optimizer that is capable of finding optimum parameters for any scripted strategy.

    The algorithm used is Simulated Annealing. It is recommended to read up on how this algorithm functions, as then the config options will make a lot more sense.

    optimizer.threads
    The amount of threads the optimizer should use. This may not exceed your total number of CPU threads.

    optimizer.generations_per_thread
    How many generations (iterations) should be processed in each thread.

    optimizer.population_size_per_thread
    How large a population should be process in each thread.

    optimizer.trading_pairs
    The trading pairs that the optimizer should run on. It is recommended to have little to no overlap with the pairs listed in general.trading_pairs, in order to avoid bias.
Top