Gunbot's AutoConfig lets you manage strategy parameters for trading pairs (typically with a manageOverrides job). The clearOverrides parameter is a boolean option that dictates whether existing pair-specific overrides are wiped before the job applies its new overrides.
36 posts tagged with "AutoConfig"
View All TagsHow to specify the time interval for historical data in AutoConfig?
Gunbot’s AutoConfig uses historical ticker data for filter analysis. Alongside the amount of historical data (via history), you also control the time interval between those points with historyInterval in each AutoConfig job.
How do I set the amount of historical ticker data AutoConfig retains?
Gunbot's AutoConfig automates trading strategies and can use historical market data for advanced filters. The history parameter in each job controls how many historical data points AutoConfig retains. Set it to balance analysis depth with system resources.
Specify default strategy for pairs added by AutoConfig 'addPairs' job
When using Gunbot's AutoConfig with an addPairs job, set the strategy parameter so newly discovered pairs that pass your filters get a default strategy.
How do I tell AutoConfig which exchange to work with for a job?
Gunbot's AutoConfig feature lets you automate tasks across cryptocurrency exchanges. To ensure an AutoConfig job targets the correct market, you must specify the exchange using the exchange parameter. This setting dictates where AutoConfig fetches data, which pairs it considers, and where any configuration changes or trading actions (if applicable to the job type) are directed.
Use global AutoConfig variables (this.variables) in custom filters
Gunbot's AutoConfig feature lets you define and manipulate global variables that can be shared across jobs and filters. Within a custom JavaScript filter (where filterType: "custom"), these global variables are accessible through the this.variables context object. This enables stateful logic that adapts based on conditions or counters set elsewhere in your AutoConfig setup.
Target pairs with holdings using 'pairs.bag' in AutoConfig filters
AutoConfig can target only pairs where you already hold a “bag” (a non-trivial quote balance). There is not always a direct pairs.bag parameter, so most setups check bag status in a custom filter by comparing this.pair.quoteBalance against MIN_VOLUME_TO_SELL.
Filter AutoConfig pairs based on a per-pair variable's value
Gunbot's AutoConfig feature allows granular control through per-pair variables. These variables store stateful information unique to each trading pair on a specific exchange. AutoConfig offers built-in filter types like pairVariableExact, pairVariableBiggerThan, and pairVariableSmallerThan, enabling jobs to make decisions based on each pair's history or status.
Filter pairs by specific min/max price points with AutoConfig
When selecting trading pairs with Gunbot's AutoConfig, particularly for addPairs jobs, you may want to target or avoid pairs based on their absolute current price. For example, you might avoid very low-priced "penny stock" style cryptocurrencies or target only those below a certain price point. AutoConfig provides minPrice and maxPrice filter types to achieve this.
Set or update global AutoConfig variables as a job action
Global variables in Gunbot's AutoConfig enable stateful automation, so jobs can react to conditions set by other jobs or persist information across runs. The primary way to create or modify these global variables is by using the setVariable object as an action within an AutoConfig job definition. This action runs if the job's filters (if any) pass.
Set or update per-pair AutoConfig variables for filtered pairs
Gunbot's AutoConfig supports stateful automation with both global variables and variables specific to each trading pair on an exchange. The setPairVariable object, when used as an action in an AutoConfig job, creates or updates per-pair variables for all pairs that pass the job's filters. This enables targeted, adaptive logic.
Access Gunbot's main config in custom AutoConfig filters via this.config
Custom AutoConfig filters can read settings from your main config.js through the read-only context variable this.config. This lets filters use global, exchange, strategy, and pair settings alongside market data.
How do I enable or disable an entire AutoConfig job in Gunbot?
Gunbot's AutoConfig lets you define multiple automated jobs with their own schedules and filters. If you want to pause a job without deleting it (or keep a new job inactive until ready), use the enabled parameter.
Using AutoConfig's debug mode for filter troubleshooting
AutoConfig job filters can be hard to diagnose, especially with multiple filters or custom JavaScript. The debug parameter adds verbose logging for filter evaluation so you can see why a pair passes or fails.
AutoConfig's 'setITB' option: Ignoring trades before a set time
When managing trading pairs with Gunbot's AutoConfig, especially when adding new pairs or making significant changes to existing ones, you might want to prevent the trading strategy from immediately acting on historical chart data. The setITB option in AutoConfig jobs provides an automated way to set the IGNORE_TRADES_BEFORE (ITB) override for affected pairs to the current time, so the strategy only considers market data from that point forward.
Manage pair lists with 'pairs.removeDisabled' in AutoConfig
AutoConfig removePairs jobs can also remove pairs that you manually disabled. Set pairs.removeDisabled: true to remove any pair in config.js with "enabled": false, keeping the config clean.
How to use multiple filter sets (filters, filters2) in AutoConfig?
Gunbot's AutoConfig feature allows multiple "filter sets" within a single job. A basic job might use just one set of filters (the filters object), but you can define up to ten sets (filters, filters2, ..., filters10). A pair triggers the job's action if it passes any one of these complete filter sets.
Use 'pairs.noBag' to remove only pairs with no holdings via AutoConfig
When automating pair removal with Gunbot's AutoConfig removePairs job type, you need to consider whether the bot still holds quote currency for the pair (a "bag"). The pairs.noBag option adds a safeguard: only delist a pair when the quote balance is below the strategy’s MIN_VOLUME_TO_SELL (MVTS) threshold and there are no open orders.
Use AutoConfig's 'exclude' parameter to blacklist pairs/patterns
While the pairs.include parameter in Gunbot's AutoConfig defines the initial watchlist for a job, the pairs.exclude parameter refines that list by blacklisting specific pairs or patterns. Pairs matching an exclude pattern are removed even if they matched an include pattern. This gives precise control over which pairs an AutoConfig job will process.
Use AutoConfig filters for volume percentage change over snapshots
Detecting significant changes in trading volume can highlight emerging opportunities or increased risk. Gunbot's AutoConfig provides minVolumePctChangeInterval and maxVolumePctChangeInterval filters to compare a pair's current trading volume with its average volume over a recent snapshot window.
Use acUserData.json external data in AutoConfig custom filters
Gunbot's AutoConfig supports on-the-fly decisions based on market data and internal states. When you need external information or custom datasets in filter logic, use acUserData.json. Its contents are available to custom JavaScript filters via the this.userData context variable.
How to make an AutoConfig job run once when Gunbot starts?
Gunbot's AutoConfig jobs usually run on a cron schedule. If you want a job to run immediately when Gunbot starts (in addition to its schedule, or only on startup), use the onStart parameter in the job configuration.
Target AutoConfig actions to pairs with a specific strategy name
Gunbot's AutoConfig can manage trading pairs, including assigned strategies and overrides. A common requirement is to apply AutoConfig actions—like changing overrides or switching strategies—only to pairs currently configured with a specific trading strategy. AutoConfig provides the strategyName filter type for this purpose.
How can I schedule an AutoConfig job to run at specific times?
Gunbot's AutoConfig feature automates trading tasks like adding pairs and managing overrides. A key part of control is defining when jobs run. You do this with the schedule parameter in each AutoConfig job, which accepts a cron expression for flexible timing.
Use AutoConfig to dynamically change global Gunbot settings
Gunbot's AutoConfig feature extends beyond managing trading pairs and their strategies; it can also be used to dynamically alter global bot settings found in the bot section of your config.js file. This is achieved by defining a bot object within an AutoConfig job's action block, allowing for adaptive changes to Gunbot's core behavior based on your specified conditions.
Filter by % difference between two ledger values with AutoConfig
Gunbot's AutoConfig supports percentage-based comparisons between two ledger keys using the differenceBigger and differenceSmaller filters. These filters help measure relative change, such as price vs. average buy price or a gap between two indicators stored in the ledger.
Filter pairs by current bid-ask spread percentage with AutoConfig
The bid-ask spread is the difference between the highest price a buyer is willing to pay (bid) and the lowest price a seller is willing to accept (ask), and it is a key indicator of a pair's liquidity and transaction costs. Gunbot's AutoConfig lets you filter pairs by spread percentage with the minSpreadPct and maxSpreadPct filter types, so you can target cost-effective pairs or avoid those with wide spreads.
Filter pairs by 24-hour trading volume with AutoConfig
24-hour trading volume is a common liquidity signal. Gunbot's AutoConfig supports minVolume24h and maxVolume24h filters to include or exclude pairs based on this metric.
Limit active trading pairs per exchange with AutoConfig's maxPairs
When using Gunbot's AutoConfig addPairs jobs to discover and add trading opportunities, it is often crucial to control the total number of pairs actively trading on an exchange. This helps manage risk, available capital, and system resources. AutoConfig addresses this with the maxPairs parameter, which sets an upper limit on the number of enabled pairs for a given exchange.
Define and apply strategy overrides with an AutoConfig job
AutoConfig lets you set or change pair-specific strategy parameters through the overrides object. This is most commonly used in manageOverrides (update existing pairs) and addPairs (set initial parameters for new pairs).
How can I define the operational mode or type for an AutoConfig job?
Gunbot AutoConfig jobs run based on the type value in each job’s JSON definition. That type tells Gunbot which operational mode to execute (adding pairs, managing overrides, collecting data, and more).
Dynamically adjust exchange polling delay with AutoConfig jobs
Gunbot's exchange polling delay controls how often it fetches market data. While you set a default in config.js, AutoConfig jobs can update an exchange's delay value when filters pass.
Filter AutoConfig pairs based on a global variable's value
Gunbot's AutoConfig supports stateful automation through global variables. Variables set by other jobs can be used as filter conditions with built-in filterType options.
Reset global variables with 'resetVariable' if AutoConfig filters fail
Gunbot's AutoConfig supports global state via setVariable when filters pass. Use resetVariable to change or revert those globals when the job's main filters do not pass.
Use 'resetPairVariable' for pairs failing AutoConfig job filters
Gunbot's AutoConfig can manage per-pair variables when pairs pass filters (setPairVariable) and when they fail (resetPairVariable). The resetPairVariable action runs for each evaluated pair that does not meet the job's main filters (or filters2, etc.), letting you update non-qualifying pairs explicitly.
Persistence of AutoConfig global & per-pair variables explained
Gunbot's AutoConfig system maintains state using global and per-pair variables. That state persists across restarts because AutoConfig saves variables to JSON files in your Gunbot user directory: autoconfig-variables.json for global variables and autoconfig-pairVariables.json for per-pair variables.