Skip to main content

31 posts tagged with "Guides"

View All Tags

CopyTrading powered by Gunbot: a practical intro to GunbotHub

@boekenbox
@boekenbox
CopyTrading powered by Gunbot: a practical intro to GunbotHub

If you want to jump straight in, the CopyTrading portal is here: https://copytrading.gunbot.com.

GunbotHub is a marketplace built around one job: connecting strategy leaders and copytraders so trades can be copied automatically through Gunbot.

Leaders publish strategies (with an exchange, a trading pair, and a price). Copytraders purchase one-time access and enable the strategy. From that point on, trade signals from the leader are relayed to the copytrader’s Gunbot, which executes the trades on the copytrader’s exchange account.

A few details make the whole thing click:

  • Leaders can generate signals using Gunbot or TradingView.
  • Copytraders do not manually edit configs to get started; GunbotHub writes the relevant configuration into Gunbot when a strategy is enabled.
  • Exchange API keys remain inside the copytrader’s Gunbot setup. GunbotHub does not take those keys.

You can also be both a leader and a copytrader under the same account, which matches how a lot of active traders actually work.

First-time setup: sign in, verify, complete your profile

GunbotHub starts with a license check for everyone.

  • Sign in with Google.
  • Enter your GUNTHY wallet address to verify your Gunbot license. This is the Ethereum address where you received GUNTHY tokens when you first purchased Gunbot.

After that, the profile setup depends on what you want to do:

  • Copytraders add their Gunbot URL so GunbotHub can push configuration automatically.
  • Leaders add payment details so earnings can be paid out.

Copying a strategy: what you do, what gets automated

Add your Gunbot URL

In profile settings, enter the URL for your Gunbot instance.

  • You can enter a domain name or an IP-based URL.
  • If you enter an IP address, GunbotHub can automatically convert it into a subdomain under gunbot.market (for example, a URL that starts as an IP can be converted into something like gb-1-abc123.gunbot.market). This is intended to avoid Cloudflare Worker connection issues that can happen when communicating with IP addresses directly.

For the automation to work, your Gunbot needs to have the Config API running.

Marketplace browsing and purchase

In the marketplace you can:

  • search by strategy name or leader
  • filter by exchange and trading pair
  • view strategy details, ratings, and reviews
  • see the number of active copytraders

When you purchase a strategy, it is a one-time payment for lifetime access. There are no recurring subscriptions for strategy access.

After purchase, the strategy appears in your Active Copies tab.

Enable in Active Copies

Enabling is a toggle. Once enabled, GunbotHub handles the setup steps that usually take the most time:

  • it generates a unique API key if you do not already have one
  • it injects that key into your Gunbot for secure communication
  • it writes the strategy configuration into your Gunbot config.js with the correct exchange and trading pair
  • it begins relaying the leader’s trade signals to your Gunbot

You can disable any purchased strategy at any time from Active Copies. Disabling stops copying new trades, but you keep lifetime access and can re-enable later.

What you must already have in place

GunbotHub can configure a strategy, but it cannot trade for you without a working Gunbot environment:

  • Exchange API keys must be configured in your Gunbot for the exchange the strategy uses. Without valid API credentials, signals can arrive but trades will not execute.
  • Gunbot needs to be running to receive and execute signals. If it is offline when a signal is sent, you miss that trade. GunbotHub can show inline error notifications when it cannot reach your Gunbot.

Publishing a strategy: what leaders set up

Leaders create a strategy listing, choose a signal source, then share the strategy through the marketplace.

Create the listing

A strategy listing includes:

  • title and description
  • exchange (for example Binance or Coinbase)
  • trading pair (for example BTC/USDT)
  • a price (copytraders pay once for lifetime access)
  • optional image and video URLs

After publishing, GunbotHub provides a Strategy Code. That code is what connects your signals to the strategy listing.

Choose your signal source

Option 1: Gunbot signals

If you use Gunbot to generate signals, enable copytrading in your Gunbot config using the strategy code:

{
"copytrading": {
"enabled": true,
"STRATEGY_CODE": "YOUR-STRATEGY-CODE"
}
}

With this enabled, your Gunbot sends trade signals for that strategy code to the marketplace.

Option 2: TradingView signals

If you use TradingView, configure alerts to send webhook messages to:

https://gunbot.market/api/tradingview/webhook

The alert message is JSON and includes your strategy_code plus trade details. GunbotHub supports a range of order actions, including:

buy, sell, market_buy, market_sell, buy_stop_limit, sell_stop_limit, buy_trailing, sell_trailing, buy_oco, sell_oco, cancel, close, market_close

Example (limit buy):

{
"strategy_code": "YOUR-STRATEGY-CODE",
"action": "buy",
"ticker": "BTCUSDT",
"exchange": "binance",
"amount": 0.001,
"price": 50000
}

TradingView variables can be used in payloads (for example {{close}}, {{ticker}}, and others). If you write Pine Script strategies, TradingView can embed the webhook message inside your script using the alert_message parameter, so the script generates consistent alert payloads.

Earnings and payouts

Leaders earn revenue when copytraders purchase access:

  • 90% goes to the leader.
  • 10% is a marketplace fee.

Payment details are added in profile settings (PayPal email address, crypto wallet addresses, bank account details, or another preferred method). Marketplace admins process payments based on the information in your profile. Sales, earnings, active copytraders, and payment status can be viewed in the My Sales tab.

How trade copying works (signal relay and execution)

Once a strategy is enabled by a copytrader, the trade flow is:

  1. A leader executes a trade and sends a signal (via Gunbot or TradingView).
  2. GunbotHub receives the signal, validates it, and identifies copytraders who have that strategy enabled.
  3. GunbotHub forwards the signal to each copytrader’s Gunbot using that copytrader’s unique API key.
  4. The copytrader’s Gunbot executes the trade on the exchange account configured in that Gunbot.

The security model is straightforward: exchange API keys stay inside the copytrader’s Gunbot. GunbotHub relays signals; Gunbot executes.

Comparing strategies: what to look at in the marketplace

GunbotHub gives copytraders a few concrete tools for comparison:

  • exchange and trading pair
  • performance information and ratings
  • written reviews (available after purchase)
  • number of active copytraders

One metric called out is DP1K (Daily Profit per 1K). DP1K is defined as the average daily profit in USD per $1000 of trading volume, intended to make strategies easier to compare when they use different capital levels.

A sensible way to use the available information:

  • Make sure the strategy trades on an exchange you have configured in Gunbot.
  • Check the trading pair matches what you actually want to trade.
  • Read reviews and ratings for recurring themes.
  • Use DP1K to compare strategies side by side, while remembering it is an indicator, not a guarantee.

On sizing, the docs note that signals include recommended position sizes, but your execution is ultimately constrained by your Gunbot configuration.

Next steps

Browse strategies, check leader stats, and start copying from the marketplace at https://copytrading.gunbot.com.

Gunbot Quant: A Standalone, Open-Source Tool for Algorithmic Traders

@boekenbox
@boekenbox
Gunbot Quant: A Standalone, Open-Source Tool for Algorithmic Traders

Most screeners are great at showing you what just moved; very few are built to help you systematically trade what matters next.

If you’re running algos, you don’t really need another page of top gainers or a rainbow of indicators for screenshot flexing. You need a way to define your ideal market conditions once, reuse them reliably, and pipe the results into batched, honest backtests without wrestling multiple tools, fragile copy-paste rituals, or “close enough” parameters that mysteriously underperform in production.

That is the core of Gunbot Quant: a standalone, open-source tool that links saved screener setups directly to batched backtesting runs. And if you use Gunbot DeFi, it can hand those exact tested configs and strategies to your live bot in one click. The trading bot integration offers a repeatable loop from “scan like an algo trader” to “prove it” to “run it,” all in one place you control.

I’ll be upfront: Gunbot Quant isn’t claiming to be the only good screener. There are excellent screeners out there, and if all you want is to eyeball opportunities, you’ll be well-served. The difference here is not a promise that these filters are magically better. The difference is architecture and intent: saved, composable scans that speak the same language as the backtester; caching and compiled computations so re-runs are fast; and reporting that answers the questions systematic traders actually ask before putting capital at risk. The screener is good, but the workflow from saved scan → batch test → live parity → monitoring, is the point.

Free and open-source

Gunbot Quant is free. There’s nothing to sell here - use it, fork it, improve it. Pull requests welcome.


What it is

Gunbot Quant is a research and deployment workflow for algorithmic traders that runs on your machine, talks to multiple data sources, and treats your trading like a reproducible experiment rather than a weekend of tab-surfing.

Gunbot Quant Screenshot

You define a scan once, with liquidity guardrails, a handful of momentum, volatility, and trend metrics, and any heuristics you care about. Save it with a clear name, and reuse it every time that strategy archetype comes up. When you hit “go,” the screener assembles a candidate set that fits your rules, and the backtester runs that strategy (or a portfolio of strategies) across all those candidates in one sweep. The reports give you risk-adjusted results, portfolio roll-ups, and exit-reason diagnostics so you can tell the difference between a pretty equity curve and a setup that earned its keep. You can also cross-check assumptions against the public backtesting archive.

If you run Gunbot, you can send the exact tested configuration to live trading in a click; if you don’t, you can still use everything else: the scan, the tests, the reports, as your independent research layer.

This matters because it keeps you structured. You don’t “think” you ran the same parameters live that you tested: you know you did. You don’t “hope” your live pair is still the best place to run that setup: you can benchmark it against the rest of the market and see where it stands. And you don’t rebuild your screeners from scratch every time a regime changes: you pull up the saved scan for that regime and batch test again, which means your process gets better with time instead of noisier.

The real win

Plenty of solid screeners exist. The edge here is that saved screener setups flow straight into batched backtests with the same parameters and symbol normalization. Define once, reuse often, compare over time.


Screener: a research starting point you can save and reuse

A screener for algos is less about colorful dashboards and more about not wasting your backtest compute budget.

Gunbot Quant pulls from any CCXT-compatible crypto exchange and from Yahoo Finance for equities and ETFs. It does the boring but essential work of normalizing symbols so “the thing you tested” is “the thing you can trade.” Think of the process as a funnel: start with a wide net of higher-volume assets, then apply increasingly specific filters.

You can filter by liquidity using trading volume so you don’t get lured into thin books that betray your fills. You can look at price relative to different SMAs to avoid testing trend followers in chop or mean-reverters in one-way markets. You can measure momentum with rate-of-change windows that match your timeframe. You can gate by normalized volatility with ATR percentage so you don’t hand a grid strategy a dead pair or throw a breakout strategy at a coin that whipsaws itself to pieces. Oscillators like RSI and Stoch RSI are available when your logic needs them, and there’s room for pragmatic heuristics, volatility “consistency,” recent volume concentration, and spike filters that keep obviously unsuitable candidates out of the queue.

Saving is the point. Instead of a one-off filter you forget next month, you keep a named, versionable scan like “TrendCandidates-Daily-HighADX” or “LowVol-MeanRev-4h.” When market tone shifts, you run the same scan and you get a fresh ranked list that passes the same gates as last time. That simple act is what makes a process feel systematic rather than improvised.

Symbols & exchanges

Markets naming gets messy across platforms. The app normalizes symbols so your research symbol matches the live tradable pair on your exchange.

Available screener metrics

The metrics are chosen to provide a holistic view of an asset's character, covering volume, momentum, trend, volatility, and risk.

CategoryMetric"Why" this metric is useful
Volumeavg_vol_30d_quoteChecks that the asset has sustained liquidity, which is critical for executing trades at expected prices.
rel_vol_10d_quoteIdentifies assets with recent spikes in interest, which can precede significant price moves.
Momentumroc_*p familyMeasures the strength of price movement over different time horizons, important for trend-following strategies.
Trendprice_vs_sma*Quickly determines if an asset is in a short-term or long-term uptrend or downtrend.
sma50_vs_sma200Identifies major trend shifts (Golden/Death Crosses), a cornerstone of classical technical analysis.
adx_14pDistinguishes between a strong trend (good for trend-following) and a ranging market (good for mean-reversion).
Volatilityatr_pct_14pNormalizes volatility as a percentage of price, allowing for fair comparison between assets of different prices. Helps filter out assets that are too flat or too erratic.
Oscillatorrsi_14p, stochrsi_*Identifies potential overbought or oversold conditions, forming the basis for mean-reversion strategies.
Heuristicsvolatility_consistency, max_daily_spike_pct, volume_concentration_pctThese are risk management metrics. They help filter out assets that may look good on paper but are prone to unpredictable spikes, flash crashes, or "pump and dump" volume patterns.

Backtesting engine: fast, batched, reproducible

The backtester is where you prove ideas, and its job is to keep up with how you actually work. You can take a saved screener result, run a strategy (or a few variants) across a slate of symbols in one go, and get a report you can trust without babysitting the process. Launch runs directly from any saved scan or from an explicit symbol list; the engine keeps the plumbing aligned: timeframes, warm-ups, symbol normalization, so the numbers you compare are apples-to-apples. Each run writes out the artifact set you expect: per-trade ledger, equity and drawdown series, exit-reason attribution, and a portfolio roll-up when you test more than one market.

Speed comes from deliberate engineering. Historical data is cached locally in columnar Parquet, so repeat runs don’t waste time refetching or reparsing; indicator math is JIT-compiled with Numba so multi-symbol sweeps complete in minutes rather than afternoons; and the engine avoids recomputation when your only change is a filter or a parameter tweak. In practice, scanning ten candidates and retesting a few strategy variants becomes a rhythm you can run before coffee gets cold, not a weekend project.

Reproducibility is treated as a first-class feature. Each report records which screener produced the candidates (name, saved definition, timestamp), which strategy configuration or alias you ran, the exact parameter set, the data window, and the fee/slippage model in force. If you prefer working from the command line, scenario files let you declare a base config and then define small, explicit overrides for symbols, strategies, or params, which makes A/B (or A/B/C) testing read like a lab notebook instead of a pile of screenshots.

The engine covers two common shapes of systematic trading without forcing one into the other. For straightforward directional systems, trend followers, mean-reverters, breakouts, you run fixed historical windows and get the risk-aware picture you need: return, Sharpe/Sortino, drawdown depth and duration, hit-rate and average trade characteristics, plus the exit-reason breakdown that shows whether profits come from the logic you intended or from a stop doing too much of the work. For inventory-carrying or market-neutral styles such as grids, a continuous evaluation path tracks compounding and inventory effects explicitly.

Candle-open execution

By default, included Gunbot strategies generally enter and exit on candle open. That keeps the strategies aligned with what’s realistically executable as a backtest and avoids intra-bar fantasy fills.


Strategy library: familiar archetypes, easy to tinker

The built-in library covers the archetypes most traders actually use, so you can focus on where and how to trade rather than reinventing entry signals.

  • For Mean-Reversion Traders: If you believe prices revert to an average, you’ll recognize the RSI_Reversion (buys oversold, uses ATR stop), BB_Reversion (fades outer band excursions), and Stochastic_Reversion. There’s also a combo that requires oscillator agreement and exits at fixed ATR multiples for tighter risk management.
  • For Trend Followers: If you believe trends persist, the library offers an EMACross, a MACD_Cross, a Supertrend_Follower (where the indicator line doubles as a trailing stop), and a Heikin-Ashi approach that smooths price action to reduce noise.
  • For Volatility and Breakout Traders: If you trade changes in market energy, you have a classic Donchian_Breakout and a Keltner_Squeeze_Breakout to separate real expansions from random noise.
  • For Market-Neutral Approaches: The continuous Grid_Strategy is designed to profit from volatility regardless of direction, with its own per-pair compounding logic.
  • For Hybrid and Adaptive Systems: There’s a “buy the dip in an uptrend” model that gates mean-reversion entries behind a slow-MA trend filter, and the self-optimizing Dynamic_Momentum_Optimizer that retunes itself to recent conditions.

In practice, traders often keep a small roster of systems that match their personality. Gunbot Quant makes it straightforward to test a few variants of each, bump a parameter for sensitivity, tighten a stop, and see differences play out in a single report.

Strategy library scope

The included strategies are not 1:1 emulations of existing Gunbot strategies. Gunbot’s native strategies are often quite complex and combine stateful behaviors that aren’t efficient to backtest generically. The library here is a clean suite of common and less-common technical approaches (i had some fun with the dynamic optimizer strat) that are transparent, auditable, and easy to benchmark.


For strategy developers: a look inside a Gunbot Quant JS file

The strategies are written in vanilla JavaScript for compatibility with Gunbot’s custom strategy runtime. They’re designed to be self-contained and readable, which makes them good templates for customization.

Here is the annotated structure of a typical strategy, rsi_reversion.js:

/*
* Gunbot Quant Strategy: RSI_Reversion
* A brief summary of the logic and a table of configurable parameters.
* This header is read by the UI to populate help text.
*/

// Gunbot requires this to be initialized. It's a persistent, per-pair data store.
gb.data.pairLedger.customStratStore = gb.data.pairLedger.customStratStore || {};

/* -------------------------------------------------------------------------
* STATE INITIALISATION: The strategy's memory.
* ------------------------------------------------------------------------- */
const store = gb.data.pairLedger.customStratStore;
if (typeof store.state !== "string") store.state = "IDLE"; // "IDLE" | "IN_POSITION"
if (typeof store.stopPrice !== "number") store.stopPrice = 0;
// ... other state variables as needed

/* -------------------------------------------------------------------------
* INDICATOR IMPLEMENTATIONS: Self-contained TA functions.
* ------------------------------------------------------------------------- */
const indicator_helpers = {
rsi: function (source, length) { /* ... RSI calculation logic ... */ },
atr: function (high, low, close, length) { /* ... ATR calculation logic ... */ }
};

/* -------------------------------------------------------------------------
* ORDER HANDLERS: Wrappers for Gunbot's buy/sell methods.
* ------------------------------------------------------------------------- */
const buyMarket = async function (amount, exchange, pair) { /* ... gb.method.buyMarket call ... */ };
const sellMarket = async function (amount, exchange, pair) { /* ... gb.method.sellMarket call ... */ };

/* -------------------------------------------------------------------------
* STATE RECONCILIATION: Syncs strategy state with Gunbot's reality.
* ------------------------------------------------------------------------- */
function reconcileState() {
// Checks gb.data.gotBag and gb.data.openOrders to see if we are in a position,
// then updates store.state accordingly. This corrects state after manual trades or restarts.
}

/* -------------------------------------------------------------------------
* TRADING DECISION: The core logic function.
* ------------------------------------------------------------------------- */
async function decideTrade() {
reconcileState(); // Always sync first.

// 1. Read parameters from Gunbot's config (`whatstrat` object)
const rsiPeriod = parseFloat(whatstrat.GQ_RSI_REVERSION_PERIOD || 14);
// ...

// 2. Calculate indicators
const rsiValues = indicator_helpers.rsi(candlesClose, rsiPeriod);
const rsi = rsiValues[iLast];
// ...

// 3. (Optional) GUI enhancements
const sidebar = [];
sidebar.push({ label: 'RSI Value', value: rsi.toFixed(2) });
gb.data.pairLedger.sidebarExtras = sidebar;

// 4. Implement strategy logic using an IF/ELSE block for states
if (store.state === "IDLE") {
const wantToEnter = rsi < rsiOversold;
if (wantToEnter) {
await buyMarket(costQuote, exchangeName, pairName);
}
} else if (store.state === "IN_POSITION") {
const wantToExit = rsi > rsiOverbought || ask < store.stopPrice;
if (wantToExit) {
await sellMarket(quoteBalance, exchangeName, pairName);
}
}
}

/* -------------------------------------------------------------------------
* DRIVER: The entry point called by Gunbot on every tick.
* ------------------------------------------------------------------------- */
await decideTrade();

Optional Gunbot handoff and benchmarking

Everything above is fully useful even if you never touch Gunbot. If you do, the loop gets tight in a satisfying way: after a batch test, you can push the winning configuration directly to your Gunbot instance. The tool handles the annoying parts: mapping your research symbol to your Gunbot notation, creating the pair and strategy, and sending the exact parameters you just tested.

Once you’re live, the benchmarking tools are built to answer a simple question: is this still the best place to run this setup? You can take your live strategy and compare it against the rest of the eligible market with the same logic. If the rankings start to show a better candidate, you can rotate before lag turns into losses.


CLI for repeatable experiments

If you prefer to script your life, the command-line interface is there. You define a base configuration and then declare a list of scenarios that override only what’s different.

Example: design a CLI scenario to test two RSI_Reversion configurations against a default EMACross on BTCUSDT.

  1. Open gunbot_quant/config/scenarios.py.
  2. Add a new dictionary to the SCENARIOS list:
{
"name": "Multi_RSI_vs_EMACross_BTC",
"params": {
"EXCHANGE": "binance",
"TIMEFRAME": "4h",
"BACKTEST_START_DATE": get_date_relative_to_now(days=365),
"SYMBOL_SELECTION_METHOD": "EXPLICIT_LIST",
"SYMBOLS": ["BTCUSDT"],
"STRATEGIES": [
{
"name": "RSI_Reversion",
"alias": "RSI_Sensitive_Config",
"params": {
"GQ_RSI_REVERSION_PERIOD": 10,
"GQ_RSI_REVERSION_OVERSOLD": 25
}
},
{
"name": "RSI_Reversion",
"alias": "RSI_Conservative_Config",
"params": {
"GQ_RSI_REVERSION_PERIOD": 21,
"GQ_RSI_REVERSION_OVERSOLD": 35,
"GQ_RSI_REVERSION_ATR_MULT": 3.0
}
},
"EMACross"
]
}
}
  1. Run the scenario from your terminal:
python -m gunbot_quant.cli.main run Multi_RSI_vs_EMACross_BTC

The engine will produce a single report comparing the three tests, so you can see which configuration performed best. All reports can be viewed in the GQ frontend. This explicit approach is useful for long-term, systematic research.


Limitations

No tool can promise you winners. The screener will not divine tomorrow’s breakout, and the backtester is not a time machine: it’s a disciplined mirror that shows you what would have happened under the rules you gave it. Liquidity filters reduce but do not eliminate execution risk; risk-adjusted metrics illuminate quality but don’t guarantee persistence.

Backtesting history is limited by exchange candle data availability. Some exchanges are more generous than others.

:::warning Avoid overfitting by convenience Batch testing makes it easy to try hundreds of variations. Don’t let that become parameter fishing. Lock a baseline, evaluate on multiple markets/regimes, and only promote changes that improve risk-adjusted metrics and drawdown behavior, not just headline returns. :::


Wrap-up

Gunbot Quant is a straightforward way to do saved, algo-first market screeners combined with batched backtests, and, if you want, to let those exact tested configurations go live in one click in Gunbot.

It runs locally, it’s open-source under the MIT license, and it’s extensible. If you’re the kind of trader who prefers a repeatable edge over a lucky screenshot, this might be useful to you.

GitHub: https://github.com/GuntharDeNiro/gunbot-quant

StepGrid Strategy: Fee-aware Grid Trading in Spot Markets

@boekenbox
@boekenbox
StepGrid Strategy: Fee-aware Grid Trading in Spot Markets

StepGrid: Turning Volatility Into Structured, Fee-Aware Profits

Grid bots have been around for years, but most of them share the same weakness: they buy and sell at fixed price intervals without caring about the actual cost of the position that is building underneath. When the market comes back up, a classic grid may close parts of its bag at a loss because the bot never looks at fees or at how many units remain.

StepGrid was designed to fix that flaw. It keeps a running “unit cost” line that represents a full-position break-even, including trading fees, and it refuses to hit the market below that line unless a slice of the position can be closed at a genuine profit. In practice, this small upgrade changes the entire character of a grid. Profits are harvested earlier, losing partials disappear, and the trader gains a predictable exit, even when the grid has stacked twenty or forty buys during a deep drawdown.

How StepGrid Thinks About a Trade

The moment StepGrid fires its first buy, it stamps that execution price as a reference. From there it watches both directions:

  • Downward: Each time price falls by one grid step, the bot checks that it still has room under MAX_BUY_COUNT. If so, it spends another TRADING_LIMIT.
  • Upward: When price rises by one grid step, the bot arms a trailing sell. If the trailer finishes above the calculated unit-cost line, the bot can unload part or all of the bag.

Because unit cost is recalculated after every fill, the break-even line keeps sliding lower while the position deepens. Eventually the market will revisit that line. When it does, StepGrid has two options. If the move is sharp and a full close is cheaper than fees, it sells everything. If the move is hesitant, it can sell a fraction, provided PROTECT_PARTIAL_SELL confirms that the slice alone is green.

Choosing a Step Size

Most users leave AUTO_STEP_SIZE set to true. The bot then measures Average True Range over the last ATR_PERIOD candles, multiplies it by 1.5, and compares the result with two times the fee percentage. The larger of those two values becomes today’s step. The advantage is obvious: when volatility expands, StepGrid widens its ladder. When the market goes quiet, steps tighten and more trades fire.

Manual spacing still has its place. Event traders often disable auto stepping, enter a STEP_SIZE that matches the expected headline move, and turn ENFORCE_STEP on. Enforcement forces every buy and sell to respect those exact levels, which keeps position size predictable in news-driven spikes.

Position Sizing and Capital Risk

Grid strategies live or die on exposure management. StepGrid makes that explicit by linking three parameters:

  1. TRADING_LIMIT – the capital per buy.
  2. MAX_BUY_COUNT – the maximum number of buys.
  3. KEEP_QUOTE – the amount of quote the bot must leave untouched for fees or withdrawals.

Multiply the first two and you know the worst-case bag size. That figure should sit well below your total account, ten to twenty percent is a common ceiling. Raise MAX_BUY_COUNT because you fear a long winter and you must lower TRADING_LIMIT to keep risk constant. The math never changes.

A Typical Cycle in Practice

Consider a trader who runs USDT-BTC with a two-thousand-USDT account, a TRADING_LIMIT of 1000 USDT, and MAX_BUY_COUNT set to twenty.

  • Phase one: The market dips five percent. StepGrid logs three buys, each at a fresh low. Unit cost has moved down with the bag and now sits roughly two percent under the first order.
  • Phase two: Price finds a floor, drifts sideways, then rallies. As soon as it has climbed a full step, the bot arms a trailing sell. Volatility is still high, so the step is wide; the trailer finishes well above fees.
  • Phase three: The trailing stop hits and closes one-third of the position, an amount chosen automatically by the bot because the bag is already in profit territory.
  • Phase four: Unit cost recalculates. With fewer coins left, it rises a little. Price pushes higher again and this time the bot sees that a full exit at break-even plus fees is within reach. It sells the rest. The cycle ends green and resets.

During that entire sequence the trader never touched a button. The only manual decision was where to put TRADING_LIMIT and MAX_BUY_COUNT on day one.

When to Change the Defaults

Most StepGrid setups work out-of-the-box, but three scenarios often require tweaks:

  • Extremely tight spreads with maker rebates: Lower MIN_VOLUME_TO_SELL so the bot can realize tiny gains without tripping exchange minimums.
  • Illiquid altcoins: Turn ENFORCE_STEP on. This reduces the chance that a thin order book drags a trailer into a worse-than-step fill.
  • Long-term accumulation: Disable SELL_ENABLED or enable FOREVER_BAGS. StepGrid will buy dips forever and never calculate a full exit, effectively dollar-cost averaging with grid precision.

Backtesting: Proof Before Money

Gunbot Pro owners can replay trades with BF_SINCE and BF_UNTIL. Deep testing builds tick-level candles so StepGrid behaves as if it were live. Two passes, one in a trending month, one in a ranging month, are enough to check whether your parameters keep drawdown inside plan and still let the bot exit profitably. If the backtest shows prolonged underwater periods or too many skipped sells, the first levers to pull are wider step size and a lower maximum buy count.

Final Thoughts

StepGrid will not outperform every strategy in every market. No robot does. What it offers is transparency and predictability: you always know your worst-case size, your dynamic break-even, and the exact rules that fire each order. That clarity is rare in grid trading and it frees the operator to focus on the higher-level decision, picking the pairs and deciding how much capital to commit. Get those calls right and StepGrid will handle the rest, one step at a time.

Gunbot Python SDK – Automate Trading Logic with Simpler Code

@boekenbox
@boekenbox
Gunbot Python SDK \u2013 Automate Trading Logic with Simpler Code

The Gunbot Python SDK is a newly released wrapper for the Gunbot REST API. It offers a practical way to write Python scripts that automate trading tasks like placing orders, managing strategies, pulling balances - without having to deal directly with raw HTTP requests.

If you're scripting quick tasks or building out more structured bots, this SDK saves time and removes friction from common interactions with the Gunbot backend.

TL;DR

  • Simplifies working with the Gunbot API in Python
  • Lets you send trades, check balances, manage config, analyze market data, etc
  • No need to handle auth headers or raw requests manually
  • Available now as package on PyPI and source code on GitHub

Why This SDK Exists

Using the Gunbot REST API directly in Python usually means building every request by hand. That includes forming URLs, setting headers, serializing payloads, and checking for response errors manually. It's tedious and error-prone.

This SDK takes care of the low-level plumbing so you can focus on writing your trading logic.

Without SDKWith gunbot-sdk-python
Manual URL buildingUse named methods like config_pair_add()
Custom headers/authHandled automatically
JSON serializationDone behind the scenes
Error handling?Still on you, but cleaner

Install in One Step

pip install gunbot-sdk-python

It’s a lightweight package published to PyPI, with minimal external dependencies.


Setup Example

from gunbot_sdk_python import ApiClient, GunbotApi

client = ApiClient(
base_path="http://<your-gunbot-host>:3000/api/v1",
token="<your-api-token>"
)

api = GunbotApi(client)

That’s enough to start making requests against your running Gunbot instance. If you want to review auth and endpoints first, use the Gunbot REST API intro.


Common Use Cases

Total Portfolio Value

result = api.assets_total(body={
"exchange": "binance",
"base": "USDT",
"start": 1719350400000,
"end": 1719436800000
})

print(f"Total USDT: {result['data']['total']}")

Add a Trading Pair to Strategy Config

api.config_pair_add(body={
"exchange": "binance",
"pair": "USDT-ETH",
"settings": {}
})

You provide Python dictionaries as input, and the SDK handles formatting and sending the request.


Where It Fits

This SDK is useful in various Python environments:

  • CLI scripts: Automate trading tasks or daily reports
  • Jupyter notebooks: For testing signals or visualizing asset data
  • FastAPI/Flask apps: Build basic web dashboards or control panels
  • Airflow or cron jobs: Schedule config updates or balance pulls
  • Serverless functions: Trigger alerts or simple trades with minimal code

There’s no framework lock-in. The SDK is straightforward to integrate wherever plain Python runs.


Open Source & Contributions

The SDK is licensed under MIT and source code is available on GitHub:

Pull requests, issues and suggestions are welcome.


A Quick Reminder on Security

When automating anything related to real funds:

  • Don’t hardcode tokens in scripts
  • Use secure environments or secrets managers
  • Avoid exposing your Gunbot instance publicly
  • Prefer HTTPS whenever not using Gunbot on localhost

What Is Gunbot?

Gunbot is a self hosted bot for trading automation that connects to major centralized and decentralized exchanges. It supports a range of built-in strategies (grid, DCA, scalping, etc) and includes a full REST API for users who want deeper control or custom workflows.

The Python SDK is just one way to extend Gunbot with your own code.


Getting Started

To recap:

  1. Install the SDK: pip install gunbot-sdk-python
  2. Connect to your Gunbot instance
  3. Authenticate using your API token
  4. Call API methods using simple Python

Resources:

Integrating External Trading Signals with Gunbot

@boekenbox
@boekenbox
Integrating External Trading Signals with Gunbot

Gunbot offers a wide range of built-in tools for automated trading, but sometimes you might want to use an external data source. By integrating external trading signals, you can customize your bot. This article will guide you through how to incorporate external trading signals with Gunbot and help you understand the advantages of doing so.

Note: This guide assumes you already have some experience with Gunbot as a trading automation tool. If you're new to Gunbot, we recommend reading our introductory guides before continuing.

Why Integrate Trading Signals with Gunbot?

Integrating trading signals into Gunbot allows you to tap into the advanced analytics capabilities of external tools, such as TradingView. These tools offer sophisticated indicators and analysis techniques that can generate signals for precise entry and exit points, giving you an edge in the market.

Benefits of Using External Signals

By adding advanced external signals, you can:

  • Improve trade entries and exits: Rely on a wider array of market indicators for better timing.
  • Customize data sources: Select data that best fits your strategy, including advanced indicators from sources like TradingView.
  • Make more informed decisions: External tools often provide more detailed market insights, improving the quality of your trading.

Integrating Signals from External Tools

To connect trading signals to Gunbot, you need an external service capable of triggering webhooks or sending signals through emails that Gunbot can process. TradingView is a popular choice for this. Here, we walk you through how to set up this integration step by step.

Example of a configured alert

Connecting TradingView to Gunbot

  1. Configure TradingView Alerts

    Start by setting up the alerts in TradingView. Format these alerts so Gunbot can accept them. A typical alert might look like this:

    123456 binance buy USDT-BTC 0.1 42553.4
    (passphrase, exchange, order type, pair, amount, price)
    • Passphrase: This makes it so only signals sent by you are processed. You can set up this passphrase in Gunbot's configuration settings.
    • Exchange, Order Type, Pair, Amount, Price: These fields provide the specifics of the trade.
  2. Set Up Your TradingView Account

    Configure the desired indicators and alerts in TradingView. Use their placeholders to dynamically fill values like the current price, allowing for a more responsive signal.

  3. Enable Webhook Listener in Gunbot

    Go to your Gunbot settings and enable the webhook listener. This will allow Gunbot to receive trading signals from external sources. You will need the IP address of your Gunbot instance to create the webhook URL.

  4. Connect the Webhook URL in TradingView

    In TradingView, set up an alert to send data to the webhook URL. Use the format Gunbot expects and check that the IP address of your Gunbot instance is correct.

Tip: Always test your integration with a small trade before relying on it in live markets. This confirms that your webhook and signal settings are working correctly.

Example Setup

Here's an example of how an alert might look in TradingView when configured to send data to Gunbot:

  • Webhook URL: https://[Your_Gunbot_IP]:443
  • Message: 123456 binance buy BTC-USDT 0.05 (Use placeholders for price or other variables if needed).

Optimizing Your Strategy with External Signals

Integrating external signals is just the beginning. Fine-tuning your overall strategy based on these signals will maximize their impact on your trades. Here are a few tips:

  1. Use Multiple Indicators to Filter Trades

    Combining several indicators can help you confirm trends and minimize false signals. For example, combining RSI, MACD, and volume indicators can help validate potential buy/sell opportunities more effectively.

  2. Refine Your Risk Management

    Automated trading is not immune to market risk. Adjust your Gunbot's risk management settings, including stop-loss thresholds and profit-taking strategies, according to your risk tolerance. External signals can help fine-tune these parameters by providing precise entry and exit points.

  3. Monitor Performance and Adjust Regularly

    Regularly evaluate the success of trades triggered by your signals. Review your strategy periodically and refine your alerts based on past performance. Market conditions can change quickly, and a strategy that worked last month may need adjustments today.

  4. Stay Up to Date with Market Conditions

    Use TradingView's extensive market analysis tools to keep up with the latest trends. Adjust your signals accordingly to keep your automated trading strategy effective as market dynamics shift.

By following these optimization steps, you can get the most out of Gunbot's automation capabilities, reducing manual intervention while still staying in control of your strategy.

Conclusion

Integrating external trading signals with Gunbot opens up more possibilities to personalize and improve your trading strategy. By incorporating advanced data analysis from tools like TradingView, you gain access to better market insights, enabling smarter trades and more consistent profitability. Test your setup thoroughly and continue refining your strategies as you gather more data.

For more tutorials and tips on Gunbot, be sure to check out our other articles.

Gunbot Referral Rewards Program: Earn by Sharing What Works

@boekenbox
@boekenbox
Gunbot Referral Rewards Program: Earn by Sharing What Works

Word-of-mouth works in crypto. When experienced traders mention a tool that delivers, people pay attention, and often take action. Gunbot’s Referral Rewards Program taps into that dynamic by paying you every time someone you introduce buys a license. No coupons to juggle, no hidden tiers, just a direct cash reward for helping fellow traders automate their strategies

How the program works

Each Gunbot account includes a personal referral link, visible on the rewards page in the Gunbot interface. You can share this link wherever traders interact, Telegram groups, Discord servers, Reddit threads, or even your own blog. When a new user clicks your link and purchases a license, your reward is credited to your dashboard. If you want a broader partner route, the Gunbot reseller program is available too.

Symbol image rewards dashboard

Once a referred purchase is confirmed, your reward becomes visible in the dashboard. You can set your payout address there, and rewards are paid out after a short holding period.

Rewards

License PurchasedYour Reward
Gunbot Standard (lifetime)$25
Gunbot Pro (lifetime)$50
Gunbot Ultimate (lifetime)$100

What makes a referral effective?

The most compelling referrals come from personal experience. Instead of copying promotional copy, focus on how Gunbot has positively impacted your own trading:

  • Show results. Post a weekly equity curve or a before-and-after screenshot of your PnL.
  • Tell a story. Describe the moment you realized manual trading was holding you back, and how automation freed up time.
  • Teach a tactic. Break down a strategy you run in Gunbot, settings, risk limits, lessons learned, and invite readers to try it.

Clear, useful content builds trust far more effectively than generic promotion.

Consistency is as important as creativity. These simple, low-effort tactics can keep your referral link working for you over time:

  • Include it in your social media bios and email signature. This keeps it visible to new contacts and followers.
  • Embed it in tutorials and screen-share videos. Viewers often convert when they see how the tool works in real time.
  • Mention it in relevant forums and discussions. When people ask about automation, provide your insights and include the link as a resource.

Advanced methods for maximizing referrals

Once you’ve covered the basics, consider expanding your reach with more strategic approaches:

  • Launch a results-focused newsletter. A short monthly update showing trade performance and bot insights can keep your audience engaged.
  • Build a targeted landing page. Focus on a specific audience segment, such as grid traders or altcoin scalpers, and explain why Gunbot suits their needs.
  • Offer added value. Provide a bonus for signups through your link, such as a strategy walkthrough or onboarding help, to increase conversions.

These tactics can increase your referral count and make your Gunbot affiliate promotions more systematic and scalable.

Encourage your existing network to participate

Often, your most effective referrals come from people you already know. Friends, colleagues, or casual investors may not be full-time traders, but many are looking for ways to simplify their crypto activities.

  • Reach out personally. A simple message like “I've been using this bot that automates my trades, if you're interested, here's the link, and I get a small referral” is often enough to spark interest.
  • Support them through the setup. Offering to answer questions or share your configuration makes them more likely to get started.
  • Don't assume a lack of interest. Many people are intrigued by automation but unsure where to begin. Your experience can help them take the first step.

Even quiet, one-on-one referrals can be highly effective, especially when grounded in trust.

Why participate?

In addition to the direct rewards, the referral program helps grow the Gunbot community. New users bring fresh perspectives, alternative strategies, and valuable feedback, contributions that ultimately benefit your own trading. It’s a cycle: share insights, earn rewards, expand your knowledge, and improve your performance.


Access your referral link from the dashboard, share your experience with Gunbot, and start earning as an affiliate through authentic introductions.

Alpaca Integration: Automate Stock and ETF Trading with Gunbot

@boekenbox
@boekenbox
Alpaca Integration: Automate Stock and ETF Trading with Gunbot

Gunbot is expanding beyond crypto. With our new integration for Alpaca, you can now automate trading strategies on U.S. stock and ETF markets, using the same tools and logic you already know from crypto trading. It’s a straightforward way to bring automated strategy execution into traditional finance, without having to learn an entirely new system.

info

This is a new integration. Some things may not work perfectly yet. We're actively tracking issues and improving stability as we go.

Why Alpaca?

We integrated Alpaca because it gives us access to traditional markets in a way that aligns with how Gunbot works. It’s a clean, developer-friendly brokerage platform with a reliable API, and it supports a wide range of U.S.-listed equities and ETFs.

For us, this isn’t about features like free trades or bells and whistles, it’s about enabling strategy-based trading in new markets, with full control and minimal friction. Alpaca allows Gunbot to connect directly to your brokerage account, execute trades based on your settings, and give you the flexibility to automate strategies outside of crypto.

What You Can Automate

The Alpaca integration opens up the full range of Gunbot's automation tools for use in traditional asset markets. This includes running multiple bots simultaneously, customizing trade logic, and reacting to market movements in real time, just like you would with crypto.

Stock and ETF Trading

You can now apply Gunbot strategies to TradFi markets like stocks and ETFs. If you're focused on large-cap stocks, sector-specific ETFs, or a mix of both, Gunbot allows you to automate your trades based on whatever logic fits your goals, trend following, DCA, rebalancing, or volatility-driven setups.

Strategy Reuse and Adaptation

If you’ve built strategies in Gunbot that work well in crypto, many of them can be adapted for traditional markets. You can also create new ones specifically designed for equities, taking into account factors like market hours, daily price ranges, or reduced volatility.

Diversification, Without Manual Overhead

This integration lets you diversify across asset classes while keeping your trading fully automated. It’s useful if you want to reduce dependence on a single market or build a more balanced portfolio, all without adding more manual work.

Setup and Control

Like with other exchanges Gunbot supports, you stay in full control of your account and funds. Gunbot connects to Alpaca via API keys, executes trades based on your chosen strategy, and doesn’t hold or move your assets.

Setup is quick:

  1. Connect your Alpaca account using API keys
  2. Configure a strategy, choose from Gunbot’s library or build your own
  3. Let Gunbot run the strategy and handle execution

Everything runs locally or on your server, just like with crypto, giving you the same security and transparency you’re used to.

Why This Matters

This is a practical way to bring Gunbot into new territory. If you’ve relied on Gunbot to automate crypto trading, Alpaca offers a bridge into traditional finance, without needing a new system, new tools, or a steep learning curve.

This does not replace crypto automation. It lets you use the same automation stack in more places. If you want to trade stocks, manage long-term ETF positions, or build a mixed portfolio, Gunbot can now handle it for you, on your terms.

Hyperliquid Integration: Trade Spot and Perps with Gunbot on DeFi

@boekenbox
@boekenbox
Hyperliquid Integration: Trade Spot and Perps with Gunbot on DeFi

We’re rolling out Gunbot support for Hyperliquid, covering both spot and perpetual swap (derivatives) trading. This is a practical step for us and for the many traders in our community who are looking to automate strategies on decentralized platforms, without giving up control of their funds or switching tools.

info

This is a new integration. Some things may not work perfectly yet. We're actively tracking issues and improving stability as we go.

Why Hyperliquid?

When we evaluate new integrations, we look for technical reliability, a good trading experience, and real utility for Gunbot users. Hyperliquid checked those boxes. It’s a decentralized exchange with fast execution, low fees, and enough liquidity to make automation viable for both spot and perps markets. If you want the exchange-specific details, see our Hyperliquid trading bot overview.

This isn’t about chasing trends. We’re integrating Hyperliquid because it works well with the way Gunbot operates, and it opens up more flexibility for traders who want to try self-hosted DeFi trading automation without compromising on the speed or efficiency they’re used to.

What You Can Do with Gunbot on Hyperliquid

Gunbot’s integration with Hyperliquid covers both market types: spot and perpetual swaps. That means you can automate trades across a wider range of strategies, all while keeping your assets in your own wallet.

Spot Trading

You can use Gunbot to automate spot trading directly on Hyperliquid. If you're running grid bots, dollar-cost averaging (DCA), or basic market making, it works just like it does on centralized exchanges, except now, you're doing it directly from your wallet, in a fully decentralized environment.

Perpetual Swap (Derivatives) Trading

We’ve also added full support for Hyperliquid’s perps markets. If you use leverage, hedge positions, or run volatility-based strategies, you can now automate all of that on-chain. This includes long/short setups, trailing stop strategies, or more advanced logic using Gunbot’s customizable strategy engine.

These tools can help traders manage risk and maintain consistency, especially in markets where conditions change quickly and manual trading becomes a bottleneck.

How to Set It Up

Setting up Gunbot for Hyperliquid is straightforward. There’s no deposit step, Gunbot interacts with Hyperliquid directly. This means your funds never leave your control, which is one of the core advantages of DeFi trading.

As always, Gunbot runs locally or on your own server, just like it does for any other exchange. Your data stays with you, and the bot trades according to your strategy parameters.

Why It Matters

We’re seeing more and more traders move at least part of their activity into DeFi, looking for transparency, better security models, or just different market opportunities. By adding support for Hyperliquid, we’re giving Gunbot users the option to automate trades in this environment without switching tools or giving up functionality.

This isn’t a replacement for centralized exchanges, but an expansion. Gunbot continues to support a broad range of CEXs, and now also offers native support for trading on Hyperliquid.

If you’ve been thinking about experimenting with decentralized trading but didn’t want to manage everything manually, this makes it easier to start. You can apply the same strategies you already use, test new ones, or adapt to different market conditions, all without giving up control of your assets.

PancakeSwap Integration: Trade DeFi on BSC with Gunbot

@boekenbox
@boekenbox
PancakeSwap Integration: Trade DeFi on BSC with Gunbot

Gunbot now supports PancakeSwap, making it easier to automate token swaps directly on Binance Smart Chain (BSC). This integration brings our trading automation toolkit to one of the most widely used decentralized exchanges, giving Gunbot users more options to run strategies in a fast, low-cost environment, without relying on centralized platforms. It is a practical extension of our DeFi trading bot automation stack.

info

This is a new integration. Some things may not work perfectly yet. We're actively tracking issues and improving stability as we go.

Why We’re Supporting PancakeSwap

PancakeSwap has earned its place as a core part of the BSC ecosystem. It offers a familiar trading experience, wide token coverage, and consistently low fees, making it a practical choice for running automated strategies.

We’re not adding PancakeSwap just because it’s popular. We added it because the infrastructure works well for what Gunbot does: reliable, rules-based automation that interacts directly with DeFi protocols. With deep liquidity and an expanding set of token pairs, PancakeSwap gives traders the flexibility to deploy bots across a wide range of assets and market conditions.

What Gunbot Can Do on PancakeSwap

With this integration, Gunbot users can now automate token swaps across BSC using the same strategies and tools already available for other platforms. Here’s what that looks like in practice:

Token Swap Automation

You can run fully automated trading strategies on PancakeSwap’s swap markets, using your own wallet. If you want to scalp smaller-cap tokens, run a DCA strategy, or apply a grid system across volatile pairs, Gunbot handles execution according to your rules, no centralized custody required.

Strategy Flexibility

Most of Gunbot’s existing strategies can be used out of the box. This includes setups for volatility trading, rebalancing, and passive market making. You can also customize your own logic to suit the kinds of tokens and pairs you want to focus on in the BSC space.

Derivatives-like Products

Some PancakeSwap markets offer instruments with use-like behavior or mechanics that mimic perps-style exposure. These can also be automated using Gunbot, giving traders access to more advanced DeFi products without manual execution.

Setup and Wallet Interaction

As with other DeFi platforms Gunbot supports, your assets stay in your wallet, and Gunbot interacts with PancakeSwap. That means:

  • You keep custody of your funds
  • Everything happens on-chain

This setup reduces counterparty risk while still giving you access to full automation.

Trading on BSC with Gunbot

BSC continues to be a high-volume chain for retail traders, and PancakeSwap remains one of its most accessible tools. By adding PancakeSwap support, we’re opening the door for more flexible and affordable trading strategies in that environment.

If you're focused on smaller tokens, looking for faster trade execution, or just want to avoid CEX friction, this integration adds one more way to trade the way you want, with automation that runs locally and keeps your assets in your control.

Gunbot Xmas 2024 Trading Tournament – Watch Live

@boekenbox
@boekenbox
Gunbot Xmas 2024 Trading Tournament \u2013 Watch Live

The Gunbot Xmas 2024 Trading Tournament is happening right now, and it’s been a blast to watch so far. Running from 27 December 2024 to 26 January 2025, this event brings together some of the most creative minds in the Gunbot community. If you love trading, bots, or just seeing clever ideas in action, this is for you.

Where to Watch?

You can catch it live right here:

Or hop over to YouTube to join the chat.

What’s This Tournament About?

This isn’t just a regular competition. It’s a chance for Gunbot traders to show off how they use the platform in all sorts of clever ways. We’re seeing strategies that range from straightforward builder setups to custom-coded logic that’s built from scratch. It’s good to see what people are building, and no two approaches are the same.

Here’s a quick overview of the kinds of strategies that are competing:

  • Builder Strategies – Using Gunbot’s built-in tools to craft smart, adaptive setups.
  • Native + Tweaked Logic – Taking a default strategy and supercharging it with personal touches through autoconfig.
  • Custom Code – Completely unique trading algorithms written specifically for this tournament.

The variety here is what makes it so cool. If you're a new trader or a seasoned dev, there’s something to learn from these setups.


What’s on the Line?

The tournament isn’t just about pride (though there’s a lot of that, too). The winner of the official category gets:

  • 1268 USDT
  • 2.06 SOL

And here’s a fun twist: the prize pool comes from the contributions of the losers from the last competition. Talk about motivation to win!

This tournament is also the finals for the Gunbot Community Cup 2024, so there’s plenty of history and rivalry behind it.


How Are Winners Picked?

The leaderboard is not based only on who makes the most money. It uses a performance metric that accounts for consistency, risk, and overall efficiency. If you’re curious about how it all works, there’s a great write-up here: Comparing Trading Bot Performance, this post got updated with the full code for the metric.


Why Tune In?

Honestly, it’s just fun to watch. The Gunbot community is a tight-knit group, and events like this are a reminder of how much creativity and innovation people bring to the table. If you're watching for inspiration or just for the drama, it’s worth checking out.

So grab a snack, drop into the livestream, and see what’s happening. Who knows? You might walk away with an idea for your next setup.

Join the livestream on YouTube and join the chat while you’re there. See you in the comments!

Gunbot REST API: What Developers Actually Need to Know

@boekenbox
@boekenbox
Gunbot REST API: What Developers Actually Need to Know

If you’ve ever messed around with coding your own trading tools, you already know the grind: endless hours wrestling with exchange APIs, debugging connectivity issues, and dealing with stale data feeds. Gunbot’s REST API steps in and says, “Hey, I’ll take care of the annoying stuff so you can focus on the fun part, building something that works the way you want.”

We've developed this API over the years and use it for our own GUI, now we've opened it up and fully documented it. The API is available in the current preview builds from v29.5.5 and above. This isn’t about reinventing the wheel; it’s about not wasting time rebuilding wheels you don’t have to. Let’s break it down.

Why Use the API?

First off, if you’re here, you probably already know Gunbot has a solid set of built-in features, including custom JS trading strategies. Those are great for a lot of scenarios, but what if you need more control over runtime? Like, say you want to hook up a machine learning model that predicts market swings or act on external triggers that aren’t baked into Gunbot’s core logic. That’s where the REST API makes sense, it lets you run your own show.

Let Gunbot Handle the Annoying Stuff

If you’ve ever tried coding a trading bot from scratch, you know how painful it is to set up reliable exchange connections. Every exchange has its quirks, rate limits, different order types, inconsistent data formats. Keeping everything synced is a headache, and it only gets worse as you add more exchanges.

Gunbot already nails this, as well as having proper charting for custom bots. When you’re working with the API, you’re building on a foundation that handles all the tedious exchange connectivity for you. It collects the data, formats it properly, and keeps everything running smoothly. You just focus on the logic.

Build What You Need In A Trading Bot

This is where things get interesting. The API isn’t just about adding bells and whistles, it’s about creating tools that match your exact needs.

Custom Algorithms on Your Schedule

Gunbot’s custom strategies work well for most setups, but they’re tied to the bot’s execution cycle and must be codes with JavaScript. If you want something that runs independently or using a different programming language, like a sentiment tracker that reacts to Twitter spikes or an ML model crunching live data, you can do that with the API. You decide how often your code runs, what inputs it needs, and what outputs it generates.

Better Risk Controls

Risk management is a big deal, but most off-the-shelf solutions only cover the basics. The API lets you build safeguards that actually make sense for your approach:

  • Adjust position sizes dynamically based on your own risk models.
  • Create early warning systems tied to market conditions, like volatility spikes or liquidity drops.
  • Automate fail-safes that kick in before things go south; pause trades, hedge positions, or close out risky ones automatically.

This isn’t “set it and forget it.” It’s active risk management matched to how you trade.

Integrate Everything

One of the coolest things about the API is how easily it integrates with other systems. You’re not locked into a single tool or workflow, you can hook Gunbot up to pretty much anything.

  • Bring in External Data: Pull in forex prices, economic indicators, or even weird niche stuff like NFT market activity or Telegram messages. If it’s got an API, you can probably use it.
  • Sync With Other Tools: Need to track trades for taxes? Want to send performance reports to a Slack channel? The API makes it easy to plug Gunbot into your existing stack.
  • Build Custom Dashboards: Let’s be real, sometimes you just want a clean interface that shows exactly what you care about and nothing else. The API lets you design your own dashboards, no compromises.

Why It’s Worth Your Time

At the end of the day, the Gunbot REST API isn’t about adding fluff to your trading setup. It’s about making your life easier as a developer. You don’t have to deal with the slog of exchange integrations or waste hours debugging stuff that shouldn’t be broken in the first place. Gunbot takes care of that so you can focus on the fun part: building tools that actually work.

If you’re the kind of person who looks at trading bots and thinks, “This is good, but I could make it better,” the API is for you. It’s not a silver bullet, but it gives you the freedom to innovate without getting bogged down in the basics.

Boost Your Gunbot Setup with exoTrader: A Custom Strategy from the Community

@boekenbox
@boekenbox
Boost Your Gunbot Setup with exoTrader: A Custom Strategy from the Community

If you've ever traded crypto, you know the markets are as unpredictable as a cat chasing a dozen laser pointers. That's where tools like Gunbot and strategies like exoTrader come in handy. Developed by @flightcommander, a fellow Gunbot enthusiast, exoTrader aims to smooth out the ups and downs of crypto trading with a smart, adaptive approach.

This isn't just another trading strategy; it's crafted by someone who's been in the trenches with the rest of us. If you're ready to see what exoTrader has to offer, keep reading for a closer look at its features, how it works, and why it might be worth adding to your setup.

info

This strategy is built by a Gunbot community member. It's an excellent showcase of how far you can take custom strategies in Gunbot.

What Is exoTrader?

exoTrader is a custom strategy script built by a Gunbot user who understands the challenges of crypto trading. Instead of spending hours staring at charts, exoTrader takes over, analyzing market conditions with a mix of technical indicators. It is a good example of Gunbot's custom strategy capabilities.

A Community Effort

exoTrader is a community project created by @flightcommander and shared with Gunbot users. It reflects how Gunbot traders share tools, test ideas, and help each other avoid avoidable mistakes.


How exoTrader Works

exoTrader doesn't just guess when to buy or sell. Instead, it uses multiple indicators and adaptive strategies to guide decisions. Here's the rundown:

  • Multi-Indicator Analysis: exoTrader relies on a combination of indicators to paint a clearer picture of market conditions. It's like getting several expert opinions before making a move.

  • Adaptive Behavior: This strategy isn't static. It evolves as the market shifts, essential for crypto, where things change faster than you can hit refresh.

  • Risk Management Tools: exoTrader isn't just about making trades, it's about protecting your capital. Break-even calculations and partial selling are part of its arsenal to minimize losses.

  • User-Friendly Interface: You don't need to be a tech wizard to use it. Visual cues and clear settings make it easy to understand, letting you focus on your trading goals.

  • Performance Metrics: Trading is all about results. exoTrader provides insights into its performance, so you can make tweaks and optimize over time.

Exotrader screenshot 1


The Technical Tools Behind exoTrader

exoTrader uses a mix of indicators to inform its decisions. Here's a quick look at each:

Wave Trend (WT)

Wave Trend measures price momentum, acting as an early warning system for trend reversals. It identifies when a trend is slowing, which often hints at an upcoming shift. It's like noticing the wind picking up right before a storm.

Relative Strength Index (RSI)

RSI is a classic indicator, gauging how quickly prices are moving. It helps identify overbought or oversold conditions, telling you when something might be overpriced or undervalued. If RSI signals "overbought!", it could be time to sell; if it says "oversold!", a buying opportunity might be at hand.

Bollinger Bands (BB)

Bollinger Bands assess price volatility by creating a range where prices typically bounce around. If prices break out of this range, it signals potential action. Think of it like someone suddenly sprinting, worth paying attention to.

Heikin-Ashi Candles

Heikin-Ashi candlesticks smooth out the noise in regular charts, making trends easier to spot. It’s like turning down the static on the radio so you can hear the song clearly, ideal for seeing if a trend is gaining or losing steam.


How exoTrader Executes Trades

With indicators analyzed, here's how exoTrader moves from insights to action:

Order Placement

exoTrader places buy or sell orders based on its analysis. You can tweak settings to align with your trading style, so it never goes rogue.

Trade Management

Once a trade is open, exoTrader actively monitors it and makes adjustments as market conditions change. No need for constant monitoring, it has your back.

Risk Management

A big part of exoTrader is its risk management. Break-even calculations help you set exit points to minimize losses. It also supports partial selling, letting you take some profit while keeping a position open for more gains if the market keeps moving in your favor.

Exotrader screenshot 2


Why Give exoTrader a Shot?

Here are some reasons why exoTrader might be worth your attention:

  • Balanced Market Analysis: By using multiple indicators, exoTrader provides a well-rounded view of the market, giving it an edge over simpler strategies.

  • Adapts to Market Changes: Crypto markets can swing dramatically, and exoTrader’s adaptive approach helps keep it effective no matter what happens.

  • Risk Management Features: With built-in tools to protect your capital, exoTrader prioritizes long-term success, not just short-term wins.

  • Community Support: Created by a Gunbot community member, exoTrader is supported by other users, offering help, updates, and discussions, trading is better when you’re part of a team.


Getting Started with exoTrader

Ready to try exoTrader? Here's how to set it up:

1. Install and Set Up Gunbot

Make sure Gunbot is installed and connected to your preferred exchange. If needed, update to the latest version for full compatibility.

2. Get an exoTrader License

Find exoTrader, and a live demo, on the Gunbot Dev Community: https://www.gunbot.com/devcommunity/quantaexotrader/

3. Select exoTrader as Your Strategy

When configuring a trading pair in Gunbot, choose the exoTrader strategy from the list.

4. Adjust Settings

Everyone has different trading goals, so customize the settings to suit your risk tolerance and style. Experiment with trade size, order types, and indicator parameters to find what works for you.

5. Start Trading

With everything set, let Gunbot and exoTrader do the work. Keep an eye on early performance, and adjust as necessary.


Final Thoughts

If you're looking to automate your crypto trading with Gunbot, exoTrader is worth checking out. It uses multiple indicators, adapts to changing markets, and has risk management features to help keep your trading smooth. If you feel this strategy fits your trading style, it could be a great match.

Interested in seeing if exoTrader can make a difference for you? Check it out and join the conversation with other Gunbot users on Telegram.

Comparing Trading Bot performance with the 'Daily Realized PnL per $1k' Metric

@boekenbox
@boekenbox
Comparing Trading Bot performance with the 'Daily Realized PnL per $1k' Metric

For everyone using a trading bot, the ability to optimize strategies and fine-tune their trading approach is important. One of the metrics that can help with this is Daily Realized PnL per $1k. If you've checked out the 'Compare Pairs' table on the main dashboard on one of the latest Gunbot alpha builds, you've probably noticed this new metric already. But what does it mean, and why is it useful?

In this post, we'll look at how this metric works, why it's useful for comparing different trading pairs and strategies, and how you can use it for better trading decisions. Let’s go straight to the math that makes this metric useful.

What is "Daily Realized PnL per $1k"?

Daily Realized PnL per $1k tells you how much profit or loss you're making each day for every $1,000 of capital invested in a specific trading strategy or pair. Unlike abstract metrics like percentages or cumulative profit and loss, this value gives you a tangible dollar value that makes comparing different pairs and strategies much easier.

The goal here is to provide a standardized view of your trading performance. By converting performance into a common measure based on a $1,000 capital base, this metric allows traders to get a clear, apples-to-apples comparison between different pairs and strategies, helping you understand what's really working and what isn't.

Breaking Down the Metric

Let’s break this down step-by-step:

  • Daily Realized PnL: The profit or loss made on trades that have already been closed, calculated daily. The "realized" part means that it only includes the profit or loss from trades that are completed, not the potential value from open trades. This gives you a realistic snapshot of your trading performance based on actual outcomes.
  • Per $1,000: This means we normalize the results to represent the profit or loss for every $1,000 invested. This normalization allows for easy comparisons, even if different trading strategies have varying capital allocations or operate with different base amounts. It’s an effective way to get to the core of how well your capital is working for you.

With Daily Realized PnL per $1k, you get a value that can be easily compared across different trading strategies, irrespective of the initial investment amount or market volatility. This makes it a handy metric for evaluating efficiency and performance without getting bogged down by the complexities of various capital inputs.

How is This Metric Calculated?

The calculation is based on multiple formulas that standardize the performance:

  • Average Capital Utilized:

    Average Capital Utilized = Total Weighted Capital Utilized / Total Duration

  • Effective Capital Utilized:

    Effective Capital Utilized = (Average Capital Utilized + Maximum Capital Utilized) / 2

  • Total Duration in Days:

    Total Duration in Days = Total Duration from first to last trade. This value is capped to use full days only, no fractional values are used.

  • Adjusted Daily Net Profit:

    Adjusted Daily Net Profit = Total Net Profit / Total Duration in Days

  • Adjusted Daily Net Profit per $1,000:

    Daily Realized PnL per $1k = (Adjusted Daily Net Profit / Effective Capital Utilized) * 1000

Where:

  • Total Weighted Capital Utilized: The cumulative amount of capital utilized during trading, weighted by the time it was held.
  • Total Duration: The total time period of trading activities, in days.
  • Daily Net Profit: The sum of profits from closed trades over the day. This value only includes realized gains and losses, providing an accurate picture of true profitability.
  • Effective Capital Utilized: This represents the average amount of capital actively used during trading and takes into account both the average and maximum capital that was utilized throughout the trading period. By using this figure, we account for capital fluctuations and provide a balanced view of efficiency.

This set of formulas allows you to get a consistent dollar value for your performance, making it easy to compare the efficiency of different trading strategies, even if the actual capital involved varies.

Example Calculation

Let’s walk through a quick example to make it clearer. Suppose your Daily Net Profit from closed trades is $50, and during the day, your Effective Capital Utilized is $5,000. Plugging in these numbers:

Daily Realized PnL per $1k = (50 / 5000) * 1000 = 10

This means you’re making $10 per $1,000 of capital used, per day. This straightforward calculation makes it easy to see how well your strategy is performing, without dealing with abstract percentages or complex ratios.

Why is This Metric Useful for Traders?

1. Standardization Across Strategies

If you're trading multiple pairs or running different strategies, they can have widely varying performance metrics. For instance, trading a highly volatile pair like BTC/USDT might yield different returns compared to a less volatile pair like LTC/USDT. But the question is, how can you compare them effectively?

That’s where Daily Realized PnL per $1k becomes useful. It standardizes performance into a common unit that is relatable. Instead of comparing abstract performance percentages, you can see how much profit or loss each strategy would have generated if you had invested $1,000. This standardization is important when you want to choose the best-performing pair or strategy without being confused by differences in investment amounts, risk profiles, or market volatility.

2. Realistic Money Value

Many traders find it hard to wrap their heads around percentages or highly abstract metrics - they don’t always feel real. However, when you see a value like “$8 per day per $1,000,” it’s a lot more intuitive. It lets you understand the performance of a strategy in a practical, tangible way. You can immediately gauge how well a strategy might scale with more capital or whether it’s underperforming compared to others.

For example, if Strategy A yields $15/day per $1k and Strategy B yields $8/day per $1k, it’s easy to see which one is more efficient in generating profits. This helps make faster decisions when adjusting your trading approach.

3. Capital Efficiency Analysis

One key insight offered by this metric is understanding how effectively your capital is being used. The function that calculates Daily Realized PnL per $1k takes into account both the average capital utilized and the maximum capital utilized throughout your trading period. This means the metric shows how much profit you made and how efficiently you used the available capital to make it.

For example, if you’re using $10,000 but only making a small profit each day, your Daily Realized PnL per $1k will reflect that inefficiency. On the other hand, if you’re making high returns on smaller capital allocations, this metric will highlight that strength.

This efficiency measure is important when you’re balancing your risk-reward ratio. For instance, if you find that Strategy C has a high daily PnL per $1k but consistently ties up a significant amount of capital, you may want to reconsider if it's the best use of your funds or if other strategies could offer better capital efficiency. It helps you decide whether reallocating your capital might yield better results overall.

Practical Example: Comparing Strategies

Let’s walk through an example. Imagine you’re comparing two trading strategies:

  • Strategy A:

    • Average capital utilized: $5,000
    • Daily net profit: $50
  • Strategy B:

    • Average capital utilized: $2,000
    • Daily net profit: $25

Without standardization, it looks like Strategy A is more profitable. But let's use Daily Realized PnL per $1k to really see the difference:

  • Strategy A: (50 / 5000) * 1000 = 10 per day per $1k
  • Strategy B: (25 / 2000) * 1000 = 12.50 per day per $1k

In this case, Strategy B is more efficient at generating profit relative to the capital invested, despite having a lower absolute profit. By using this metric, you can immediately see which strategy is giving you better returns on a per-$1,000 basis, helping you make better decisions on where to allocate your funds.

Another scenario might involve different timeframes or trading styles, such as swing trading versus day trading. This metric is still valuable for comparing these differing styles on a level playing field. For example, even if a swing trade takes longer, you can normalize the profit generated to see how it measures up against quicker, higher-frequency trades in terms of profitability per $1,000 of capital utilized.

Where to Find "Daily Realized PnL per $1k" in Gunbot

You can find the Daily Realized PnL per $1k metric in the 'Compare Pairs' table on the main dashboard of the Gunbot interface. This table helps you evaluate how your different trading pairs perform in real time.

When you look at the 'Compare Pairs' table, you’ll see a breakdown of all your active pairs along with various performance indicators. The Daily Realized PnL / $1k column provides that tangible dollar-value perspective, allowing you to see which pairs are most effectively generating profits relative to their allocated capital. It takes away the guesswork and lets you make evidence-based decisions that are rooted in actual performance metrics. You can also compare real Gunbot performance against live shared runs.

How to Use This Metric for Better Decision-Making

  • Identify Strong Performers: Use Daily Realized PnL per $1k to highlight which trading pairs or strategies are making the most profit on a standardized capital basis. This makes it easy to spot which strategies are outperforming the rest.
  • Reallocate Capital: Consider shifting your capital towards strategies that show consistently high Daily Realized PnL per $1k. This helps keep your money working as efficiently as possible. Reallocating to strong performers means maximizing your portfolio's potential.
  • Track Over Time: Pay attention to how the Daily Realized PnL per $1k changes over time. Sudden drops might indicate a strategy that needs attention or adjustments. It also provides a way to evaluate changes you make to a strategy and their impact over time.

For instance, if you notice that your Daily Realized PnL per $1k has been decreasing for a particular trading pair, this could indicate a shift in market conditions, inefficiency in your current approach, or the need to reconfigure your trading settings. By tracking these changes, you gain insights that help you adapt and stay ahead.

Common Challenges with Traditional Trading Metrics

If you've spent any time trading or looking at crypto trading bots, you know that the metrics people use to measure success aren’t always as straightforward as they seem. We’ve got staples like Return on Investment (ROI), Sharpe Ratio, Max Drawdown, Win Rate, and Profit Factor. Sure, they provide insight, but they can also be pretty confusing. Often, these metrics don’t tell the whole story, and if you're not careful, you might end up making decisions based on half the picture. Let’s break down some of these metrics and see why the Daily Realized PnL per $1k might be a more user-friendly option.

1. Return on Investment (ROI)

  • Time Frame Confusion: ROI gives you a percentage return, but it doesn’t tell you over what period that return happened. So, if you see a 10% ROI, was that from a single month or a whole year? Without a timeline, it’s hard to gauge how fast or slow things are really moving.
  • Capital Efficiency Ambiguity: ROI doesn’t say much about how well the capital was used during that time. For example, did the strategy tie up a ton of capital for a small return? When using crypto trading bots, this could mean missing out on more efficient opportunities.

Example:

Imagine Trader A and Trader B both report a 15% ROI. Trader A achieved this in six months, while Trader B took two years. On the surface, they look the same, but with the time frame in mind, Trader A is clearly more efficient. It’s these kinds of details that get lost with ROI.

2. Sharpe Ratio

  • Complex Calculations: The Sharpe Ratio gets a bit math-heavy, and for most of us, understanding the deeper statistical stuff isn’t exactly easy. Especially if you're juggling multiple automated trading strategies, it can get overwhelming.
  • Volatility Misinterpretation: A lower Sharpe Ratio might make you think a strategy’s risky, even if it’s actually right in line with your own risk tolerance. This number alone doesn’t really tell the whole story.

Example:

Say you’re comparing two strategies with Sharpe Ratios of 1.2 and 0.8. It seems like 1.2 is better, but without knowing the details, like what kind of volatility you’re looking at, it’s hard to decide which is actually the right fit for you.

3. Max Drawdown

  • Overemphasis on Worst Cases: Max Drawdown tells you the worst loss from a peak, which can be intimidating. Sometimes, it’s just a blip on the radar, but this number can scare traders away from potentially solid strategies.
  • Lack of Frequency Insight: Max Drawdown doesn’t tell you how often these big drops happen. So, a strategy could have one bad moment or it could have them all the time, but you won’t know from this number alone.

Example:

Take a strategy with a max drawdown of 20%. That sounds risky, right? But what if this drawdown happened only once in five years and the strategy recovered quickly? You might miss out on a strong performer if you just look at this metric without more context.

4. Win Rate

  • False Sense of Security: High win rates can be deceiving. Just because a strategy wins often doesn’t mean it’s profitable. Big losses can easily wipe out those small wins.
  • Neglecting Profit-Loss Ratio: The size of wins versus losses matters, but win rate alone doesn’t give you that context. You could have a high win rate but still end up losing money if your losses are big enough.

Example:

A strategy with a 70% win rate might sound like a dream, but if the average loss is three times the average win, you’re in trouble. It’s easy to focus on the win rate and forget about the bigger picture.

5. Profit Factor

  • Abstract Ratio: Profit Factor is the ratio of gross profits to gross losses. For people wanting concrete answers, this can feel a bit too abstract and not immediately useful.
  • Impact of Outliers: Sometimes, one big win or loss can skew this number. Without understanding what’s behind it, users might get the wrong impression of how stable a strategy is.

Example:

A Profit Factor of 1.5 suggests profitability, but if it’s based on just one big win, it might not reflect the strategy’s typical performance. It’s these outliers that can really distort things.

Why "Daily Realized PnL per $1k" Is Easier to Work With

It’s more down-to-earth, and provides comparable data after a relatively short time of running a strategy. Do note that results get more realistic once a trading pair has seen some serious moves downwards, and significant capital got invested - because this allows the metric to factor in a more realistic use of capital.

  1. Straightforward Measurement:

    • It’s in dollars, per $1,000 invested daily. Simple. You know exactly how much you’re making or losing each day, without any complicated math.
  2. Time Frame Clarity:

    • By reporting daily, there’s no guessing about the time frame. You can see how fast the strategy’s moving and get a real sense of its performance.
  3. Capital Efficiency Visibility:

    • This metric standardizes performance per $1,000, so you can compare strategies without worrying about the total capital involved. It makes things more apples-to-apples.
  4. Focus on Realized Gains:

    • Only closed trades are considered, so you’re looking at actual profits or losses. This avoids the ups and downs of unrealized positions, giving you a clear picture.

As JS function

Updated 08/29/2025

Updated to support futures short positions. Handles negative order amounts, uses signed position size, absolute exposure deltas for capital utilization, and always accrues realized PnL.

function returnOnThousand(orders) {
if (!Array.isArray(orders) || orders.length === 0) {
return 0
}

// Sort orders by time to ensure chronological order
orders.sort((a, b) => a.time - b.time);

// Initialize variables
let positionSize = 0; // signed: long > 0, short < 0
let capitalUtilized = 0; // notional exposure tied up in open positions
let totalNetProfit = 0; // realized PnL
let totalWeightedCapitalUtilized = 0; // Sum of (Capital Utilized * Duration)
let totalDuration = 0; // Total time in milliseconds
let previousTime = orders[0].time; // Time of the first order
let maxCapitalUtilized = 0; // Maximum capital utilized

for (let i = 0; i < orders.length; i++) {
const order = orders[i];
const currentTime = order.time;

// Calculate duration since the previous order
const duration = currentTime - previousTime;

// Accumulate the weighted capital utilized
totalWeightedCapitalUtilized += capitalUtilized * duration;

// Accumulate total duration
totalDuration += duration;

// Update previousTime for the next iteration
previousTime = currentTime;

// Extract and normalize fields
const signedAmount = Number(order.amount) || 0; // may be negative for shorts on some exchanges
const qty = Math.abs(signedAmount);
const rate = Number(order.rate) || 0;
const pnl = Number(order.pnl) || 0;

// Always add realized PnL regardless of side
if (Number.isFinite(pnl)) {
totalNetProfit += pnl;
}

// Update signed position: buy increases, sell decreases
const side = order.type === "buy" ? 1 : -1;
const prevAbsPos = Math.abs(positionSize);
positionSize += side * qty;
const newAbsPos = Math.abs(positionSize);

// Update capital utilized by change in absolute exposure, priced at trade rate
const deltaExposureUnits = newAbsPos - prevAbsPos; // positive if exposure increased
capitalUtilized += deltaExposureUnits * rate;

// Ensure capitalUtilized doesn't go negative due to rounding errors
capitalUtilized = Math.max(capitalUtilized, 0);

// Update the maximum capital utilized
maxCapitalUtilized = Math.max(maxCapitalUtilized, capitalUtilized);
}

// Handle the last time interval (assuming capital utilized remains the same after the last order)
const endTime = orders[orders.length - 1].time;
const finalDuration = endTime - previousTime;
totalWeightedCapitalUtilized += capitalUtilized * finalDuration;
totalDuration += finalDuration;

// Calculate average capital utilized
const averageCapitalUtilized = totalWeightedCapitalUtilized / (totalDuration || 1);

// Effective Capital Utilized: incorporate both average and max capital utilized
const effectiveCapitalUtilized = (averageCapitalUtilized + maxCapitalUtilized) / 2;

// Convert totalDuration from milliseconds to days
const millisecondsInDay = 24 * 60 * 60 * 1000;
const totalDurationInDays = Math.ceil(totalDuration / millisecondsInDay) || 1;

// Adjusted Daily Net Profit
const adjustedDailyNetProfit = totalNetProfit / totalDurationInDays;

// Adjusted Daily Net Profit per 1,000 of Effective Capital Utilized
const adjustedDailyNetProfitPerThousand =
effectiveCapitalUtilized > 0
? (adjustedDailyNetProfit / effectiveCapitalUtilized) * 1000
: 0;

const finalResult = adjustedDailyNetProfitPerThousand.toFixed(2);

// Return the calculated metrics
return !isNaN(finalResult) ? finalResult : 0
}

Conclusion

The Daily Realized PnL per $1k metric helps you make sense of trading bot results, especially when you work with multiple pairs and strategies. By converting abstract performance into a concrete dollar value, it makes comparisons much clearer, helps identify more efficient strategies, and ultimately allows you to make smarter trading decisions.

It also helps you track capital efficiency, so you can see whether profits are coming from efficient capital use or from tying up too much money. It’s about maximizing returns while keeping your capital working effectively.

Next time you’re in the Gunbot dashboard, take a closer look at the 'Compare Pairs' table. Use the Daily Realized PnL / $1k column to optimize your strategies and check that you’re getting strong returns from your capital. New or experienced, you can use this metric to make more informed decisions. When you are ready to scale from testing to production, compare Gunbot plans and pick what fits your setup.

Visual Studio Code extension for custom strategy devs

@boekenbox
@boekenbox
Visual Studio Code extension for custom strategy devs

We've built a new Gunbot Custom Trading Strategy Snippets extension for Visual Studio Code. It provides a collection of pre-built snippets to make coding your trading strategies smoother and easier, minimizing the need to repeatedly check documentation for how methods work and which data is available. This extension helps you quickly access methods and data points that Gunbot supports.

Key Features of the Gunbot Snippet Extension

The Gunbot Custom Trading Strategy Snippets extension includes a variety of ready-made JavaScript snippets specifically designed for Gunbot strategy development. Here’s what it offers:

  • Immediate access to Gunbot methods: Save time and avoid manual lookups by inserting common trading commands like buyMarket() or sellLimit() directly from the snippet library.
  • Snippets for technical indicators: Easily include popular technical indicators, such as Moving Averages or RSI, into your strategy without needing to write the logic from scratch.
  • Integration with live data points: Snippets are designed to work with live data points supported by Gunbot, which can simplify integrating real-time market data into your strategies.
  • Snippet sidebar for easy browsing: A dedicated sidebar in VS Code helps you quickly locate and insert the right snippets for your strategy.

Simplifying Gunbot Strategy Development

For developers working on custom Gunbot strategies, this thing is a timesaver, but above all it reduces the hassle of having to frequently reference documentation to remember method names or how to call certain data points. With the snippets readily available, you can avoid interruptions to your workflow and focus on fine-tuning your strategy's logic.

  • Streamlined Prototyping: The snippets library allows you to rapidly set up key parts of a strategy. Instead of writing common methods manually, you can insert a snippet, make small customizations, and move forward faster.
  • Reducing Documentation Overhead: One of the main advantages of the extension is that it reduces the need to look up method documentation frequently, which can help developers stay focused on their code.

vscode extension

How to Install the Extension

Follow these simple steps to install the Gunbot Custom Trading Strategy Snippets extension:

  1. Open Visual Studio Code and navigate to the Extensions view (Ctrl + Shift + X).
  2. In the search bar, type "Gunbot Custom Trading Strategy Snippets."
  3. Click Install.

Once the extension is installed, you can start using the snippets in any JavaScript file related to your Gunbot strategies.

Example Usage of Snippets

Let’s look at an example. Suppose you want to place a limit sell within your Gunbot strategy and do so using a promise chain. Normally, you'd need to reference the method name and its parameters in the documentation, and remember how to do the .then chain. With the extension, you just type the prefix sellLimit, select the then variant and move on.

// Example of placing a limit buy order in Gunbot, in this case with a chained .then and .catch
gb.method.sellLimit(amount, price, gb.data.pairName, gb.data.exchangeName)
.then(response => {
console.log('Limit Sell Success:', response);
})
.catch(error => {
console.error('Limit Sell Error:', error);
});

This streamlines your coding experience and reduces potential errors from mistyped methods or forgotten parameters.

Contribute to the Snippets Collection

This extension is open source, and contributions are welcome! If you have your own snippets that could benefit other Gunbot developers, consider sharing them with the community. Here's how you can contribute:

  1. Fork the repository on GitHub.
  2. Add your snippets in the json file with snippets and their metadata.
  3. Submit a pull request to propose your addition.

Your contributions will help expand the snippet library and make it an even more valuable resource for the Gunbot development community.

Conclusion

The Gunbot Custom Trading Strategy Snippets extension is a useful tool for any developer working with Gunbot custom strategies. With instant access to key methods, technical indicators, and live data points, it helps simplify the trading strategy development process and reduces the need to constantly reference external documentation. If you're developing Gunbot strategies, this extension is a great addition to your toolkit.

Install the Extension from the VS Code Marketplace

Launching our Backtesting Archive

@boekenbox
@boekenbox
Launching our Backtesting Archive

We’re excited to announce the launch of the backtesting archive on Gunbot.com! This tool is designed for traders who want to optimize their Gunbot strategies by analyzing detailed historical trading data. With the backtesting archive, you can look closely at backtest reports, compare different strategies, and gain valuable insights to improve your trading methods.

Easy-to-Use Viewer for Backtest Reports

The backtesting archive provides a dedicated viewer for Gunbot-generated backtest reports. This intuitive interface makes it easy to analyze your backtesting results in detail. Each backtest includes a download option that has all needed settings to run your crypto trading bot in the exact same way.

Chart viewer

Visualize and Compare Results

Our detailed charts allow you to visualize all your backtesting results at a glance. The overview table lets you easily compare performance metrics across various strategies and timeframes to identify what works best.

Overview viewer

Contribute to the Backtesting Archive

Join the Community Effort

The Gunbot backtesting archive will thrive on contributions from traders like you. By sharing your backtesting results, you help build a richer, more diverse database that benefits the entire community.

How to Submit Your Data

Contributing is simple. You can submit your backtesting results in two ways:

Each submission goes through a review process for quality and accuracy. While it might take some time, your valuable insights will soon be part of this collective resource.

What’s Inside a Backtest Report?

Here’s a sneak peek at the kind of data you can look at in the backtesting archive:

  • Pair: BTC-SOL
  • Exchange: Binance
  • Fee Percentage: 0.1%
  • Time Period: From June 7, 2024, to February 24, 2056

Key Performance Metrics

  • Starting Funds: 0.1 BTC
  • Realized PnL: 0.003594 BTC
  • ROI: 3.59%
  • Sharpe Ratio: 0.56
  • Sortino Ratio: 9.72
  • Realized Profit: 0.005393 BTC
  • Realized Loss: -0.001798 BTC
  • Average PnL %: 1.78%
  • Average Profit %: 1.93%
  • Average Loss %: -5.66%
  • Volume: 0.663889 BTC
  • Buy Volume: 0.339088 BTC
  • Sell Volume: 0.324801 BTC
  • Buys: 47
  • Sells: 51
  • Trades with Profit: 50
  • Trades with Loss: 1
  • Fees Paid: 0.000663 BTC

Strategy Settings

Review the detailed settings used in backtests, such as:

  • Initial Funds: 0.1 BTC
  • Buy Method: channelmaestro
  • Sell Method: channelmaestro
  • Profit Target %: 7.5
  • Use Auto Gain: true
  • Buy Enabled: true
  • Sell Enabled: true

These settings allow you to see exactly how strategies are configured and how they perform under different conditions.

Bonus: Guide to Mass Backtest Runs with Gunbot on Linux

This guide will help you set up and run a mass backtest script for Gunbot on a Linux system.

Prerequisites

  1. Gunbot: Make sure you have Gunbot installed and configured.
  2. Python 3.10: Make sure Python 3.10 is installed.
  3. Required Python Libraries: Install the necessary Python libraries by running:
    pip install subprocess time os signal shutil json re itertools multiprocessing

Script Setup

  1. Download the Script: Save the provided script as mass_backtest.py in your working directory.
  2. Set Up Working Directories: Make sure you have the following directory structure:
    /home/user/dev/backtesting-runs/
    ├── 1/
    ├── 2/
    └── 3/
    Each directory should contain:
    • A complete Gunbot installation
    • A unique GUI port set for each instance
    • A config.js file with "BACKFESTER": true in the bot section and preconfigured starting balances for simulator.

Configuration

Modify Paths

Adjust the paths in the script if your directory structure is different.

Trading Pairs and Months

Customize the trading_pairs and months variables according to your needs.

Pair Overrides and Trading Limit

The script will override the configuration for each pair for proper backtesting. It updates:

  • BF_SINCE and BF_UNTIL: The start and end timestamps for the backtest period.
  • TRADING_LIMIT: Calculated as the available balance divided by 30.
  • MIN_VOLUME_TO_SELL: Set as 30% of the trading limit.
  • Other strategy-specific settings.

These overrides keep each backtest on consistent parameters.

Using RAM Disk

Importance of RAM Disk

Using a RAM disk can significantly speed up the backtesting process by reducing read/write times. The script copies necessary files to the RAM disk, performs the backtest, and then copies the results back to the main storage.

Check Available RAM Disk Volume

Before running the script, make sure you have sufficient space in your RAM disk (/dev/shm). Check the available volume with the following command:

df -h /dev/shm

Make sure you have enough space to handle the data for your backtests. If necessary, adjust your system's RAM disk size in your system settings.

Running the Script

  1. Navigate to the Script Directory:
    cd /path/to/your/script
  2. Run the Script:
    python3 mass_backtest.py

Script Workflow

Initial Setup

The script starts by clearing any existing temporary backtesting directories in the RAM disk (/dev/shm). It then loads or initializes the task queue with all trading pairs and date ranges.

Managing Tasks

The task queue manages which trading pairs and date ranges need to be processed. The script uses a worker directory queue to handle different working directories where backtests will be run.

Running Backtests

The script launches multiple worker processes to perform backtests concurrently. Each worker:

  • Copies necessary files to the RAM disk
  • Executes the backtest using Gunbot
  • Monitors the output for completion
  • Terminates the process upon completion
  • Copies the backtesting results back to the main storage
  • Marks the task as done and updates the completed tasks file

Completion

The script waits for all worker processes to finish. It periodically saves the state of the task queue to a file, allowing you to resume if the script is interrupted.

Increasing Process Count

To increase the number of processes running backtests concurrently:

  1. Create Enough Working Directories:

    • You need one working directory per process. For example, if you want to run 5 processes concurrently, you should have 5 working directories:
      /home/pim/dev/backtesting-runs/
      ├── 1/
      ├── 2/
      ├── 3/
      ├── 4/
      └── 5/
    • Each directory must have a complete Gunbot installation with a unique GUI port and a config.js file.
  2. Update the Number of Processes:

    • Open the mass_backtest.py script.
    • Locate the section where the processes are started:
      processes = []
      for _ in range(3): # 3 processes
      p = Process(target=worker, args=(task_queue, working_directory_queue))
      p.start()
      processes.append(p)
    • Change the number 3 to the desired number of processes. For example, to run 5 processes concurrently, change it to:
      processes = []
      for _ in range(5): # 5 processes
      p = Process(target=worker, args=(task_queue, working_directory_queue))
      p.start()
      processes.append(p)
  3. Update the Working Directories List:

    • Update the working_directories list at the beginning of the script to match the number of processes. For example, if you want to run 5 processes, you need 5 working directories. You should update the range to range(1, 6) to match the folder count:
      working_directories = [os.path.join(base_working_directory, str(i)) for i in range(1, 6)] # 5 working directories
    • The number 6 here is one more than the actual count because the range function in Python is inclusive of the start value but exclusive of the end value. So, range(1, 6) creates a list from 1 to 5.

Considerations

  • System Resources: Make sure your system has enough CPU and RAM to handle the increased process count. Running too many processes can lead to resource contention and slow down the overall performance.
  • RAM Disk Space: Verify that your RAM disk (/dev/shm) has enough space to accommodate the additional processes.

Monitoring Progress

  • Console Logs: The script prints logs to the console, showing the progress of each backtest.
  • Completion Reports: Backtesting reports are saved back to the respective working directories.

Script source

mass_backtest.py

import subprocess
import time
import os
import signal
import shutil
import json
import re
from multiprocessing import Process, Queue, current_process
from queue import Empty

# Define the base working directory
base_working_directory = '/home/user/dev/backtesting-runs'
working_directories = [os.path.join(base_working_directory, str(i)) for i in range(1, 4)] # 3 working directories
command = ['./gunthy-linux']

# Static list of pairs and timeframes to use
trading_pairs = [
"USDT-BTC", "USDT-ETH", "USDT-BNB", "USDT-SOL", "USDT-XRP", "USDT-DOGE", "USDT-ADA", "USDT-TRX",
"USDT-AVAX", "USDT-SHIB", "USDT-DOT", "USDT-LINK", "USDT-BCH", "USDT-NEAR", "USDT-MATIC", "USDT-LTC",
"USDT-UNI", "USDT-PEPE", "BTC-ETH", "BTC-BNB", "BTC-SOL", "BTC-XRP", "BTC-DOGE", "BTC-ADA", "BTC-TRX",
"BTC-AVAX", "BTC-DOT", "BTC-LINK", "BTC-BCH", "BTC-NEAR", "BTC-MATIC", "BTC-LTC", "BTC-UNI", "BNB-SOL",
"BNB-XRP", "BNB-ADA", "BNB-TRX", "BNB-AVAX", "BNB-DOT", "BNB-LINK", "BNB-BCH", "BNB-NEAR", "BNB-MATIC",
"BNB-LTC", "ETH-BNB", "ETH-XRP", "ETH-SOL", "ETH-ADA", "ETH-TRX", "ETH-AVAX"
]

months = [
(1704067200000, 1706659199000), # Jan 2024
(1706659200000, 1709251199000), # Feb 2024
(1709251200000, 1711843199000), # Mar 2024
(1711843200000, 1714435199000), # Apr 2024
(1714435200000, 1717027199000), # May 2024
(1717027200000, 1719619199000), # Jun 2024
]

def transform_pair(pair):
if pair.endswith('BTC'):
return f"BTC-{pair[:-3]}"
elif pair.endswith('ETH'):
return f"ETH-{pair[:-3]}"
elif pair.endswith('USDT'):
return f"USDT-{pair[:-4]}"
elif pair.endswith('BNB'):
return f"BNB-{pair[:-3]}"
return pair

def clear_ramdisk():
ramdisk_base = '/dev/shm/'
for item in os.listdir(ramdisk_base):
item_path = os.path.join(ramdisk_base, item)
if os.path.isdir(item_path) and item.startswith('backtesting_'):
shutil.rmtree(item_path)
print(f"Cleared RAM disk directory: {item_path}")

def delete_folders(working_directory):
json_folder = os.path.join(working_directory, 'json')
backtesting_folder = os.path.join(working_directory, 'backtesting')

if os.path.exists(json_folder):
shutil.rmtree(json_folder)
print(f"Deleted folder: {json_folder}")
if os.path.exists(backtesting_folder):
shutil.rmtree(backtesting_folder)
print(f"Deleted folder: {backtesting_folder}")

def read_config(working_directory):
config_path = os.path.join(working_directory, 'config.js')
with open(config_path, 'r') as file:
config_data = file.read()
config_data = re.sub(r'^module\.exports\s*=\s*', '', config_data)
config_data = re.sub(r';\s*$', '', config_data)
return json.loads(config_data)

def write_config(config, working_directory):
config_path = os.path.join(working_directory, 'config.js')
config_data = json.dumps(config, indent=4)
with open(config_path, 'w') as file:
file.write(config_data)

def ensure_pair_config(config, pair):
exchange = 'binance'
if exchange not in config['pairs']:
config['pairs'][exchange] = {}

config['pairs'][exchange] = {}
if pair not in config['pairs'][exchange]:
config['pairs'][exchange][pair] = {
"strategy": "channelmaestro",
"enabled": True,
"override": {
"INITIAL_FUNDS": "500",
"BUY_METHOD": "channelmaestro",
"SELL_METHOD": "channelmaestro",
"COMPOUND_RATIO": "1",
"COMPOUND_PROFITS_SINCE": "0",
"USE_STOP_AFTER_PROFIT": False,
"PROFIT_TARGET_PCT": "7.5",
"USE_AUTO_GAIN": True,
"GAIN_PARTIAL": "0.5",
"GAIN": "2",
"BUY_ENABLED": True,
"SELL_ENABLED": True,
"STOP_AFTER_SELL": False,
"MIN_VOLUME_TO_SELL": 10,
"MAX_INVESTMENT": "999999999999999",
"PERIOD": "5",
"PERIOD_MEDIUM": "15",
"PERIOD_LONG": "30",
"IGNORE_TRADES_BEFORE": "0",
"BF_SINCE": 0,
"BF_UNTIL": 0,
"USE_EXPERIMENTS": False
}
}

def update_config(config, pair, start, end):
if not config['bot']['BACKFESTER']:
config['bot']['BACKFESTER'] = True

base, quote = pair.split('-')[0], pair.split('-')[1]
balance = float(config['bot']['simulatorBalances']['binance'][base])

trading_limit = balance / 30
min_volume_to_sell = trading_limit * 0.3

ensure_pair_config(config, pair)

config['pairs']['binance'][pair]['override']['BF_SINCE'] = start
config['pairs']['binance'][pair]['override']['BF_UNTIL'] = end
config['pairs']['binance'][pair]['override']['TRADING_LIMIT'] = trading_limit
config['pairs']['binance'][pair]['override']['MIN_VOLUME_TO_SELL'] = min_volume_to_sell
config['pairs']['binance'][pair]['override']['INITIAL_FUNDS'] = balance

def copy_to_ram(working_directory, ram_directory):
print(f"Copying {working_directory} to {ram_directory}")
if os.path.exists(ram_directory):
shutil.rmtree(ram_directory)
shutil.copytree(working_directory, ram_directory)

def copy_backtesting_reports_from_ram(working_directory, ram_directory):
print(f"Copying backtestingReports from {ram_directory} back to {working_directory}")
ram_backtesting_reports = os.path.join(ram_directory, 'backtestingReports')
main_backtesting_reports = os.path.join(working_directory, 'backtestingReports')
if os.path.exists(ram_backtesting_reports):
if os.path.exists(main_backtesting_reports):
shutil.rmtree(main_backtesting_reports)
shutil.copytree(ram_backtesting_reports, main_backtesting_reports)

def launch_and_kill_process(command, working_directory, ram_directory):
copy_to_ram(working_directory, ram_directory)
process = subprocess.Popen(command, cwd=ram_directory, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
print(f"Process {process.pid} started in {ram_directory}.")

last_output_time = time.time()

try:
while True:
output = process.stdout.readline()
if output == '' and process.poll() is not None:
break
if output:
last_output_time = time.time()
print(output.strip())
if 'Backtesting report created successfully' in output:
break
if 'Backtester completed the job: your data will be available soon on your GUI' in output:
time.sleep(3)
break
if time.time() - last_output_time > 8:
print(f"No log output for 8 seconds, restarting process {process.pid}")
os.kill(process.pid, signal.SIGTERM)
process.wait()
process = subprocess.Popen(command, cwd=ram_directory, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
last_output_time = time.time()
finally:
if process.poll() is None:
os.kill(process.pid, signal.SIGTERM)
print(f"Process {process.pid} in {ram_directory} has been terminated.")
copy_backtesting_reports_from_ram(working_directory, ram_directory)
delete_folders(ram_directory)

def run_backtest(pair, start, end, working_directory, ram_directory, queue):
config = read_config(working_directory)
update_config(config, pair, start, end)
write_config(config, working_directory)
launch_and_kill_process(command, working_directory, ram_directory)
time.sleep(1) # Wait for 1 second before the next run
queue.put(working_directory) # Indicate that this working directory is free

def save_queue(task_queue, filename='task_queue.json'):
with open(filename, 'w') as file:
tasks = []
while not task_queue.empty():
tasks.append(task_queue.get())
json.dump(tasks, file)
for task in tasks:
task_queue.put(task)

def load_queue(filename='task_queue.json'):
task_queue = Queue()
if os.path.exists(filename):
with open(filename, 'r') as file:
tasks = json.load(file)
for task in tasks:
task_queue.put(tuple(task))
else:
for pair in trading_pairs:
for start, end in months:
task_queue.put((pair, start, end))
return task_queue

def worker(task_queue, working_directory_queue, completed_tasks_filename='completed_tasks.json'):
completed_tasks = []

if os.path.exists(completed_tasks_filename):
with open(completed_tasks_filename, 'r') as file:
completed_tasks = json.load(file)

while True:
try:
pair, start, end = task_queue.get(timeout=5) # timeout added to allow graceful shutdown
except Empty:
break

if (pair, start, end) in completed_tasks:
continue

working_directory = working_directory_queue.get()
ram_directory = os.path.join('/dev/shm', f'backtesting_{current_process().pid}')

print(f"Worker {current_process().pid} processing {pair} from {start} to {end} in {working_directory}")
run_backtest(pair, start, end, working_directory, ram_directory, working_directory_queue)

completed_tasks.append((pair, start, end))
with open(completed_tasks_filename, 'w') as file:
json.dump(completed_tasks, file)

if __name__ == "__main__":
clear_ramdisk()

task_queue = load_queue()
working_directory_queue = Queue()
save_queue(task_queue)

for wd in working_directories:
working_directory_queue.put(wd)

processes = []
for i in range(3): # 3 processes
p = Process(target=worker, args=(task_queue, working_directory_queue))
p.start()
processes.append(p)
time.sleep(0.5) # Introduce a small time offset of 0.5 seconds before starting the next process

for p in processes:
p.join()

save_queue(task_queue)

Conclusion

The new backtesting archive on Gunbot.com helps you refine strategies with better data. By using and contributing to this resource, you can improve your trading methods and share useful findings with the Gunbot community. Start with the backtesting archive and keep improving from there.

Meet Gunbot Guru: Your AI Assistant for All Things Gunbot

@boekenbox
@boekenbox
Meet Gunbot Guru: Your AI Assistant for All Things Gunbot

Gunbot Guru is designed to help users navigate the complexities of Gunbot, if you are a beginner trying to understand the basics or an experienced trader looking to automate and customize your strategies.

With access to all documentation and definitions for creating valid autoconfig jobs and custom strategies, Gunbot Guru is here to improve your trading experience by providing instant, detailed assistance.

Visit Gunbot Guru

Why Gunbot Guru Exists

Gunbot Guru exists to bridge the gap between complex crypto trading bot configurations and user accessibility. While Gunbot offers a reliable suite of tools and features for cryptocurrency trading, understanding and using these features can be difficult, especially for new users. Gunbot Guru simplifies this process by providing clear, concise answers and step-by-step guidance. If you need a full product map while using it, browse the full feature overview.

This is not a human support replacement. We hope it mainly improves the experience of interacting with documentation.

OpenAI's Custom GPTs for Free Users

Recently, OpenAI opened up access to custom GPTs for their free users, making it easier for everyone to create and use specialized AI assistants like Gunbot Guru. Using the latest GPT-4o architecture, Gunbot Guru is designed to provide accurate and detailed responses based on the most current data available. However, as with any AI, it is experimental, and we cannot guarantee that it always provides correct information. Always double-check critical details and consult official documentation or support channels when needed.

What Users Can Do with Gunbot Guru

  • Setup Assistance: Get help with initial setup, including connecting to exchanges and configuring trading pairs.
  • Strategy Development: Learn how to code custom trading strategies in JavaScript.
  • AutoConfig Jobs: Understand and resolve common issues with AutoConfig jobs, or even create them from scratch.
  • General Inquiries: Ask any questions about Gunbot functionalities, settings, and best practices.
  • Probably Much More?: The cases above were tested, Gunbot Guru can probably handle way more topics.

Technological Advancements

The capabilities of Gunbot Guru are made possible by recent advancements in AI technology. Just a year ago, creating a custom AI that could understand and interact with users on such a detailed level was not feasible. With the latest GPT-4o architecture, OpenAI has enabled us to develop specialized assistants that can provide custom support and information. This is an experimental GPT, and while it strives to provide accurate information, it's important to double-check critical details and consult official documentation or support channels when needed.

Getting Started with Gunbot Guru

If you're new to Gunbot, Gunbot Guru can help clear up any doubts you have. Here’s an example of a step-by-step guide on how to set up your first trading pair using Gunbot Guru:

Example Interaction: Setting Up a Trading Pair

Question: "How do I set up my first trading pair on Gunbot?"

Answer: To set up your first trading pair on Gunbot, follow these steps:

  1. Select Market Type: Choose 'spot' as your market type in the Gunbot wizard. This can be changed later if needed.
  2. Connect to an Exchange:
    • Select your exchange from the list.
    • Enter your API credentials (API key and secret).
    • Click 'update exchange settings' to save your input.
  3. Add a Trading Pair:
    • In the Gunbot interface, select the 'add pair' button.
    • Choose your preferred trading pair from the list. For example, you can select USDT-BTC.
  4. Configure the Trading Pair:
    • Choose the 'stepgrid' strategy for both buying and selling. This strategy is suitable for frequent, smaller trades.
    • Set the trading limit. For example, if you have 2500 USDT and want to distribute it over 50 buy orders, set the trading limit to 50 (2500 / 50 = 50 USDT per trade).
    • Restrict the maximum investment to 2500 USDT to make sure the crypto trading bot does not exceed this limit.
  5. Optional: Activate Telegram Notifications:
    • You can activate Telegram notifications to get immediate updates on your trades. This step is optional and can be done later.
  6. Select Interface Mode:
    • Gunbot offers two interface modes: Basic Interface and Advanced Interface. Choose the mode that best fits your experience level. The Basic Interface is recommended for new users.
  7. Start Trading:
    • Once your pair is set up, click the 'start bot' button to begin trading.
  8. Monitor Trades:
    • Use the Gunbot interface to monitor your trades in real-time. The interface provides essential information such as break-even points and target goals.

For more detailed guidance, refer to the Gunbot documentation and support pages.

Advanced Use Cases

For seasoned Gunbot users, Gunbot Guru can solve even complex tasks with detailed prompts. Here’s how you can use Gunbot Guru for advanced use cases:

Example Interaction: Coding a Custom JS Strategy

Question: "Can you provide a sample JS script for a custom trading strategy?"

Answer: Here is a simple example of a custom trading strategy script in JavaScript for Gunbot:

// Check if there are any open orders for this pair, wait until they get filled before doing anything else
if (gb.data.openOrders.length > 0){
console.log('There is an open order, waiting...')
return
}

// Balance "settings": invest 100 USDT, convert into quote amount needed for calling the buy method
var baseAmount = 100
var buyAmount = baseAmount / gb.data.bid

// Check if no bag is held yet AND price, lowBB, and moving average criteria are true
if (
!gb.data.gotBag &&
gb.data.bid < gb.data.lowBB &&
gb.data.fastSma < gb.data.ema1
){
// Conditions are true, fire a market buy order using the amount calculated in buyAmount
gb.method.buyMarket(buyAmount, gb.data.pairName)
}
// Place a limit sell order if we have a bag
else if ( gb.data.gotBag ) {
// Fire the sell order, pass in the amount, price, and pair name.
// Price is calculated as breakEven * 1.01
gb.method.sellLimit(gb.data.quoteBalance, gb.data.breakEven * 1.01, gb.data.pairName)
}

For more examples and detailed explanations, refer to the Gunbot documentation here.

Example Interaction: Resolving Common AutoConfig Job Issues

Question: "What are common issues with AutoConfig jobs and how can I resolve them?"

Answer: Here are some common issues with AutoConfig jobs in Gunbot and how you can resolve them:

  1. Jobs Not Running

    • Check that AutoConfig is enabled in your Gunbot setup. You can enable it through the browser interface on the AutoConfig page.
    • Check that each job you want to run is enabled. Each job has an option to enable or disable it.
    • Verify the schedule format of the job. AutoConfig jobs use a cron-like schedule format. If the schedule is not correctly formatted, the job will not run. Use tools like crontab-generator.org to generate the correct schedule format.
  2. Configuration Conflicts

    • When scheduling multiple jobs, avoid conflicts from simultaneous configuration changes. Only the first job to finish will apply its changes if they run concurrently. The others will wait for another chance.
  3. Undefined Data Errors

    • Use filters to check if the data exists before using it in an expression. For example, add a filter that checks if the data has a value greater than 0 before using it in a calculation.
  4. Manual Changes During Fast Schedules

    • Avoid making manual setting changes through the browser while AutoConfig jobs are running, especially when using very fast schedules. This keeps the trading bot configuration consistent.
  5. High API Usage

    • Limit the duration and frequency of ticker data collection jobs. Do not permanently run ticker collection jobs while running other AutoConfig jobs. High API usage can slow down Gunbot performance.
  6. Incorrect Pair Data

    • Check that the pair data you are referencing exists and is correctly formatted. Check the JSON file and check that the data points you want to use are available and have the correct data type. Prefer number and boolean types over arrays.

Proof of example interactions: Gunbot Guru Session

Conclusion

Gunbot Guru is an AI assistant that can improve your Gunbot workflow. New and experienced users can use it for basic setup help, advanced coding, and anything in between.

Visit Gunbot Guru

Introducing the Gunbot Dev Community

@boekenbox
@boekenbox
Introducing the Gunbot Dev Community

Gunbot has come a long way from offering preset trading bots to becoming a flexible platform that lets developers create their own custom trading strategies and automation setups. This shift has helped create a small and enthusiastic community of developers who are now offering their custom setups to Gunbot users. We're happy to announce the first three community-developed offers, with more to come.

With or without extensions made by community devs, Gunbot remains the most versatile crypto trading bot on the market. Offering a wide range of built-in strategies that are ready to use right out of the box. If you use these community-developed setups or stick with the built-in options, Gunbot provides a reliable trading solution for all users.

Broxynet-V1

The Broxynet-V1 strategy suite, as described by its developer @Steven0_0Smith, includes multiple trading modes, Accumulator, Gribz, Calm, Normal, and Aggressive, catering to both novice traders and seasoned Gunbot users.

  • Accumulator: Reinvest profits to buy and hold your favorite cryptocurrencies.
  • Gribz Mode: A grid-style trading approach with dual sell levels.
  • Calm, Normal, and Aggressive Modes: Customizable settings to protect against market downtrends.

Broxynet-V1's active Trading Panel provides real-time data on buy and sell triggers, current pair state, and trading mode.

More details about Broxynet

Quanta exoTrader

According to its developer @flightcommander, Quanta exoTrader offers a data science approach to trading.

  • Data Science Core: High probability entry and exit points.
  • Adaptive Trading Algorithm: Adjusts to market volatility in real-time.
  • Risk Management Tools: Multi-timeframe trend protection and custom risk thresholds.

Quanta exoTrader is said to be ideal for traders who want a sophisticated, data-driven strategy that adapts to market conditions.

More details about Quanta-exoTrader

ChannelMaestro

ChannelMaestro, described by its developer @boekenbox, is an all-around trading strategy designed for simplicity and effectiveness. With minimal settings required, it can be deployed in under 10 seconds.

  • Simple Configuration: Easy to start trading with just a few settings.
  • Single Setting Funds Management: Integrated stop losses and automatic trade size adjustments.
  • Multi-Timeframe Analysis: Analyzes different timeframes to make informed trading decisions.

ChannelMaestro is said to be perfect for traders who prefer a straightforward approach without the need for extensive configuration.

More details about ChannelMaestro

Conclusion

The Gunbot community is growing, thanks to the creativity and hard work of our developers. Setups like Broxynet-V1, Quanta exoTrader, and ChannelMaestro give users more choices for their trading strategies. These first community-developed setups are available for purchase, with the developers getting the proceeds. More community strategies and extensions are on the way, providing even more ways to customize your Gunbot experience.

If you use these community setups or stick with Gunbot's built-in strategies, you have a solid tool for your trading needs. The future of Gunbot trading is looking better than ever with help from our dedicated community.

Beyond Basic Crypto Trading Bots: Using AutoConfig for Custom Automation

@boekenbox
@boekenbox
Beyond Basic Crypto Trading Bots: Using AutoConfig for Custom Automation

As a bot trader, you need to adapt strategies quickly when market conditions change. Manually managing trading bots can give you precision, but it’s a constant grind that leaves you vulnerable to missed opportunities.

That’s where Gunbot's AutoConfig comes in, a feature built for advanced automation and real-time optimization. AutoConfig fine-tunes strategies, responding to market shifts, and lets you create advanced trading routines that would otherwise require intensive manual oversight.

The Limits of Manual Bot Management

Manual bot management is straightforward, but it's labor-intensive:

  1. Pair Selection: You need to constantly identify promising crypto pairs based on market conditions.
  2. Strategy Assignment: Each pair requires specific strategies that align with current trends.
  3. Parameter Tuning: Frequent tweaking of strategy settings is essential as the market changes.
  4. Trade Monitoring: You must oversee trades, stepping in to make adjustments as needed.

All these tasks demand constant attention, creating risks of lost opportunities or delayed responses when the market moves fast.

What AutoConfig Does for You

AutoConfig allows you to automate these processes, handling pair management, strategy settings, and more in real time and in a rules based manner. By setting up AutoConfig, you can keep your bot aligned with your trading objectives without having to watch over every detail.

Why AutoConfig Stands Out:

  • High Efficiency: Reduces the need for manual adjustments, freeing up time for broader strategy work.
  • Real-Time Adaptability: Automatically keeps strategies optimized to current market conditions.
  • Advanced Customization: Set up complex, multi-step trading actions based on specific market signals.

AutoConfig’s Capabilities

To help traders with automating their repetitive (and often slow) manual bot management, AutoConfig offers a suite of tools to help automating various aspects of running a crypto trading bot.

Dynamic Pair Management

Beyond simple pair addition and removal, AutoConfig can evaluate pairs based on more complex indicators such as historical performance, correlation with other assets, allowing for a highly optimized and strategic portfolio composition.

Detailed Strategy Optimization

AutoConfig supports deeper strategy customization with conditional logic and multi-variable scenarios. It can automatically adjust strategies based on market conditions, performance metrics, and predefined goals.

Extensive Workflow Automation

AutoConfig can orchestrate detailed trading workflows, offering a reliable framework for setting pre-trade conditions and post-trade actions that streamline trading strategies and improve decision-making:

Pre-Trade Conditions

Before executing trades, AutoConfig can assess a variety of market indicators and internal parameters to confirm that all conditions align with strategic requirements. This includes checking for price stability, market sentiment analysis, or even external economic events that could impact price movements. By setting such pre-trade conditions, traders can fine-tune when and how their trading strategies are deployed, reducing the risk of entering or exiting positions under unfavorable conditions.

Post-Trade Actions

After a trade is executed, AutoConfig could orchestrate a series of post-trade actions that are important for maintaining strategy efficacy and preparing for future trades. This includes adjusting future trading parameters based on the outcome of the trade, rebalancing the portfolio to maintain risk levels, or even triggering conditional orders based on new market conditions. These actions keep the trading strategy dynamic so it can adapt based on previous outcomes and evolving market insights.

Practical Applications of AutoConfig

  • Dynamic Risk Management: AutoConfig can adjust risk exposure based on volatility, scaling back in high-risk environments or increasing positions during stable periods.
  • Custom Strategy Adjustments: Use JavaScript or other scripting to fine-tune strategies in real-time, based on performance data.
  • Market Sentiment-Based Adjustments: Integrate external data sources to monitor sentiment shifts and adjust trading strategies accordingly.

Implementing AutoConfig

Setting up AutoConfig requires a detailed configuration that matches your specific trading strategies and goals. To get started or improve their current setups, we provide detailed guides that walk you through the necessary steps:

These resources will help you script conditions, define action triggers, and set performance metrics for evaluating the effectiveness of your strategies.

Final Takeaways

Gunbot's AutoConfig goes beyond standard bot capabilities, enabling traders to design, automate, and refine strategies on their own terms. It’s not a one-size-fits-all tool; it’s a flexible platform for building and customizing trading automation that aligns with your specific goals.

AutoConfig offers tools to control every aspect of your trading automation, letting you actively shape your trading environment in real-time. If you're aiming for efficiency, adaptability, or deeper control, AutoConfig equips you to stay responsive to market conditions and build a more effective trading system.

Display Custom Metrics in Gunbot with AutoConfig Hack (UPDATED, NO LONGER A HACK)

@boekenbox
@boekenbox
Display Custom Metrics in Gunbot with AutoConfig Hack (UPDATED, NO LONGER A HACK)

This guide shows how to use AutoConfig to display custom metrics next to your trading chart. Although displaying custom metrics is usually reserved for custom strategies, we will use a simple AutoConfig setup to place custom metrics right next to your trading chart.

Update

The feedback on this article has been overwhelmingly positive, and we've taken note of the technical challenges some of you faced with setting custom metrics for strategies like stepgridhybrid.

Thanks to your input, starting from version 28.5.6_beta, we are officially supporting this feature in AutoConfig, allowing for the customization of metrics in the strategy stats sidebar.

Getting Custom Metrics with AutoConfig 🔓

AutoConfig is primarily used for configuration automation, but we'll demonstrate how to use it for improving the Gunbot frontend too. By creating an AutoConfig job that alters nothing in the Gunbot config, you can have it write data to the internal memory of the bot and display custom metrics in the right sidebar, next to the chart. These metrics can include a title, value, and tooltip text.

Note: This article assumes you are familiar with your bot and basic steps like enabling AutoConfig itself.

Time Since Last Buy & Sell: A Complex Example ⏰

Let's examine an example of how to display the time since last buy and sell for the USDT-BTC pair. This complex example iterates over order data to calculate the final values. Keep in mind that the JavaScript code must be on a single line, within double quotes, and have a leading space to be evaluated.

autoconfig.json example

{
"customMetrics": {
"pairs": {
"exclude": "",
"include": "USDT-BTC",
"exchange": "binance"
},
"filters": {
"alwaysPasses": {
"type": "custom",
"target": " true"
}
},
"overrides": {},
"setPairVariable": {
"setMetrics": " (function setMetrics(data) {const orders = data.pair.orders; const lastBuyTime = orders.filter(order => order.type === 'buy').map(order => Date.now() - order.time).sort((a, b) => b - a)[0];const timeSinceLastBuy = new Date(lastBuyTime).toISOString().substr(11, 8);const lastSellTime = orders.filter(order => order.type === 'sell').map(order => Date.now() - order.time).sort((a, b) => b - a)[0];const timeSinceLastSell = new Date(lastSellTime).toISOString().substr(11, 8);data.pair.sidebarExtras = [{label: 'Time since last sell (hh:mm:ss)', value: timeSinceLastSell, tooltip: 'lolol'}, {label: 'Time since last buy (hh:mm:ss)', value: timeSinceLastBuy, tooltip: 'lolol'}]; return true;})(this)"
},
"clearOverrides": false,
"schedule": "*/15 * * * * *",
"type": "manageOverrides",
"debug": true,
"enabled": true
}
}

Pairs Section: This section specifies the target pair for the job. In this case, it is set to "USDT-BTC" on the "binance" exchange. Alternatively you can set the value for include to -to match all pairs on an exchange, or USDT- to match all USDT pairs.

Filters Section: The "alwaysPasses" filter is defined as a custom filter that will always evaluate to true. This lets the job continue to the next step, regardless of the input.

Overrides Section: This section is empty in the provided configuration. It can be used to override certain settings or parameters on the pair level if needed.

setPairVariable Section: This section contains a JavaScript code snippet wrapped in a self-invoking function. It sets the custom metrics for the pair. The code extracts information from the "data" object, specifically the "orders" property of the pair. It calculates the time since the last buy and sell orders for the pair and formats them as "hh:mm:ss" (hours:minutes:seconds). The results are then assigned to the "sidebarExtras" property of the pair, which includes an array of objects with labels, values, and tooltips. Finally, it returns true to indicate that the execution was successful.

The result

Custom metrics show next to the chart Your new metrics show on the sidebar next to the chart.

Tip: don't bother manually typing JS code that is minified to fit on a single line. Just search for an online tool to minify your code, so you can write it without formatting concerns. ChatGPT is also good at minifying code to match the formatting requirements to place it in the autoconfig.json file.

Simpler Job Examples for Custom Metrics 🎯

Let's look at some simpler job examples that display the last stochRSI value (data.pair.STOCHRSI), ATR value (data.pair.atr), with an empty element between the other metrics for formatting purposes.

autoconfig.json example

{
"customMetrics": {
"pairs": {
"exclude": "",
"include": "USDT-BTC",
"exchange": "binance"
},
"filters": {
"alwaysPasses": {
"type": "custom",
"target": " true"
}
},
"overrides": {},
"setPairVariable": {
"setMetrics": " (function setMetrics(data) { data.pair.sidebarExtras = [{label: 'StochRSI', value: data.pair.STOCHRSI, tooltip: 'Stochastic RSI value', persist: true}, {label: '', value: '', tooltip: '', persist: true}, {label: 'ATR', value: data.pair.atr, tooltip: 'Average True Range', persist: true}]; return true; })(this)"
},
"clearOverrides": false,
"schedule": "*/15 * * * * *",
"type": "manageOverrides",
"debug": true,
"enabled": true
}
}

This would result in the following custom metrics display:

  • StochRSI
  • Empty Space
  • ATR

Breaking Down the Metrics Calculation and Setting 🔍

The key to understanding and customizing your metrics lies in dissecting the parts that calculate and set the values. This will be different for every metric that you want to implement.

In our complex example,

  1. We begin by filtering orders and calculating the time difference between now and each order's timestamp.
  2. We sort the resulting array in descending order based on the calculated time difference.
  3. The first element of the sorted array represents the most recent order, and we extract its time using new Date(lastBuyTime).toISOString().substr(11, 8).

Tip: you can use JavaScript to modify your data. For example add .toFixed(2) to change a floating point number with many decimal points to a string with just two decimals.

By understanding how metrics are calculated and set, you can customize your dashboard with informative data points matched to your trading needs.

Gunbot in 2024: Why Our Core Values Still Matter. A Lot.

@boekenbox
@boekenbox
Gunbot in 2024: Why Our Core Values Still Matter. A Lot.

Gunbot started as a small, community-focused project, deeply rooted in the values of reliability, customization, and security. As we've grown into a major trading bot platform in 2024, these core principles have remained at the heart of our expansion. They still shape how we build and maintain the product.

Security: Your Peace of Mind Is Our Priority

Local by Design: Unlike cloud-based alternatives, Gunbot operates directly on your hardware, offering improved security and peace of mind. By minimizing potential attack vectors, your trading strategy stays private and secure. With over six years of security history without major incidents, we think we made a good design choice by keeping this software local.

Flexibility: One Size Does Not Fit All

Beyond Basic Strategies: At the heart of Gunbot's design is the belief that one size does not fit all. From strategies with just three settings for beginners to intricate setups with over 150 parameters for veterans, Gunbot offers strong customization. This means every aspect of your trading can be fine-tuned to match your exact specifications.

Dynamic Multi-Pair Management: Beyond individual strategy customization, Gunbot stands out with its ability to automate changes across multiple pairs. This adaptability, coupled with all configuration data being transparently stored in accessible JSON files, keeps you in control. There's no hidden data; everything Gunbot stores is an open book to you.

Harmonious with Manual Trading: Gunbot respects your trading intuition. Manual trades don't throw off Gunbot’s strategies; instead, they smoothly integrate, allowing for a harmonious blend of automated precision and human insight.

Portability for True Trading Freedom: Gunbot's architecture is built for the modern trader’s lifestyle. Contained within a single portable folder, Gunbot can run anywhere - from docker containers on tech-savvy appliances to virtual servers strategically placed near exchanges. If you want to run Gunbot on your smart fridge or prefer the conventional setup on a laptop or cloud server, the choice is yours. This level of portability lets Gunbot adapt to your trading environment, not the other way around.

Community-Driven: Innovating Together

Feedback-Fueled Development: Gunbot stands out for its commitment to incorporating user feedback into its development process. This collaborative approach has cultivated a suite of features that cater to both novice and experienced traders, keeping the latest trading improvements accessible.

Independence: Designed with You in Mind

User-First Philosophy: Our allegiance is to you - the trader. Unlike others, Gunbot’s features and strategies are developed with a clear focus on improving your trading outcomes, free from any external exchange volume commitments.

Join the Gunbot Community

Choosing Gunbot means using a trading tool that values security, respects your preferences, and listens to user feedback. It is also backed by a community that keeps improving the product.

Understanding the Quanta G-Type Strategy for Effective Market Making

@boekenbox
@boekenbox
Understanding the Quanta G-Type Strategy for Effective Market Making

Gunbot offers a range of custom strategies designed for diverse trading styles and market conditions. Among these, the Quanta G-Type strategy stands out for its unique approach to market making. This guide explains how Quanta G-Type works and where it fits in market making.

This guide looks at the key features of the Quanta G-Type strategy

Key Features of Quanta G-Type

Quanta G-Type is a geometric market maker hybrid strategy built by a Gunbot community member. It's built as a 'custom strategy', meaning it is available to Gunbot Ultimate users who can run custom coded strategies. It is designed to adapt to large market price movements, which makes it useful if you focus on market making. The strategy effectively handles different market scenarios, including sideward movements, price pumps, and dumps.

Quanta G in action

Strategy Mechanics

  • Sidewards Market: In a stable market, Quanta G-Type engages in spread trading.
  • Price Pump: During a price increase, the strategy focuses on the decumulation of assets.
  • Price Dump: Conversely, in a declining market, it aims at the accumulation of assets.

These mechanisms help keep the strategy effective across various market conditions, making it versatile for different trading needs.

Is Quanta G-Type Right for You?

Quanta G-Type is built for longer-term market engagement. It works best if you are comfortable managing inventory over time and tuning a strategy with several moving parts. Track its performance over time before you rely on it in live market conditions. If you want alternatives to benchmark against, compare more trading strategies.

Profit Generation and Risks

The strategy generates profits through spread profits, accumulation of spread derivative, and inventory swing. However, it is important to select a viable long-term coin, as the strategy's success is closely tied to the coin's longevity and market performance.

Operational Features

Quanta G-Type includes features such as auto compounding and advanced inventory management. It supports different trading modes, each matched to specific market conditions. The auto-setup process is streamlined, but users must be mindful of key operational considerations.

Getting Started with Quanta G-Type

Starting with the Quanta G-Type strategy involves a series of steps, including setting up the strategy parameters and optionally running simulation tests. These simulation runs are important to understand the strategy's dynamics before implementing it in live trading scenarios. Do read the strategy documentation when setting it up.

Customization and Overrides

The strategy offers a range of customization options through basic and advanced overrides. Key parameters like BUY_INTERVAL, SELL_INTERVAL, and ORDER_DEPTH can be adjusted to suit individual trading preferences and goals.

Conclusion

The Quanta G-Type strategy is a reliable solution for market makers in the cryptocurrency domain. It offers a balanced approach to handling different market conditions, focusing on long-term asset management.

Visualize Your Strategy: Gunbot's Chart Drawing Tools

@boekenbox
@boekenbox
Visualize Your Strategy: Gunbot's Chart Drawing Tools

Visualizing a trading strategy helps you debug it and explain it. Gunbot gives you chart drawing tools that support strategy development and make the data easier to read for casual traders. Let's look at how you can use these tools in your custom strategies.

This guide looks at how to make use of programmatic chart drawings for realtime strategy visualization.

1. Visualizing Support and Resistance with Labeled Rectangles

Symbol image with multiple support channels drawn on a trading chart

When you're looking to mark out support and resistance channels, labeled rectangles can be incredibly useful. Here's how you can create them:

// Initialize an array to store shapes
let newChartShapes = []

// Example data for rectangles
const exampleRectangleData = [
{
top: 12,
bottom: 10,
endTime: 1234567890, // timestamp in seconds
label: '15M channel'
},
{
top: 16,
bottom: 15.5,
endTime: 1234567890, // timestamp in seconds
label: '4H channel'
}
]

let boxLabels = []

const boxes = exampleRectangleData.map((data, index) => {

const isSupport = gb.data.bid >= data.top
const isResistance = gb.data.bid <= data.bottom

// Create labels for the rectangles
boxLabels.push({
points: [
{ price: data.top, time: data.endTime },
],
options: {
text: data.label,
shape: 'text',
lock: true,
disableSelection: true,
setInBackground: true,
overrides: {
backgroundColor: 'rgba(25,83,55,0.0)',
color: isSupport ? '#195337' : isResistance ? '#592e2e' : '#193253',
fillBackground: false,
}
}
})

// Create rectangles with the specified options
return {
// Define rectangle points (top-left and bottom-right corners)
points: [
{ price: data.top, time: 0 },
{ price: data.bottom, time: data.endTime },
],
options: {
shape: 'rectangle',
lock: true,
disableSelection: true,
setInBackground: true,
overrides: {
backgroundColor: isSupport ? 'rgba(25,83,55,0.25)' : isResistance ? 'rgba(89,46,46,0.25)' : 'rgb(25,50,83, 0.25)',
color: isSupport ? '#195337' : isResistance ? '#592e2e' : '#193253',
fillBackground: true,
}
}
};
});

// Combine the shapes and labels
newChartShapes = [...newChartShapes, ...boxes, ...boxLabels]

// Update the chart with the new shapes
gb.data.pairData.customChartShapes = newChartShapes

By using the above code, you can create clear visual markers for your strategy's support and resistance levels.

2. Setting Clear Targets with Target Lines

note

Target lines are horizontal lines with price and amount properties. They can help visualize specific targets, like breakout or pullback targets.

// Initialize an array to store target lines
let newChartTargets = []

// Define target lines with properties
const customRangeTargets = [
{
text: 'Breakout target',
price: 100,
quantity: 2, // setting an empty string '' omits the quantity field
lineStyle: 2, // 0: solid, 1: dotted, 2: dashed
lineLength: 0, // 0 (right) - 100 (left)
extendLeft: true,
//...rest of the code
}
]
// Add the target lines to the array
newChartTargets = [...newChartTargets, ...customRangeTargets]

// Update the chart with the new target lines
gb.data.pairData.customChartTargets = newChartTargets

With these target lines, you can easily visualize and track your strategy's price objectives.

3. Area: Highlighting Areas of Interest

Symbol image of an angled area drawn as outline on a trading chart

Sometimes you want to highlight a specific area on the chart to draw attention to it. Here's how you can outline an area:

// Initialize an array to store shapes
let newChartShapes = []

// Define the area with points
const exampleAreaData = {
upperLeft: 118,
upperRight: 120,
lowerRight: 116,
lowerLeft: 114,
startTime: 0, // timestamp in seconds
endTime: gb.data.pairData.candles.open[gb.data.pairData.candles.open.length - 1].timestamp // Assuming the area ends at the last bar
};

// Create the area shape
const area = {
points: [
{ price: exampleAreaData.upperLeft, time: exampleAreaData.startTime },
{ price: exampleAreaData.upperRight, time: exampleAreaData.endTime },
{ price: exampleAreaData.lowerRight, time: exampleAreaData.endTime },
{ price: exampleAreaData.lowerLeft, time: exampleAreaData.startTime },
{ price: exampleAreaData.upperLeft, time: exampleAreaData.startTime },
],
options: {
shape: 'path',
lock: true,
disableSelection: true,
setInBackground: true,
overrides: {
lineColor: '#70ccbd'
}
}
};

// Add the area to the shapes array
newChartShapes = [...newChartShapes, area]

// Store the new shapes for the chart to display
gb.data.pairData.customChartShapes = newChartShapes

This method allows you to create a visual emphasis on the chart, making it easier to spot patterns or areas of interest.

4. Custom Metrics for In-Depth Analysis

Symbol image showing custom metrics next to a trading chart

Gunbot allows developers to create their own metrics and display them next to the chart, providing a more detailed picture of the strategy's performance.

// Initialize an array to store metrics
let newChartMetrics = []

// Define your custom metrics
const metrics = [
{
label: `Metric name`,
value: '110',
tooltip: 'Display this text as a tooltip for this custom metric.'
},
// Add more metrics as needed
]

// Add the metrics to the array
newChartMetrics = [...newChartMetrics, metrics]

// Update the chart sidebar with the new metrics
gb.data.pairData.sidebarExtras = newChartMetrics

By adding custom metrics, you can track specific aspects of your strategy directly on the chart, making it easier to make informed decisions.

These are just some highlights of the drawing tools for custom strategies. There is plenty more to discover.

Gunbot's chart drawing tools give you a practical way to visualize trading strategies. If you're a developer debugging algorithms or a trader checking strategy execution, these tools make the chart easier to read. A clear chart makes strategy behavior easier to debug, explain, and trust.

Feature highlight: automate TradingView alert scenarios, even complex ones

@boekenbox
@boekenbox
Feature highlight: automate TradingView alert scenarios, even complex ones

This feature highlight shows how you can turn Gunbot into a TradingView alert bot. You'll use TradingView webhook alerts to automate trading decisions, including complex scenarios with multiple indicators.

Let's consider a scenario where you want to receive alerts based on varying indicators, in any order of time. The end goal? You receive timely alerts for your chosen indicators, and Gunbot does the heavy lifting by placing trades once all conditions are met.

note

This guide assumes that your webhook connectivity is already configured. If you need help with this, please refer to the webhook alerts documentation. Our support team is also on hand if you have any issues.

Let's walk through it.

Step 1: Define Your Conditions

First things first, identify the number of buy and sell conditions necessary for your strategy. Be as specific as possible here; the more refined your conditions, the more custom your trading approach will be.

Step 2: Configure Gunbot

Next, head to Gunbot and add a pair with an alert strategy. Set the desired alert count and investment amount (see image below). Copy all the alerts which should look something like this:

Buy alerts:
passphrase binance customlong USDT-ETH 1 0 1
passphrase binance customlong USDT-ETH 1 0 2
passphrase binance customlong USDT-ETH 1 0 3
Sell alerts:
passphrase binance customshort USDT-ETH full 0 1
passphrase binance customshort USDT-ETH full 0 2

When creating the alerts on TradingView, these alert texts are what you should enter in the message field. One for each alert you'll create.

Gunbot alerts setup

This example uses market orders, it's also possible to use limit orders with the target price added in the alert message by using a placeholder like {{close}} (as provided by TradingView). The passphrase part of the webhook alert message refers to a passphrase you'd setup yourself in Gunbot, so that it only accepts alerts that use the expected passphrase.

Step 3: Set Up TradingView

Now, head to TradingView and open a chart with the asset you want to trade. Apply the indicators you plan to use for your strategy.

Step 4: Create Buy Alerts

In TradingView, set up your buy alerts (see images below). For this example, we'll use VWAP bands and EMA crosses as our conditions - executing trades when both shorter-term EMAs cross below the longer-term EMA and the price drops below the lower VWAP band.

Buy alert 1

TradingView buy alert 1

Buy alert 2

TradingView buy alert 2

Buy alert 3

TradingView buy alert 3

Step 5: Set Up Sell Alerts

Similarly, create sell alerts for each of your conditions in TradingView (see images below). In our example, we'd set up sell orders when a short-term EMA crosses above the long-term EMA, and the price exceeds the upper VWAP band.

Sell alert 1

TradingView sell alert 1

Sell alert 2

TradingView sell alert 2

Step 6: Start Trading

Finally, save all your alerts and hit the 'Start Trading' button in Gunbot. The trading bot will now execute your trading scenario whenever all of these conditions are met! It does not matter in which sequence the alerts arrive, whenever all criteria for a buy order are fulfilled, the bot will place the buy order. (and vice versa for selling)

Wrapping It Up - Power at Your Fingertips 🎯

Gunbot's TradingView webhook integration extends your trading strategies. You can run complex scenarios with multiple indicators without writing code.

In essence, Gunbot makes it possible for traders to capitalize on their strategic insights without needing to code or continually monitor market conditions. 😎

With some initial setup, your trades can execute automatically based on your preferred indicators and conditions. It's never been easier to start making the most out of your trading opportunities!

How to get a Free Gunbot License Upgrade

@boekenbox
@boekenbox
How to get a Free Gunbot License Upgrade

☀️ Summertime Special! Get a free upgrade for your newly purchased Gunbot license by sharing your love for Gunbot on social media. Keep trading while you enjoy the beach. ☀️🌊

Tip: Here is how to get a free license upgrade.

Why not Level Up for Free?

This August promotion gives you a free upgrade on a new Gunbot license when you share Gunbot on social media.

From August 10 to August 18, 2023, any new license or upgrade you purchase in this period can be upgraded at no extra cost. That means a Standard license moves to Pro, and a Pro license moves to Ultimate.

Sharing is Caring 💬

So, how do you go about securing this summer steal? It’s easy peasy lemon squeezy! 🍋😉 All you need to do is:

  1. Create a post about Gunbot on your favorite social media platforms. Be creative - draw the Gunbot logo in the sand, snap a picture of a beach ball with Gunbot written on it, or even a sexy bikini showcasing the Gunbot name! Your imagination is the limit!
  2. Make sure to tag us in your post. You can find our profiles here.
  3. Include one (or more) of these summery hashtags: #FerragostoCrypto, #GunbotSummer, or #RideTheCryptoWave.

🎁 Pro Tip: While making your posts valuable, make sure they're engaging and fun too. After all, it's a summer promotion! 🏖️🌞

The Bottom Line

This promotion lets you upgrade your Gunbot license while keeping full control over your trades from wherever you run your setup.

This promotion runs from August 10 to August 18, 2023. Share your Gunbot post during that window to qualify.

Create your post, tag Gunbot, use the required hashtag, and submit it during the promotion window.

Enjoy the summer promotion.

Decoding Gunbot Metrics: A Deep Look at ROE

@boekenbox
@boekenbox
Decoding Gunbot Metrics: A Deep Look at ROE

Today we're going to explain an important yet often misunderstood concept: Return on Equity, commonly known as ROE. By the end of this article, you'll understand what ROE is, why it's useful and how it can guide your trading decisions.

Tip: Understanding ROE will enable you to make better decisions when configuring your Gunbot trading strategies.

What is ROE?

ROE stands for Return On Equity. It represents the percentage gain or loss on the current assets held in your portfolio, inclusive of trading fees paid. In other words, ROE helps you assess the profitability of your spot position at any given time.

Note

Gunbot includes the cost of trading fees in its ROE calculation. This provides a more accurate measure of profitability.

Here's where things get interesting: Gunbot analyzes the whole order history to calculate the current profit or loss on a position. Even with complex order sequences involving multiple buy and partial sell orders, Gunbot keeps track, so you always have a clear view of your position's profitability.

The Importance of ROE in Trading

ROE shows whether a position is making or losing money and gives you real-time information for trade decisions. On futures platforms, this kind of data is common. For spot exchanges, it is much less common.

So how does Gunbot use ROE? Through two common settings: GAIN and STOP_LIMIT.

1. GAIN

The GAIN setting lets you set a take-profit target at a designated ROE percentage. When your position reaches this specified ROE, Gunbot automatically triggers a sell order, locking in your gains.

2. STOP_LIMIT

On the flip side, the STOP_LIMIT option sets a stop-loss when a specific negative ROE value is exceeded. This feature allows you to limit potential losses by triggering an automatic sell order when the market moves against you.

The Added Value of ROE in Gunbot

By providing an precise view of your ROE, Gunbot puts you firmly in control of your trading decisions. This ability to quickly know your current ROE, something typically reserved for futures trading platforms, gives you an edge on spot exchanges.

Tip

The combination of GAIN and STOP_LIMIT settings in Gunbot offers a tactical approach to maximize profits and minimize losses based on accurate ROE data.

Trading is about making the right moves and understanding why they are the right moves. Gunbot gives you metrics like ROE to support that process.

💎 In a Nutshell:

Gunbot's ROE metric brings futures platform advantages to spot exchanges, allowing you to understand your spot position's profitability accurately. By using settings like GAIN and STOP_LIMIT, you can turn this information into strategic actions.

Detailed Guide: Run Gunbot on a Linux VPS with PM2

@boekenbox
@boekenbox
Detailed Guide: Run Gunbot on a Linux VPS with PM2

This guide explains how to set up Gunbot, a cryptocurrency trading automation tool, on a Linux Virtual Private Server (VPS) using PM2. Running Gunbot on a VPS keeps your trading bot online 24/7, independent of your personal computer, minimizing the risk of downtime.

This guide looks at how to run Gunbot on a budget-friendly VPS using PM2.

Benefits of PM2

PM2 is a process manager for Node.js applications that simplifies managing Gunbot:

  • Process Management: Easily start, stop, and restart Gunbot.
  • Logging and Monitoring: Automatically handles logs and simplifies log management.
  • Startup Scripts: Restarts Gunbot automatically after a server reboot.

Setting Up Your VPS

Before proceeding, set up your Linux VPS following your provider's guidelines. Ubuntu is recommended for its simplicity and broad support. For a broader walkthrough beyond this PM2-focused flow, see the official Linux installation guide.

Connect to your server via SSH using a tool compatible with your operating system:

Installing Gunbot and PM2

Download the latest stable Gunbot release (gunthy-linux.zip) and upload it to your VPS using your SSH client. Then, unzip it:

unzip gunthy_linux.zip

Next, install Node.js, npm, and PM2:

sudo apt update
sudo apt install nodejs npm -y
npm install pm2@latest -g

Start Gunbot using PM2 (replace myGunbotProcess with your chosen name):

pm2 start gunthy-linux --name myGunbotProcess

Configuring Firewall

Allow access to Gunbot's default port (5000) using Ubuntu's firewall (UFW):

sudo ufw allow 5000

Check your VPS provider's firewall settings if issues persist.

Managing Logs with PM2

Use PM2 commands to manage logs easily:

# View all process logs
pm2 logs

# View logs for a specific process
pm2 logs myGunbotProcess

# Clear all logs
pm2 flush

Set up automatic log rotation to prevent logs from growing too large:

pm2 install pm2-logrotate

Automatically Restarting Gunbot on System Reboot

Configure PM2 to automatically restart Gunbot after reboot:

pm2 startup
pm2 save

Updating Gunbot

To update Gunbot, follow these steps:

  1. Stop Gunbot:
pm2 stop your-process-name
  1. Upload and replace the existing gunthy-linux file.
  2. Restart Gunbot:
pm2 restart your-process-name

Always review Gunbot’s official upgrade instructions when updates are available.

Running Multiple Gunbot Instances

To run multiple Gunbot instances on a single server:

  1. Duplicate your Gunbot folder for each instance.
  2. Modify config.js in each folder to have unique settings (instructions for multiple instances):
nano config.js
  1. Start each Gunbot instance with a unique name:
pm2 start gunthy-linux --name "another-process-name"

Save your configuration for automatic restarts:

pm2 startup
pm2 save

Using Gunbot with PM2 on a Linux VPS provides a reliable, always-on environment suitable for automated cryptocurrency trading. Affordable VPS options like Hetzner Cloud or Contabo can be enough for many Gunbot setups.

API Trading on dYdX Exchange: A Detailed Guide with Gunbot

@boekenbox
@boekenbox
API Trading on dYdX Exchange: A Detailed Guide with Gunbot

Get started with dYdX and Gunbot with our easy-to-follow guide. We'll introduce you to API trading on a decentralized exchange using automated trading software. By the end of it, you'll feel confident to venture into dYdX trading using Gunbot.

See how to trade dYdX Decentralized Layer 2 Perpetuals with Gunbot automation.

About dYdX and Its Unique Layer 2 Perpetuals

dYdX is a decentralized exchange (DEX) known for its Decentralized Layer 2 (L2) Perpetuals and low trading fees. While it operates like a Centralized Limit Order Book exchange, it maintains the benefits of decentralization, making it ideal for crypto bot trading.

These DeFi L2 Perpetuals use a 'roll-over' system, keeping positions open indefinitely until the trader decides to close them. They offer efficient tools for diverse trading strategies, whether long-term or short-term. Trading on dYdX allows you to retain control over your positions and funds, even when the exchange faces issues.

Overcoming Unforeseen Events: Forced Withdrawals & Position Closure

dYdX lets traders preemptively exit their positions and access their funds, even if the exchange is offline or unavailable. Here's how it works:

  • Forced Withdrawals: If the exchange encounters issues or becomes inaccessible, traders can rely on the smart contract-powered architecture of dYdX to perform smooth forced withdrawals. This lets traders retrieve their funds and maintain control over their assets.

  • Forced Closing of Positions: dYdX also allows for the forced closing of positions on L2, enabling traders to proactively close open positions before executing a withdrawal.

With these functionalities in mind, let's look at how Gunbot can improve your trading experience on dYdX.

Using Gunbot with dYdX Exchange

Gunbot, a leading automated trading software that runs from your own device, supports trading Perpetual Futures on dYdX. This feature provides an alternative to trading on centralized futures exchanges. If you want the market-specific product summary first, check the dYdX trading bot overview. Here's how to get started:

Getting Your API Credentials for Bot Trading

  1. Begin by connecting your wallet to dYdX. This process is the web3 equivalent of 'creating an account' on centralized exchanges.
  2. During this process, make sure you select the 'remember me' option.
  3. No need to create an API key; it's automatically generated for you.
  4. Store your API Key and Secret securely as they're essential for Gunbot setup.

🔒 Security Tip: Guard your API secrets rigorously, never share them. Gunbot only stores API secrets on your local device.

For detailed steps, refer to our full guide on retrieving the dYdX API credentials in the official documentation.

Setting up Gunbot Using the sgsfutures Strategy

With your API credentials ready, you can set up your preferred trading strategy. Here’s how to implement the sgsfutures strategy:

  1. Access your Gunbot user interface.
  2. Go to 'Trading Settings' and add a new trading pair for the DeFi market you wish to trade. Use the correct pair name format, such as USD-ETH.
  3. Choose sgsfutures as the strategy.
  4. In the Balance settings category, adjust the following:
    • Trading limit (amount in USD)
    • Max open contracts (amount in ETH)
    • Max loss (amount in USD) These settings define the default amount per buy order, maximum position size, and the trigger for stop loss, respectively.
  5. Fine-tune the rest of the strategy parameters according to your trading preferences. To start with an unrestricted grid, disable the restrictive options listed here.
  6. Save your settings and start trading.

✅ Congratulations! You've successfully implemented the sgsfutures strategy for automated trading on the dYdX Exchange.

Typical sgsfutures Trading Behavior

Typical sgsfutures trading behavior on dYdX crypto markets

Info: sgsfutures is a versatile strategy that adapts to market phases. It monitors trends, momentum, and more across multiple timeframes, alternating between various trading styles like grid trading, scalping, and support trading.

Learn and Grow with dYdX and Gunbot

Gunbot gives you a practical way to automate trading on dYdX. By combining Gunbot automation with dYdX markets, you can manage risk, test strategies, and keep control over your trading setup.

With this guide, you are now equipped to start trading on dYdX using Gunbot. While Gunbot is a proprietary trading software, the broader dYdX ecosystem includes open-source documentation and tools available on GitHub, which can help you learn more about decentralized trading mechanics and API integrations. Use dYdX's platform features to improve your trading strategies while keeping control of your crypto investments.

Decoding Gunbot Metrics: Break Even vs. Unit Cost

@boekenbox
@boekenbox
Decoding Gunbot Metrics: Break Even vs. Unit Cost

Have you ever wondered about the differences between break even and unit cost metrics in Gunbot? This article will clear up any confusion and help you make an informed decision on which metric to choose when using strategies like stepgridscalp. Let's get into it.

Tip: Understanding these metrics will enable you to make better decisions when configuring your Gunbot trading strategies.

The Basics of Break Even and Unit Cost Metrics 📊

Both break even and unit cost metrics share a common goal: to analyze spot order history and determine at which price it becomes profitable to start selling. They both account for trading fees as configured in Gunbot's exchange settings. However, there are some key differences:

  • Unit Cost: Represents the average cost of remaining balance that can be sold, considering even partial sell orders. Selling above the unit cost guarantees a profit on every single sell order.
  • Break Even: Represents the price at which the remaining balance can be sold for the entire order group (since opening the position) to be profitable. This means that some individual sell orders might report a loss, but the total group of orders should be profitable.

Choosing between break even and unit cost is a matter of personal preference, but unit cost is generally considered the safer choice.

Note: Market orders may lead to slippage and cause losses if an order fills at a much worse rate than the minimum target.

The strategy gain target is set as a percentage above the unit cost or break even, with the option to use 'dynamic exit logic' to automatically switch between break even and unit cost based on market data.

Example to Illustrate the Differences 🧐

Let's look at two fictional scenarios to better understand the distinction between break even and unit cost metrics.

Example: Unit Cost vs. Break Even

Imagine you bought several items at different prices and now want to sell them for profit:

  • Unit Cost: You calculate the average cost of all unsold items and set your selling price above that number. This way, each sale guarantees a profit.
  • Break Even: Your goal is to cover the total cost of all items, including previous sales, fees, and profits. You don't mind selling some items at a loss as long as the entire group of transactions is profitable.

In Unit Cost mode, you'll only see positive profitable orders whereas in Break Even mode, you may see notifications of sells done at a loss (as it's working on the entire position).

Both break even and unit cost have their advantages and disadvantages, so choose the metric that best aligns with your trading goals and risk tolerance.

Monitoring and Tracking Performance

@boekenbox
@boekenbox
Monitoring and Tracking Performance

Having a clear overview of your Gunbot strategies' performance is essential for continuous improvement. The better you understand what is happening, the better you will be able to improve what the trading bot is doing for you. we'll introduce you to some of the tools and techniques that can help you monitor and track your trading performance effectively.

Visualize Trades on the Trading Chart 📊

A picture is worth a thousand words, and that's especially true when it comes to analyzing trading data. Gunbot allows you to visualize all trades directly on the trading chart. This makes it easy to spot trends, entry and exit points, and overall strategy performance at a glance. Use these visual cues to assess your trading decisions and make necessary adjustments along the way.

Each arrow symbolizes a trade

tip

By closely examining the trading chart, you can quickly identify patterns and trends in your trading performance.

Monitor Open Positions with ROE % 🔍

One key metric to keep an eye on is the Return on Equity (ROE) percentage, which represents your unrealized Profit and Loss (PNL) for open positions. Gunbot provides this feature so you can easily track how your current trades are performing. A positive ROE % indicates a profitable position, while a negative value suggests a loss. Pay attention to this metric as you make future trading decisions.

tip

Because most trading strategies sell when a position is in profit, it is common to see mostly negative ROE values in the overview for active trading pairs. Pairs spend a lot of time in the red, until they are green and sell.

Review Dashboard Statistics 📉

Gunbot's dashboard offers detailed historical statistics such as cumulative PNL, the number of trades executed, and other valuable metrics. Use these stats to gain insights into long-term trends and the overall success of your trading strategies. Regularly review these numbers to stay informed and make data-driven adjustments to your approach.

Detailed stats on the dashboard

info

Your dashboard holds the key to understanding your trading performance. Analyze the provided data to uncover hidden gems of information that can strengthen your strategies.

Improve Performance Through Systematic Analysis 🧠

Now that you have the tools to monitor and track your Gunbot trading performance, it's time to put them into action. Use the provided statistics and ROE % to identify areas of improvement in your strategy. Experiment with different parameters and settings in Gunbot to see how they impact your performance.

When making adjustments, consider these steps:

  1. Identify patterns and trends in your trading data (e.g., recurring losses or profits).
  2. Determine potential causes for these trends by analyzing trade entries, exits, and other factors.
  3. Implement changes to your strategy based on your findings.
  4. Track the results of your changes over time and make further adjustments as needed.

It's important to remember that trading is a dynamic process, so be prepared to adapt and refine your strategies continuously.

Final Thoughts 💡

Mastering your Gunbot strategies requires ongoing monitoring and tracking of your trading performance. By using the trading chart, ROE %, and dashboard statistics, you can see what is working, spot weak areas, and adjust your setup with evidence instead of guesses.

Understanding Gunbot: Breaking Down Basic Concepts

@boekenbox
@boekenbox
Understanding Gunbot: Breaking Down Basic Concepts

This guide covers the basic Gunbot concepts you need before configuring strategies, pairs, exchanges, and instances.

Assigning a Strategy to a Trading Pair 🎯

To kick off your crypto bot trading automation, simply assign a strategy to a trading pair. A trading pair is a combination of two cryptocurrencies, such as Bitcoin and Ethereum. This gives Gunbot the green light to begin executing trades on your behalf.

💡 Pro tip: Strategies are important for enabling Gunbot to make informed trading decisions.

Strategies: The Building Blocks 🔧

Strategies are sets of rules that dictate how Gunbot should trade. Each strategy comes with configurable parameters, allowing you to tweak and optimize them according to your preferences or market conditions.

Presets: Saving Your Customized Strategy 📋

Once you've modified a strategy's settings, you can save it as a 'preset.' This lets you quickly assign your customized settings to other trading pairs in the future, streamlining your workflow.

Multiple Pairs, Multiple Exchanges, Endless Opportunities 💱

With Gunbot, you can run multiple trading pairs across several exchanges simultaneously. You can choose to use different settings for each pair or apply the same settings to all of them - the choice is yours!

📣 Note: "bot" refers to the software as a whole, not a specific pair or strategy.

Custom Strategies: Tailor-Made Tactic 🧩

If you're after something truly unique, you can create a 'custom strategy' by coding it in JavaScript. This allows you to design a strategy matched to your exact needs and preferences.

Autoconfig: Automation Beyond Trading ⚙️

Gunbot's 'autoconfig' system automates settings changes based on predefined conditions. Think of it as a cron-like system that allows you to adapt your trading strategy according to market fluctuations.

Instances: Multiply Your Crypto Trading Bot Capacity 💪

An 'instance' refers to one Gunbot installation. You can run multiple instances of the software using a single license, which is useful for spreading risk across multiple servers or improving processing speed by limiting the number of pairs per instance.


In summary, understanding Gunbot's conventions and basic concepts is important for maximizing your automated trading experience. Assign strategies to trading pairs, customize them with presets, manage multiple pairs and exchanges, create custom strategies, use autoconfig, and use multiple instances to make better use of Gunbot. 🚀

Customizing Gunbot: Making it Work for You

@boekenbox
@boekenbox
Customizing Gunbot: Making it Work for You

Learn how to tailor Gunbot to your visual trading preferences with these tips on interface and chart personalization.

info

Customize Gunbot for an optimized trading experience. Make it work for you by adjusting the interface, notifications, and strategy KPIs.

Personalizing the Interface 🎨

Gunbot's chart interface can be fine-tuned to suit your needs. To save your preferred chart layout, click on the cloud save icon in the chart top bar. You can save as many layouts as you need. Load chart layouts by selecting the Load Chart Layout option.

Save your custom chart layout

Managing Notification Settings 🔔

Trade notifications appear in Gunbot's GUI whenever trades are made. Some users may find them distracting or unnecessary. If you prefer not to receive these notifications, you can disable them on the profile page. Simply navigate to the profile page and toggle off the trade notifications option.

Using Chart Timescale Marks 📈

Chart timescale marks offer valuable information about past events in your trading strategy. They help you understand the historical performance of specific strategies. However, if you don't want timescale marks cluttering your chart, disable them on the profile page.

The marks and notifications on the bottom of the screen can be disabled

Visualizing Your Custom Strategy 🧠

If you're using a custom strategy, you can draw custom elements on the chart to better visualize your approach. This makes it easier to analyze and refine your trading strategy over time. For detailed instructions on visualizing strategy targets, check out Gunbot's documentation.

tip

Efficiently tailor Gunbot by personalizing the interface, managing notifications, using chart timescale marks, and visualizing your custom strategy.

Customizing Gunbot can make your trading workflow smoother and easier to manage. Try different personalization options to find the combination that works for you. The goal is to create an environment that fits your trading preferences and supports your decision-making process.