<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <id>https://www.gunbot.com/blog/</id>
    <title>Gunbot Blog Blog</title>
    <updated>2026-11-26T00:00:00.000Z</updated>
    <generator>https://github.com/jpmonette/feed</generator>
    <link rel="alternate" href="https://www.gunbot.com/blog/"/>
    <subtitle>Gunbot Blog Blog</subtitle>
    <icon>https://www.gunbot.com/blog/img/favicon.ico</icon>
    <rights>Copyright © Gunbot.com 2026</rights>
    <entry>
        <title type="html"><![CDATA[Introducing OracleAI: Build a trading bot from your own rules]]></title>
        <id>https://www.gunbot.com/blog/introducing-oracleai/</id>
        <link href="https://www.gunbot.com/blog/introducing-oracleai/"/>
        <updated>2026-11-26T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Describe a crypto trading strategy in plain English, review and refine the rules, then backtest or paper trade them with OracleAI.]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/oracleai-launch-cover.webp" alt="OracleAI workflow illustrated with a prompt, rule settings, and an approval checkmark" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">OracleAI workflow illustrated with a prompt, rule settings, and an approval checkmark</figcaption></figure>
<p>Say you want a bot to buy when a fast moving average crosses above a slower one, but only while the price is above a longer-term moving average. Then you want to cut the allocation in half and see how the revised rules would have behaved in a backtest. In <a href="https://www.gunbot.com/oracleai/" target="_blank" rel="noopener" class="">OracleAI</a>, you can describe the strategy and that follow-up in plain English.</p>
<p>OracleAI is a standalone crypto trading bot that runs locally. Its AI Studio drafts a set of rules from your instructions so you can inspect the entry, exit, and position size before you approve them. The trading engine then runs the rules you approved independently of the AI builder.</p>
<!-- -->
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="describe-the-trade-you-want-the-bot-to-make">Describe the trade you want the bot to make<a href="https://www.gunbot.com/blog/introducing-oracleai/#describe-the-trade-you-want-the-bot-to-make" class="hash-link" aria-label="Direct link to Describe the trade you want the bot to make" title="Direct link to Describe the trade you want the bot to make" translate="no">​</a></h2>
<p>Here’s an example you could give AI Studio for a BTC/USDT spot strategy:</p>
<blockquote>
<p>Buy when the 20-period EMA crosses above the 50-period EMA and price is above the 200-period EMA. Exit when the 20-period EMA crosses back below the 50-period EMA. Use 10% of available capital per entry.</p>
</blockquote>
<p>The review is where you check the details. A crossover and a price filter do different jobs. The crossover triggers the entry, and the price filter has to be true at the same time. Look for both conditions in the entry rules, then check the reverse crossover under the exit rules and the 10% allocation under position size.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="change-one-thing-and-review-it-again">Change one thing and review it again<a href="https://www.gunbot.com/blog/introducing-oracleai/#change-one-thing-and-review-it-again" class="hash-link" aria-label="Direct link to Change one thing and review it again" title="Direct link to Change one thing and review it again" translate="no">​</a></h2>
<p>Now ask AI Studio to change the allocation to 5% and keep the entry and exit conditions as they are. Check the revised size and reread the entry and exit before approving. That makes it easy to try a smaller position while keeping the same trading logic.</p>
<p>Moving-average signals are one starting point. You can also describe a spot grid in terms of its price range, number of intervals, and total allocation, or build rules for supported futures markets. The <a href="https://www.gunbot.com/oracleai/#how-it-works" target="_blank" rel="noopener" class="">OracleAI product page</a> shows how a follow-up changes the rules for a signal strategy and a spot grid.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="see-when-the-rules-actually-trigger">See when the rules actually trigger<a href="https://www.gunbot.com/blog/introducing-oracleai/#see-when-the-rules-actually-trigger" class="hash-link" aria-label="Direct link to See when the rules actually trigger" title="Direct link to See when the rules actually trigger" translate="no">​</a></h2>
<p>In a backtest, OracleAI replays historical candles and shows the simulated trades, returns, and drawdown. Start with the trades on the chart. Pick a crossover and compare it with the entry rule. Was the price above the 200-period EMA at that point? If a trade opened, where did the reverse crossover close it?</p>
<p>Paper trading runs the same approved rules on current exchange market data with simulated capital. The Terminal shows trade markers on the price chart, and its comparison view puts two strategies side by side. Live trading is a separate step you explicitly activate with a compatible exchange. Live trades can lose money, and simulation results offer no guarantee of future performance.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="run-oracleai-on-your-own-machine">Run OracleAI on your own machine<a href="https://www.gunbot.com/blog/introducing-oracleai/#run-oracleai-on-your-own-machine" class="hash-link" aria-label="Direct link to Run OracleAI on your own machine" title="Direct link to Run OracleAI on your own machine" translate="no">​</a></h2>
<p>OracleAI runs as a small executable on Windows, Linux, and macOS, with an interface you open in your browser. Bring your own API key from OpenAI, Anthropic (Claude), or Google (Gemini) for AI Studio. For automated execution, keep OracleAI running and connected.</p>
<p>OracleAI has a standalone lifetime license and is also included with Gunbot Unlimited, including the Unlimited plan for existing Gunbot lifetime license holders.</p>
<p><a href="https://www.gunbot.com/oracleai/" target="_blank" rel="noopener" class="">Explore OracleAI and try the rule examples</a>.</p>]]></content>
        <author>
            <name>Gunbot</name>
            <uri>https://www.gunbot.com/</uri>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Testing Gunbot strategies in ATAS Market Replay]]></title>
        <id>https://www.gunbot.com/blog/gunbot-atas-market-replay/</id>
        <link href="https://www.gunbot.com/blog/gunbot-atas-market-replay/"/>
        <updated>2026-11-24T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Replay a past market session in ATAS X with Gunbot EMA / VWAP. Examine the chart around a signal and see how simulated orders are handled.]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/atas-market-replay-cover.webp" alt="Illustration of an ATAS X Replay chart and the Gunbot dashboard" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">Illustration of an ATAS X Replay chart and the Gunbot dashboard</figcaption></figure>
<p>If EMA9 crosses VWAP midway through a candle, the finished chart can hide what the market looked like when the strategy signaled. <strong>ATAS X Market Replay</strong> lets you pause at that moment and inspect the chart. <strong>Gunbot</strong> shows when the signal fired and what happened to any simulated order that followed.</p>
<p>Try it with Gunbot EMA / VWAP. Run the same market period twice on your ATAS chart. The first pass lets you study the signal. The second lets you follow a simulated order through its fill and exit.</p>
<!-- -->
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="what-atas-adds-to-the-test">What ATAS adds to the test<a href="https://www.gunbot.com/blog/gunbot-atas-market-replay/#what-atas-adds-to-the-test" class="hash-link" aria-label="Direct link to What ATAS adds to the test" title="Direct link to What ATAS adds to the test" translate="no">​</a></h2>
<p>ATAS is built for volume and order-flow analysis. Its footprint charts show how much volume traded at each price inside a candle. A two-minute candle can close near its high even if most of its volume traded lower in the range. That helps you read the market around a signal. The signal itself comes from the strategy’s EMA / VWAP crossover rules.</p>
<p>Market Replay gives you control of the clock. Slow playback around a price move, pause to inspect a candle, then resume to see what follows. Available detail depends on the instrument and Replay data you select. <a href="https://atas.net/volume-analysis/footprint-charts/" target="_blank" rel="noopener nofollow" class="">ATAS footprint charts</a> · <a href="https://atas.net/modules/market-replay/" target="_blank" rel="noopener nofollow" class="">ATAS Market Replay</a></p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="set-up-the-session">Set up the session<a href="https://www.gunbot.com/blog/gunbot-atas-market-replay/#set-up-the-session" class="hash-link" aria-label="Direct link to Set up the session" title="Direct link to Set up the session" translate="no">​</a></h2>
<p>Once you’ve <a href="https://www.gunbot.com/support/docs/guides/integrations-and-extras/atas/#connection" target="_blank" rel="noopener" class="">connected ATAS X and Gunbot</a>, choose an instrument and a historical period you can replay more than once.</p>
<ul>
<li class="">Set the ATAS chart to two-minute candles with UTC feed timestamps.</li>
<li class="">Load at least 20 bars. VWAP resets at 5 p.m. Chicago time, so note whether your window crosses that boundary.</li>
<li class="">Record the instrument, time window and Replay data mode so you can keep them fixed across passes.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="first-pass-with-signals-only">First pass with signals only<a href="https://www.gunbot.com/blog/gunbot-atas-market-replay/#first-pass-with-signals-only" class="hash-link" aria-label="Direct link to First pass with signals only" title="Direct link to First pass with signals only" translate="no">​</a></h2>
<p>Add <strong>Gunbot EMA / VWAP</strong> to the ATAS X chart, select the <strong>Replay</strong> account and leave <strong>Send orders in Market Replay</strong> off. Start the strategy and press Play in ATAS. When a signal appears, pause and note its timestamp and side in Gunbot’s <strong>Recent signals</strong> table.</p>
<p>Find the same moment on the ATAS chart and check which way EMA9 moved through VWAP. For a signal at <strong>14:32:18</strong>, like the one in the illustration, look at the 14:32 candle. If the Replay data supports a footprint view, see where volume traded within that candle. A session can stay connected and produce no signal if a qualifying crossover never occurs.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="second-pass-with-simulated-orders">Second pass with simulated orders<a href="https://www.gunbot.com/blog/gunbot-atas-market-replay/#second-pass-with-simulated-orders" class="hash-link" aria-label="Direct link to Second pass with simulated orders" title="Direct link to Second pass with simulated orders" translate="no">​</a></h2>
<p>Start the same period with no open position or working orders on the Replay instrument. With the strategy stopped, enable <strong>Send orders in Market Replay</strong> in ATAS and check the quantity before you restart. See the <a href="https://www.gunbot.com/support/docs/guides/integrations-and-extras/atas/#simulated-orders" target="_blank" rel="noopener" class="">setup guide’s order steps</a> for the full sequence.</p>
<p>When a signal appears, look for the resulting order in Gunbot’s <strong>Simulated orders</strong> table. Check the status and filled quantity. If it fills, check the average entry price in <strong>Replay position</strong> and follow the position through its exit. If you see a signal and no order, check the account and order setting in ATAS. If you see an order and no fill, check the order status.</p>
<p>Before you stop the strategy, check for open positions and working orders in ATAS. The strategy manages its stop, target and trailing levels while it runs.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="change-one-thing-and-replay-the-same-period">Change one thing and replay the same period<a href="https://www.gunbot.com/blog/gunbot-atas-market-replay/#change-one-thing-and-replay-the-same-period" class="hash-link" aria-label="Direct link to Change one thing and replay the same period" title="Direct link to Change one thing and replay the same period" translate="no">​</a></h2>
<p>Once you have a baseline, repeat the same period with one setting changed. For example, change the order quantity and compare the filled quantity and resulting position in Gunbot. That gives you a concrete way to check whether the strategy used the new setting.</p>
<p>Replay lets you inspect strategy behavior in the period you chose. Live fills can differ from simulated fills. When you’re ready to try a different chart setup or strategy, start with the <a href="https://www.gunbot.com/support/docs/guides/integrations-and-extras/atas/#strategies" target="_blank" rel="noopener" class="">ATAS strategy reference</a> or see <a href="https://www.gunbot.com/features/atas-integration/" target="_blank" rel="noopener" class="">how the integration works</a>.</p>]]></content>
        <author>
            <name>Gunbot</name>
            <uri>https://www.gunbot.com/</uri>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Wick Magic Futures: The OrderFlow Strategy Built for Longs, Shorts and Leverage]]></title>
        <id>https://www.gunbot.com/blog/wick-magic-futures-orderflow-strategy/</id>
        <link href="https://www.gunbot.com/blog/wick-magic-futures-orderflow-strategy/"/>
        <updated>2026-11-05T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[A Gunbot strategy that reads live order-book pressure, trades longs and shorts, and protects leverage on Hyperliquid, Binance, Kraken Futures and DyDX."]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/wick-magic-futures-header.png" alt="Wick Magic Futures: The OrderFlow Strategy Built for Longs, Shorts and Leverage" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">Wick Magic Futures: The OrderFlow Strategy Built for Longs, Shorts and Leverage</figcaption></figure>
<p>Most bots fail at futures for one simple reason: they treat it like spot. They flip a buy into a sell, add some leverage and hope for the best. But a short is not a reversed long. Funding fees, open interest, margin and liquidation prices change everything about how a position should be opened, grown and protected.</p>
<p><strong>Wick Magic Futures</strong> was built from the ground up for derivatives. It reads what the market is doing right now, trades both directions with the right logic for each side, and wraps every leveraged position in layers of protection that keep working even when you are asleep.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="-built-for-futures-not-converted-from-spot">🔄 Built for Futures, Not Converted From Spot<a href="https://www.gunbot.com/blog/wick-magic-futures-orderflow-strategy/#-built-for-futures-not-converted-from-spot" class="hash-link" aria-label="Direct link to 🔄 Built for Futures, Not Converted From Spot" title="Direct link to 🔄 Built for Futures, Not Converted From Spot" translate="no">​</a></h2>
<p>In a long you fear resistance. In a short you fear support. Wick Magic Futures knows the difference, and it adapts its entries, its DCA and its exits to the side you are on. It even knows the difference between <strong>averaging down</strong> to save a trade and <strong>scaling in</strong> to add to a winner.</p>
<p>There is no guessed math either. Margin usage, ROE, unrealized PnL (with funding already included) and your liquidation price are read straight from the exchange. The strategy runs natively on <strong>Hyperliquid, dYdX v4, Binance Futures, Kraken Futures and AsterDex</strong>, and it picks the right exchange adapter from the pair itself, so a position is never read the wrong way.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="-it-reads-the-market-not-the-chart">🌊 It Reads the Market, Not the Chart<a href="https://www.gunbot.com/blog/wick-magic-futures-orderflow-strategy/#-it-reads-the-market-not-the-chart" class="hash-link" aria-label="Direct link to 🌊 It Reads the Market, Not the Chart" title="Direct link to 🌊 It Reads the Market, Not the Chart" translate="no">​</a></h2>
<p><em>Why look at where the price was, when you can see where it is going?</em></p>
<p>The heart of Wick Magic Futures is the <strong>OrderFlow engine</strong>. Instead of waiting for a candle to close, it watches two live sources: the <strong>order book</strong>, where every pending buy and sell is waiting, and the <strong>trade tape</strong>, where real orders are actually being filled. From that it builds a live pressure score, from pure selling to pure buying.</p>
<p>The two have to agree. A bullish book with aggressive sellers on the tape is a warning, not an entry, and the bot skips it.</p>
<p>And you never have to guess the right thresholds. A built-in <strong>Genetic Algorithm</strong> calibrates them for each pair on its own recent history, and recalibrates automatically when volatility shifts or the market runs hard in one direction. BTC, ETH and SOL each end up with their own numbers, worked out for you.</p>
<p>Trading a pair where the book is thin? The <strong>Cross-Exchange Signal Pair</strong> lets you read the order book and tape from a deeper market, for example ETH on Binance Futures, while you execute on Hyperliquid.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="️-levels-that-pick-a-side">🏗️ Levels That Pick a Side<a href="https://www.gunbot.com/blog/wick-magic-futures-orderflow-strategy/#%EF%B8%8F-levels-that-pick-a-side" class="hash-link" aria-label="Direct link to 🏗️ Levels That Pick a Side" title="Direct link to 🏗️ Levels That Pick a Side" translate="no">​</a></h2>
<p>A clean signal in the middle of nowhere is still a weak trade. Wick Magic Futures maps support and resistance across several timeframes and anchors entries to the levels the market has actually respected.</p>
<ul>
<li class=""><strong>Smart S/R Bias</strong> decides which direction is allowed. Near support, it looks for longs. Near resistance, it looks for shorts.</li>
<li class=""><strong>No buying into a wall.</strong> Longs are kept away from just under a higher-timeframe resistance, and shorts from just above a higher-timeframe support.</li>
<li class=""><strong>Breaks are confirmed properly.</strong> A few 5-minute candles can never flip a 4h or daily level on their own.</li>
<li class=""><strong>S/R Direction Exit</strong> cuts a small, fresh position early when the structure turns against it, before a small loss becomes a big one.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="-knowing-when-not-to-trade">🚦 Knowing When Not to Trade<a href="https://www.gunbot.com/blog/wick-magic-futures-orderflow-strategy/#-knowing-when-not-to-trade" class="hash-link" aria-label="Direct link to 🚦 Knowing When Not to Trade" title="Direct link to 🚦 Knowing When Not to Trade" translate="no">​</a></h2>
<p>The best trade is sometimes no trade at all. Wick Magic Futures checks whether the market is worth trading before it ever looks at an entry.</p>
<ul>
<li class=""><strong>Market regime filters</strong> keep it out of dead, violent, fading or sideways markets.</li>
<li class=""><strong>Trap detection</strong> catches bull and bear traps before you step into them, while <strong>institutional absorption</strong> spots when big players are defending a level.</li>
<li class=""><strong>Institution Hours</strong> gives full power during the London and New York sessions, and switches to a stricter scout mode, or a full pause, outside them.</li>
<li class=""><strong>Funding Rate Guard</strong> stops new entries and DCA when funding gets extreme, optionally only when your side is the one paying.</li>
<li class=""><strong>Open Interest Guard</strong> steps aside when leverage across the whole market builds up to the classic liquidation-cascade setup.</li>
</ul>
<p>And when the bot decides to wait, it tells you why. The <strong>🚦 Entry Gate</strong> tile in the sidebar shows exactly which gate is holding back a fresh entry. No more wondering why the bot isn't trading.</p>
<p><img decoding="async" loading="lazy" alt="Wick Magic Futures running on USDC-SOL on Hyperliquid in Gunbot, with multi-timeframe support and resistance, liquidation cluster lines, take profit and re-entry levels on the chart" src="https://www.gunbot.com/blog/assets/images/gunbot-wick-magic-futures-hyperliquid-chart-b41c3361064e79168dfe14f0972bafee.png" width="2000" height="960" class="img_SS3x"></p>
<p><em>A live SOL long on Hyperliquid: support and resistance from 5m to 1D, the nearest liquidation clusters, the take profit and the next re-entry level, all drawn on the chart, with the full position state in the sidebar.</em></p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="️-protection-that-never-sleeps">🛡️ Protection That Never Sleeps<a href="https://www.gunbot.com/blog/wick-magic-futures-orderflow-strategy/#%EF%B8%8F-protection-that-never-sleeps" class="hash-link" aria-label="Direct link to 🛡️ Protection That Never Sleeps" title="Direct link to 🛡️ Protection That Never Sleeps" translate="no">​</a></h2>
<p>Leverage rewards discipline and punishes everything else. That is why protection is not an add-on in Wick Magic Futures, it is built into every layer.</p>
<ul>
<li class=""><strong>🔪 Kill Position</strong> is your last line of defence: a hard stop, a trailing stop that can never close at a loss, and a flat take profit, in fixed dollars or scaled to the volatility of the pair.</li>
<li class=""><strong>🧯 DCA Guard</strong> never doubles your position right before the stop.</li>
<li class=""><strong>🚨 Circuit Breaker</strong> blocks new entries for the rest of the day once your daily loss limit is reached. Exits keep working.</li>
<li class=""><strong>🛟 Liquidation Guard</strong> keeps a safe distance between price and your liquidation level.</li>
<li class=""><strong>🪂 Exchange Safety Net</strong> places real stop-loss and take-profit orders directly on Hyperliquid. They survive a bot crash, a server reboot or an internet outage, and they move and resize automatically as your position changes.</li>
</ul>
<p>Most bots protect you only while they are running. On Hyperliquid, Wick Magic Futures keeps protecting you even when it isn't.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="-see-where-the-big-wicks-come-from">🧲 See Where the Big Wicks Come From<a href="https://www.gunbot.com/blog/wick-magic-futures-orderflow-strategy/#-see-where-the-big-wicks-come-from" class="hash-link" aria-label="Direct link to 🧲 See Where the Big Wicks Come From" title="Direct link to 🧲 See Where the Big Wicks Come From" translate="no">​</a></h2>
<p>Every leveraged trader has a liquidation price, and when many of them sit at the same level, they form a <strong>cluster</strong>. When price reaches it, all those forced orders hit the market at once. That is where the long wicks come from, and price often runs straight to them before turning.</p>
<p>The new <strong>Liquidation Map</strong> (experimental, Hyperliquid) shows the nearest clusters above and below price, both in the sidebar and as lines on the chart. You can see the flush zone under your long, or the squeeze fuel above your short, before it happens.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="-soft-reductions-selling-below-entry-on-purpose">📉 Soft Reductions: Selling Below Entry, On Purpose<a href="https://www.gunbot.com/blog/wick-magic-futures-orderflow-strategy/#-soft-reductions-selling-below-entry-on-purpose" class="hash-link" aria-label="Direct link to 📉 Soft Reductions: Selling Below Entry, On Purpose" title="Direct link to 📉 Soft Reductions: Selling Below Entry, On Purpose" translate="no">​</a></h2>
<p>This is one of the features I'm most proud of, and very few strategies do it.</p>
<p>On a futures exchange, all your DCA fills are averaged into a single entry price. When price bounces above your cheapest fills but not yet above that average, most bots simply sit and wait. Nothing can be sold, the position is frozen, and too often the market rolls over again before it ever recovers.</p>
<p>With <strong>Allow Partial Close Below Entry</strong> switched on, Wick Magic Futures stops looking at the position as one block and looks at it fill by fill. The units you bought cheaper are closed while they are in profit, even though price is still below your average entry. I call these <strong>soft reductions</strong>. The exchange books them as a small realized loss against the average, but the units you sold were bought lower, so you cut exposure and turn the chop into realized gains instead of waiting for a full recovery that may never come.</p>
<p>The <strong>True Cost Basis</strong> keeps track of the real cost of what you still hold, and your targets, trailing, re-entries and DCA all follow it. It works for longs and shorts, it shines in ranging markets with a well-spread DCA ladder, and it is fully optional: off by default, one switch to turn it on.</p>
<p><img decoding="async" loading="lazy" alt="Wick Magic Futures soft reductions on USDT-AAVE on Binance Futures: partial sells below the entry price on every bounce during a dip" src="https://www.gunbot.com/blog/assets/images/gunbot-wick-magic-futures-soft-reductions-chart-4d112363f04fc67a450d0193a8644e2e.png" width="2069" height="959" class="img_SS3x"></p>
<p><em>AAVE on Binance Futures. Green arrows are buys, yellow arrows are sells. When price dips below the entry line, the bot doesn't freeze: it keeps selling the cheaper fills on every bounce and buys them back lower.</em></p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="-not-a-backtest-three-months-of-live-forward-testing">📊 Not a Backtest: Three Months of Live Forward Testing<a href="https://www.gunbot.com/blog/wick-magic-futures-orderflow-strategy/#-not-a-backtest-three-months-of-live-forward-testing" class="hash-link" aria-label="Direct link to 📊 Not a Backtest: Three Months of Live Forward Testing" title="Direct link to 📊 Not a Backtest: Three Months of Live Forward Testing" translate="no">​</a></h2>
<p>Backtests are easy to make look good, so I let the strategy prove itself in real time instead. Since August 2026 it has been forward testing 24/7 on a Binance Futures demo account, against the live market and the live order book, with no hindsight and no curve fitting.</p>
<p>Starting from <strong>10,000 USD</strong> (5,000 USDT and 5,000 USDC), it has closed more than 16,000 trades across 10 pairs in just over three months, for <strong>+6,710 USDT in realized profit, about 67% on the starting capital</strong>, with <strong>83 profitable days against 15 losing ones</strong>. At the time of writing, the whole account runs at around 3.6x real leverage with a margin ratio under 3%, a long way from liquidation.</p>
<p>Sells outnumber buys more than two to one. That is partial closes and soft reductions at work, taking profit piece by piece instead of waiting for one perfect exit. Not every pair is green. ETH is in the red because that is where I deliberately tested the Kill Position emergency close while I was building it. I left it in, because an honest track record shows the tests too.</p>
<p><img decoding="async" loading="lazy" alt="Wick Magic Futures realized PnL curve on Binance Futures, climbing steadily from August to November 2026" src="https://www.gunbot.com/blog/assets/images/gunbot-wick-magic-futures-realized-pnl-curve-2a8a855ac3bc91a51d4532a41c4694ed.png" width="1370" height="550" class="img_SS3x"></p>
<p><em>Forward test on Binance Futures demo trading with live market data. Past performance is no guarantee of future results.</em></p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="-growing-positions-the-smart-way">📈 Growing Positions the Smart Way<a href="https://www.gunbot.com/blog/wick-magic-futures-orderflow-strategy/#-growing-positions-the-smart-way" class="hash-link" aria-label="Direct link to 📈 Growing Positions the Smart Way" title="Direct link to 📈 Growing Positions the Smart Way" translate="no">​</a></h2>
<ul>
<li class=""><strong>Auto-ATR DCA</strong> spaces your DCA orders according to volatility, so the ladder breathes with the market.</li>
<li class=""><strong>DCA Multipliers</strong> (experimental) can make each DCA buy a bit bigger the deeper the ladder goes, always with a hard cap, so your average comes back faster.</li>
<li class=""><strong>Win Streak</strong> (experimental) grows your next entry after every winning cycle, and drops straight back to base size after a DCA or a losing close.</li>
<li class=""><strong>Scale-In</strong> adds to a winning position, with separate limits for longs and shorts.</li>
<li class=""><strong>Compound Profits</strong> grows your trade size in step with your real return on capital, and gently shrinks it back after a loss.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="-the-classic-engine-is-still-there">🎯 The Classic Engine Is Still There<a href="https://www.gunbot.com/blog/wick-magic-futures-orderflow-strategy/#-the-classic-engine-is-still-there" class="hash-link" aria-label="Direct link to 🎯 The Classic Engine Is Still There" title="Direct link to 🎯 The Classic Engine Is Still There" translate="no">​</a></h2>
<p>Prefer structural technical analysis? The battle-tested Wick Magic TA engine is fully adapted for futures: precise Heikin Ashi, RSI and breakout entries, trend shields, elastic trailing and FGI Mimix scaling, which puts more to work during fear and less during greed.</p>
<p>With AUTO direction, the <strong>Institutional Trend Mode</strong> decides whether the bot should be long or short, with five trend engines to choose from, including <strong>Confluence</strong>, which only commits to a direction when enough independent signals agree.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="-nothing-is-hidden">📟 Nothing Is Hidden<a href="https://www.gunbot.com/blog/wick-magic-futures-orderflow-strategy/#-nothing-is-hidden" class="hash-link" aria-label="Direct link to 📟 Nothing Is Hidden" title="Direct link to 📟 Nothing Is Hidden" translate="no">​</a></h2>
<p>Everything the strategy thinks is on screen. The Gunbot sidebar shows your performance, position, risk, signal, trend filters, funding and open interest live, grouped in clear sections. Your entry, target, true cost, kill stop and support and resistance levels are drawn right on the chart. You always know what the bot is doing, and why.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="️-built-together-with-the-community">❤️ Built Together With the Community<a href="https://www.gunbot.com/blog/wick-magic-futures-orderflow-strategy/#%EF%B8%8F-built-together-with-the-community" class="hash-link" aria-label="Direct link to ❤️ Built Together With the Community" title="Direct link to ❤️ Built Together With the Community" translate="no">​</a></h2>
<p>Wick Magic Futures is the result of a huge amount of work, countless hours of testing and real dedication. But it was never built alone.</p>
<p>A big thank you to the whole <strong>Wick Magic community</strong>. Many of the features in this post exist because of you. Ideas come from the people trading it every day, they are discussed together, and together we decide what gets built next. Every bug report, every chart, every idea and every honest piece of feedback has made this strategy better. Thank you for being part of it.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="️-a-word-on-risk">⚠️ A Word on Risk<a href="https://www.gunbot.com/blog/wick-magic-futures-orderflow-strategy/#%EF%B8%8F-a-word-on-risk" class="hash-link" aria-label="Direct link to ⚠️ A Word on Risk" title="Direct link to ⚠️ A Word on Risk" translate="no">​</a></h2>
<p>Futures trading with leverage carries real risk. Leverage multiplies losses as quickly as it multiplies gains, positions can be liquidated, and fast markets can move further than any stop expects. No strategy, this one included, can promise profits, and past results do not guarantee future ones.</p>
<p>Start small, learn how the strategy behaves on your pairs, keep Kill Position and the Circuit Breaker switched on, and only trade with money you can afford to lose. Nothing in this post is financial advice.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="-before-you-start">🛒 Before You Start<a href="https://www.gunbot.com/blog/wick-magic-futures-orderflow-strategy/#-before-you-start" class="hash-link" aria-label="Direct link to 🛒 Before You Start" title="Direct link to 🛒 Before You Start" translate="no">​</a></h2>
<p>Wick Magic Futures runs inside Gunbot, so you will need a Gunbot license that supports your exchange, or a <strong>Gunbot Unlimited subscription</strong>, our top plan, which covers them all. Hyperliquid and dYdX v4 require <strong>Gunbot Defi or Unlimited</strong>. The strategy itself is sold separately: see the <a href="https://www.gunbot.com/devcommunity/wickmagic-futures/" target="_blank" rel="noopener" class="">Wick Magic Futures page</a> for the current price and availability.</p>
<p>The OrderFlow engine shines on deep, liquid markets like BTC, ETH and SOL, where the order book carries real information. You don't need to master every setting on day one: ready-made <strong>presets</strong> for scalping, higher-conviction institutional entries and multi-pair Hyperliquid trading let you start with a proven setup. Every feature is documented in detail in the wiki, and the <a href="https://t.me/+xQtQ9Y4AOc9lZTNk" target="_blank" rel="noopener nofollow" class="">Telegram community</a> is there whenever you have a question.</p>
<p>If you trade futures with Gunbot and want a strategy that understands longs, shorts and leverage as well as you do, Wick Magic Futures was built for you.</p>]]></content>
        <author>
            <name>Uri</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Choosing a Gunbot strategy for NinjaTrader 8: bars, sessions and sizing]]></title>
        <id>https://www.gunbot.com/blog/choosing-gunbot-strategy-ninjatrader-8/</id>
        <link href="https://www.gunbot.com/blog/choosing-gunbot-strategy-ninjatrader-8/"/>
        <updated>2026-10-23T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Explore Gunbot strategy profiles for NinjaTrader 8 and learn how chart bars, sessions and contract sizing help you choose a setup to evaluate.]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/ninjatrader-header-cover.webp" alt="Symbolic image: NinjaTrader and Gunbot" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">Symbolic image: NinjaTrader and Gunbot</figcaption></figure>
<p>StepGrid on a NinjaTrader chart: the name is familiar, but the account, bars and contract sizing belong to a different trading environment. Those are the decisions to make before you start comparing strategy results.</p>
<p>Gunbot adds strategy profiles you can run inside NinjaTrader 8. If you already use NinjaScript strategies, this gives you another set of trading rules to explore in a familiar environment. Start with how a profile reads the market, then match its bars, session and sizing to the setup you want to evaluate.</p>
<!-- -->
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="start-with-the-strategy-you-want-to-evaluate">Start with the strategy you want to evaluate<a href="https://www.gunbot.com/blog/choosing-gunbot-strategy-ninjatrader-8/#start-with-the-strategy-you-want-to-evaluate" class="hash-link" aria-label="Direct link to Start with the strategy you want to evaluate" title="Direct link to Start with the strategy you want to evaluate" translate="no">​</a></h2>
<p>Start with classic Gunbot strategies you may already know: StepGrid, SpotGrid, StepGrid Scalp and others. In NinjaTrader, their classes have a GB prefix—for example, GBStepGrid and GBStepGridScalp. The catalog also includes specialist profiles with their own chart and data requirements.</p>
<p>These are adapted NinjaTrader editions. Their directional signals, protection and trailing rules do not reproduce every part of the original crypto runtime’s inventory, DCA or hedge behavior. Choose them by their NinjaTrader settings, rather than copying a crypto configuration unchanged.</p>
<p>These run as NinjaTrader strategy instances. You keep your native account connection, charts and data series, while Gunbot brings strategy charts, orders and available controls into one workspace. If you also use Gunbot for exchange trading, you can follow both kinds of setup from the same interface. Choose from the included NinjaTrader profiles; your existing NinjaScript strategies keep their own configuration.</p>
<p>Before choosing a name from the list, write down what you want to evaluate: a time-based or tick-based setup, the trading session, and the kind of position management you need to inspect. That makes the next comparison concrete.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="the-chart-is-part-of-the-strategy-choice">The chart is part of the strategy choice<a href="https://www.gunbot.com/blog/choosing-gunbot-strategy-ninjatrader-8/#the-chart-is-part-of-the-strategy-choice" class="hash-link" aria-label="Direct link to The chart is part of the strategy choice" title="Direct link to The chart is part of the strategy choice" translate="no">​</a></h2>
<p>Start with the bars the strategy reads. Two instances on the same instrument can make different decisions because they process different bars or session boundaries.</p>
<table><thead><tr><th>NinjaTrader strategy</th><th>Primary chart</th><th>Context to check</th></tr></thead><tbody><tr><td>GBStepGrid / GBSpotGrid / GBStepGridScalp</td><td>Minute bars</td><td>Instrument, selected interval and strategy settings</td></tr><tr><td>GBMeeks (specialist)</td><td>5 Minute</td><td>Session rules, data history and strategy parameters</td></tr><tr><td>GBEmaVwap</td><td>2 Minute</td><td>The chart series and session context used by EMA/VWAP logic</td></tr><tr><td>GBConfluenceEdge</td><td>610 Tick</td><td>Its 5 Minute secondary context and the required order-flow data/settings</td></tr><tr><td>GBRunnerGuard</td><td>Minute bars</td><td>Its 60 Minute secondary context and enabled data-dependent features</td></tr></tbody></table>
<p>For example, GBConfluenceEdge combines a 610-tick primary chart with five-minute context. That is a different starting point from GBMeeks on five-minute bars: your data connection and chart setup need to match the profile you choose.</p>
<p>Data access matters too. Check that your provider supplies the intraday data the strategy needs. A chart-based setup needs a working data connection as well as an account; specialist order-flow features may need additional data or settings.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="worked-example-bringing-stepgrid-scalp-into-your-workspace">Worked example: bringing StepGrid Scalp into your workspace<a href="https://www.gunbot.com/blog/choosing-gunbot-strategy-ninjatrader-8/#worked-example-bringing-stepgrid-scalp-into-your-workspace" class="hash-link" aria-label="Direct link to Worked example: bringing StepGrid Scalp into your workspace" title="Direct link to Worked example: bringing StepGrid Scalp into your workspace" translate="no">​</a></h2>
<p>Suppose you already use tick charts and want to try the NinjaTrader edition of StepGrid Scalp. Look for <strong>GBStepGridScalp</strong> in the strategy list. It uses Minute primary bars, so start with a separate Minute chart for the instrument you want to evaluate.</p>
<p>Choose the intended Sim101 account and review the chart interval and trading-hours template. Then set the strategy’s quantity, protection and entry controls. Keep these choices consistent while you observe the strategy: changing the session and the bars at the same time makes it harder to tell which change affected the behavior.</p>
<p>Watch the instance’s orders and protective levels in that context, then follow its published chart and activity in Gunbot. If you want a tick-based primary chart instead, compare the requirements of a tick-based profile, such as GBConfluenceEdge.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="sizing-means-contracts-and-instrument-specifications">Sizing means contracts and instrument specifications<a href="https://www.gunbot.com/blog/choosing-gunbot-strategy-ninjatrader-8/#sizing-means-contracts-and-instrument-specifications" class="hash-link" aria-label="Direct link to Sizing means contracts and instrument specifications" title="Direct link to Sizing means contracts and instrument specifications" translate="no">​</a></h2>
<p>In NinjaTrader, sizing starts with the contract. Check the instrument’s tick size and point value, then how the strategy expresses quantity, protection and monetary inputs. Use those specifications when setting the instance’s parameters.</p>
<p>Also distinguish a <strong>strategy position</strong> from the <strong>account position</strong>. NinjaTrader <a href="https://ninjatrader.com/support/helpGuides/nt8/strategy_position_vs_account_p.htm" target="_blank" rel="noopener nofollow" class="">documents these as separate concepts</a>. Manual trading or another instance can affect what the account holds, so “the strategy looks flat” and “this account has no exposure” are not interchangeable observations.</p>
<p>This distinction also explains why closing an account/instrument position is broader than pausing one strategy's new entries. A running instance can enter again after a flatten action unless the relevant entry behavior is paused.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="use-sim101-to-answer-specific-questions">Use Sim101 to answer specific questions<a href="https://www.gunbot.com/blog/choosing-gunbot-strategy-ninjatrader-8/#use-sim101-to-answer-specific-questions" class="hash-link" aria-label="Direct link to Use Sim101 to answer specific questions" title="Direct link to Use Sim101 to answer specific questions" translate="no">​</a></h2>
<p>Simulation is more useful when you decide in advance what to observe. Does the intended instance publish the right instrument and candles? Does the configured quantity mean what you expected? Do its protective levels and exits follow the chosen settings? What happens when you pause new entries while a position exists?</p>
<p>Treat those observations as a record of your configuration. Simulated fills can differ from live execution, so keep the account, data connection and session alongside any results you compare.</p>
<p>Keep installation and account troubleshooting separate from profile selection. If no candles appear because the instance has not been enabled for telemetry, resolve that connection problem before interpreting missing strategy signals.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="choose-the-next-step">Choose the next step<a href="https://www.gunbot.com/blog/choosing-gunbot-strategy-ninjatrader-8/#choose-the-next-step" class="hash-link" aria-label="Direct link to Choose the next step" title="Direct link to Choose the next step" translate="no">​</a></h2>
<p>The useful reason to add Gunbot is a strategy profile you want to investigate in the NinjaTrader environment you already use. Start with the chart and session it requires, understand its sizing and protection, and then decide whether the observed behavior fits your intended workflow.</p>
<p>The <a href="https://www.gunbot.com/features/ninjatrader-integration/" target="_blank" rel="noopener" class="">Gunbot NinjaTrader 8 integration</a> brings the profile selection, platform requirements and Unlimited offer together. Explore the available profiles and how they fit into your NinjaTrader workflow.</p>
<p>When you are ready to evaluate an instance, use the <a href="https://www.gunbot.com/support/docs/guides/integrations-and-extras/ninjatrader/" target="_blank" rel="noopener" class="">NinjaTrader and Sim101 setup guide</a>. That guide covers the Windows/remote-host connection, account checks and the steps from a chart instance to Gunbot's connected view.</p>]]></content>
        <author>
            <name>Gunbot</name>
            <uri>https://www.gunbot.com/</uri>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Gunbot on MT4 and MT5: how the strategy workflow differs from a standalone EA]]></title>
        <id>https://www.gunbot.com/blog/gunbot-mt4-mt5-strategy-workflow/</id>
        <link href="https://www.gunbot.com/blog/gunbot-mt4-mt5-strategy-workflow/"/>
        <updated>2026-10-23T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Use Gunbot strategies with your MT4 or MT5 account. Compare configuration, lot sizing and trade management with a standalone Expert Advisor workflow.]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/metatrader-header-cover.webp" alt="Symbolic image: MetaTrader and Gunbot" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">Symbolic image: MetaTrader and Gunbot</figcaption></figure>
<p>You have a MetaTrader account, a chart you know and a broker you want to keep. Adding Gunbot gives you another choice of automated trading strategies—and a different place to configure and follow them.</p>
<p>For an existing Gunbot user, names such as StepGrid, SpotGrid and StepGrid Scalp offer a familiar starting point. For an MT4 or MT5 trader who uses Expert Advisors, the useful question is practical: what changes when the strategy runs in Gunbot?</p>
<!-- -->
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="keep-the-terminal-choose-the-strategy">Keep the terminal, choose the strategy<a href="https://www.gunbot.com/blog/gunbot-mt4-mt5-strategy-workflow/#keep-the-terminal-choose-the-strategy" class="hash-link" aria-label="Direct link to Keep the terminal, choose the strategy" title="Direct link to Keep the terminal, choose the strategy" translate="no">​</a></h2>
<p>MetaTrader already provides an environment for automated trading. The reason to add Gunbot is its strategy selection, with configuration, charts, positions and orders together in the Gunbot workspace.</p>
<p>The integration includes adapted versions of classic Gunbot strategies such as StepGrid, SpotGrid and StepGrid Scalp, alongside specialist strategies. You select a strategy and configure it for the account and instrument you want to use. Your MetaTrader terminal remains connected to your broker. If you also run exchange bots, you can switch between those setups and MetaTrader in Gunbot rather than adding a separate monitoring workspace.</p>
<p>These are editions built for the platform. If you know a strategy from crypto trading, use that familiarity to find it in the catalog, then read its MetaTrader settings. The implementation does not reproduce every aspect of the original crypto runtime’s DCA inventory, hedging or market-making behavior.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="where-you-make-changes">Where you make changes<a href="https://www.gunbot.com/blog/gunbot-mt4-mt5-strategy-workflow/#where-you-make-changes" class="hash-link" aria-label="Direct link to Where you make changes" title="Direct link to Where you make changes" translate="no">​</a></h2>
<p>With a typical standalone EA, the strategy logic runs inside MetaTrader and you change its inputs there. MetaQuotes describes <a href="https://www.metatrader4.com/en/trading-platform/help/autotrading/experts" target="_blank" rel="noopener nofollow" class="">Expert Advisors as programs that automate analytical and trading processes</a>.</p>
<p>With Gunbot, the strategy engine runs in Gunbot. An EA called GunbotBridge connects it to the terminal, sharing account and chart data and submitting broker operations.</p>
<table><thead><tr><th>Your task</th><th>Typical standalone strategy EA</th><th>Gunbot with MT4/MT5</th></tr></thead><tbody><tr><td>Choose and configure trading rules</td><td>Select an EA and edit its inputs</td><td>Select a supported strategy and edit its settings in Gunbot</td></tr><tr><td>Set up the terminal connection</td><td>Attach the strategy EA to its chart</td><td>Attach GunbotBridge to the dedicated chart</td></tr><tr><td>Follow the strategy</td><td>Use the terminal and the EA’s tools</td><td>Use the connected charts, positions and orders in Gunbot</td></tr><tr><td>Execute broker operations</td><td>Through MetaTrader</td><td>Through MetaTrader</td></tr></tbody></table>
<p>You still use an EA, but its role is the connection. The trading rules and the workspace you return to are in Gunbot.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="a-familiar-name-a-new-account-setup">A familiar name, a new account setup<a href="https://www.gunbot.com/blog/gunbot-mt4-mt5-strategy-workflow/#a-familiar-name-a-new-account-setup" class="hash-link" aria-label="Direct link to A familiar name, a new account setup" title="Direct link to A familiar name, a new account setup" translate="no">​</a></h2>
<p>Suppose you use StepGrid in Gunbot and want to try its MetaTrader edition. Start by choosing the broker’s symbol, the chart period and a demo account. Those choices define the market data and account context the strategy will use.</p>
<p>Next comes sizing. In Gunbot, <strong>Lots per strategy unit</strong> converts the strategy’s quantity into broker lots. One strategy unit is not automatically one lot. Set that conversion and the maximum size deliberately, using the broker’s instrument specifications.</p>
<p>The rest of the configuration belongs to this account too: use a distinct magic number and the correct broker-history UTC offset. Save the reviewed configuration, then enable the saved strategy as a separate action.</p>
<p>Now compare what you see in Gunbot with the demo terminal: the intended symbol, order size, protective levels and exits. This gives you a concrete view of how the strategy works in its new environment, rather than relying on the familiar name alone.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="what-to-check-before-choosing-a-profile">What to check before choosing a profile<a href="https://www.gunbot.com/blog/gunbot-mt4-mt5-strategy-workflow/#what-to-check-before-choosing-a-profile" class="hash-link" aria-label="Direct link to What to check before choosing a profile" title="Direct link to What to check before choosing a profile" translate="no">​</a></h2>
<p>The chart is part of the setup. For example, EmaVwap, an EMA/VWAP specialist profile, uses two-minute data; MT4 needs a maintained offline M2 chart for that period. Other profiles have different inputs. The setup guide lists those requirements together with the available strategies.</p>
<p>Your testing workflow changes too. GunbotBridge uses WebRequest, which is <a href="https://www.mql5.com/en/docs/network/webrequest" target="_blank" rel="noopener nofollow" class="">unavailable in MetaTrader’s Strategy Tester</a>. Use the connected demo-account workflow to observe this integration; it is not a self-contained Strategy Tester EA.</p>
<p>Once it is running, Gunbot gives you the connected view of positions and pending orders, plus available order and stop/target controls. Gunbot and the terminal connection need to remain active for software-managed actions. The guide covers those operating details.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="bring-your-strategy-workflow-to-metatrader">Bring your strategy workflow to MetaTrader<a href="https://www.gunbot.com/blog/gunbot-mt4-mt5-strategy-workflow/#bring-your-strategy-workflow-to-metatrader" class="hash-link" aria-label="Direct link to Bring your strategy workflow to MetaTrader" title="Direct link to Bring your strategy workflow to MetaTrader" translate="no">​</a></h2>
<p>The integration gives you a way to use Gunbot strategies while keeping your MetaTrader broker account. Choose a supported profile, configure it for that account and follow its trading activity in Gunbot.</p>
<p>Explore the <a href="https://www.gunbot.com/features/metatrader-integration/" target="_blank" rel="noopener" class="">Gunbot MetaTrader 4/5 integration</a> for the product overview and Unlimited inclusion. When you want to connect a terminal and try a strategy, follow the <a href="https://www.gunbot.com/support/docs/guides/integrations-and-extras/metatrader/" target="_blank" rel="noopener" class="">MT4/MT5 setup guide</a>.</p>]]></content>
        <author>
            <name>Gunbot</name>
            <uri>https://www.gunbot.com/</uri>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[This Trading Strategy Reads the Order Book Instead of Candles]]></title>
        <id>https://www.gunbot.com/blog/wick-magic-orderflow-strategy/</id>
        <link href="https://www.gunbot.com/blog/wick-magic-orderflow-strategy/"/>
        <updated>2026-03-18T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Explore Wick Magic's orderflow engine and how it uses live order-book pressure and trade data to make trading decisions.]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/orderflow-header.webp" alt="This Trading Strategy Reads the Order Book Instead of Candles" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">This Trading Strategy Reads the Order Book Instead of Candles</figcaption></figure>
<p>Most trading bots are chart readers. They wait for a candle to close, check a few indicators, and decide what to do based on something that already happened. Wick Magic's orderflow engine works differently, it reads the live order book and the real trade tape, and enters based on what the market is doing right now.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="two-engines-one-strategy">Two Engines, One Strategy<a href="https://www.gunbot.com/blog/wick-magic-orderflow-strategy/#two-engines-one-strategy" class="hash-link" aria-label="Direct link to Two Engines, One Strategy" title="Direct link to Two Engines, One Strategy" translate="no">​</a></h2>
<p><a href="https://www.gunbot.com/devcommunity/wickmagic/" target="_blank" rel="noopener" class="">Wick Magic</a> ships as two things. The first is a standard TA branch: Heikin Ashi candles, RSI, volume signals, breakout detection. Works on most pairs, easier to configure, good starting point if you just want something running.</p>
<p>The second is the OrderFlow engine, which is the more involved one and probably the reason you're reading this.</p>
<p>The orderflow side doesn't wait for candles. It reads two live data sources continuously: the order book (every pending buy and sell sitting on the exchange right now) and the Public Trade History, which is every order that actually executed in the last 90 seconds. From these it calculates an imbalance score from -1 to +1 representing current buying or selling pressure.</p>
<p>Both signals have to agree before anything happens. Order book showing strong buyer pressure and the tape confirming that buyers are the aggressive ones, actually initiating trades? Entry. Book looks bullish but the tape shows sellers driving things? The signals conflict and the bot skips it. The practical upside is that you're working off what the market is doing now rather than what it did a few candles ago.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="thresholds-that-adjust-themselves">Thresholds That Adjust Themselves<a href="https://www.gunbot.com/blog/wick-magic-orderflow-strategy/#thresholds-that-adjust-themselves" class="hash-link" aria-label="Direct link to Thresholds That Adjust Themselves" title="Direct link to Thresholds That Adjust Themselves" translate="no">​</a></h2>
<p>One problem most orderflow bots don't bother solving: a fixed threshold doesn't hold up across pairs and conditions. "Buy when imbalance is above 0.35" sounds reasonable until you realise that 0.35 on BTC during London open is a completely different signal than 0.35 on an altcoin at 3 AM.</p>
<p>Wick Magic runs a genetic algorithm in the background that handles this. It takes the last ~1000 candles of real data on a sliding window, generates around 60 candidate threshold pairs, breeds the best performers across 220 generations, and lands on whichever combination best predicted candle direction over that sample. The GA trains purely on combined imbalance versus actual candle direction, ATR only comes in as a regime-change detector, triggering early recalibration if volatility shifts enough between the regular four-hour cycles.</p>
<p>In practice this means USDT-ETH might calibrate to a buy threshold of 0.52 while USDT-BTC lands at 0.38. Same bot, different markets, different numbers, worked out automatically.</p>
<p>On a fresh deployment the bot won't enter any orderflow trades until it's collected 200 candles to calibrate against, which is roughly 15 hours on 5-minute candles. Restarts don't reset anything, samples, thresholds, and timers all persist to disk so it picks up exactly where it left off. Re-buys on existing positions are never blocked by warmup, only fresh entries on pairs without a bag.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="buying-near-levels-that-matter">Buying Near Levels That Matter<a href="https://www.gunbot.com/blog/wick-magic-orderflow-strategy/#buying-near-levels-that-matter" class="hash-link" aria-label="Direct link to Buying Near Levels That Matter" title="Direct link to Buying Near Levels That Matter" translate="no">​</a></h2>
<p>Even a clean orderflow signal is a lower-confidence trade if price is floating in the middle of nowhere. Wick Magic addresses this with a multi-timeframe S/R confluence engine that automatically identifies key price levels across three timeframes and looks for areas where they agree.</p>
<p>A 5m pivot at 2260 and a 4h pivot at 2263 sitting within 1% of each other merge into one confirmed zone. When S/R is enabled, orderflow entries are only allowed when price is within a configurable proximity of one of those zones. The practical effect is that signals which would otherwise fire randomly in open space get filtered out, and entries end up anchored to levels the market has actually respected before.</p>
<p><img decoding="async" loading="lazy" alt="Gunbot Wick Magic orderflow trading chart with support zones, trade markers, and order-book signals" src="https://www.gunbot.com/blog/assets/images/gunbot-wick-magic-orderflow-trading-chart-bace99f09a59a0939f81e62d36b02a59.png" width="1200" height="829" class="img_SS3x"></p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="trap-detection-and-absorption">Trap Detection and Absorption<a href="https://www.gunbot.com/blog/wick-magic-orderflow-strategy/#trap-detection-and-absorption" class="hash-link" aria-label="Direct link to Trap Detection and Absorption" title="Direct link to Trap Detection and Absorption" translate="no">​</a></h2>
<p>Markets fake moves. A bull trap pushes price up sharply then reverses. A bear trap dumps hard then bounces. Wick Magic cross-checks the order book shape against the trade tape to catch when a move looks suspicious, and blocks the entry or re-buy if a trap pattern is detected.</p>
<p>On the absorption side: when large players are defending a price level they absorb incoming sell pressure without letting price fall. High sell volume on tape, price barely moving, strong bid side holding. The strategy detects this pattern and treats it as extra confirmation, so a bearish tape signal alone isn't enough to block entry if the data suggests institutions are soaking up the selling.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="sentiment-scaling-and-session-awareness">Sentiment Scaling and Session Awareness<a href="https://www.gunbot.com/blog/wick-magic-orderflow-strategy/#sentiment-scaling-and-session-awareness" class="hash-link" aria-label="Direct link to Sentiment Scaling and Session Awareness" title="Direct link to Sentiment Scaling and Session Awareness" translate="no">​</a></h2>
<p>Two features that do quiet but useful work. FGI Mimix Scaling adjusts position size based on the Fear &amp; Greed Index, putting more in during fear periods and pulling back during greed. Most traders intend to do this and don't follow through, so having it run automatically removes that temptation.</p>
<p>Institution Hours recognises that while crypto trades 24/7, the order flow that makes book signals reliable concentrates between the London and New York sessions, roughly 7 AM to 9 PM UTC. Outside those hours you can either block new entries entirely or run in scout mode, which raises the conviction bar: the buy threshold goes up 40%, tape requirements tighten, and above-average volume is required before anything fires. Sells and partial exits are never affected regardless of which mode you're in.</p>
<p>There's also Compound Profits, which adjusts your trade size based on cumulative realised PnL across completed cycles. After a run of winning trades the next entries are slightly larger, after a losing one they shrink back. There's a floor at 25% of base size so it can't spiral, and the offset persists across restarts.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="the-ta-branch-isnt-just-filler">The TA Branch Isn't Just Filler<a href="https://www.gunbot.com/blog/wick-magic-orderflow-strategy/#the-ta-branch-isnt-just-filler" class="hash-link" aria-label="Direct link to The TA Branch Isn't Just Filler" title="Direct link to The TA Branch Isn't Just Filler" translate="no">​</a></h2>
<p>The classic side holds up on its own. DCA requires trend confirmation, has cooldown timers between entries, and includes a freeze zone that stops new purchases if price keeps dropping past a set level. That last part is more important than it sounds, unconstrained averaging into a falling market is how accounts quietly disappear.</p>
<p>You can also run both engines together: classic TA for entries with the orderflow gate handling partial exits. It's a reasonable way to test the exit engine before committing to full orderflow mode.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="before-you-buy">Before You Buy<a href="https://www.gunbot.com/blog/wick-magic-orderflow-strategy/#before-you-buy" class="hash-link" aria-label="Direct link to Before You Buy" title="Direct link to Before You Buy" translate="no">​</a></h2>
<p>A <a href="https://www.gunbot.com/plans/" target="_blank" rel="noopener" class="">Gunbot Unlimited subscription</a> is a prerequisite on top of the strategy cost, so factor that in. The orderflow engine works best on BTC, ETH, and SOL because those books are deep enough for the tape signal to carry real information. On thinner pairs it gets unreliable.</p>
<p>Configuration depth is real, genetic algorithm parameters, S/R zone sizing, iceberg detection, session gating, and more. The strategy ships with two presets though, one for fast 5m scalping and one for higher-conviction 15m entries during active sessions, and for most people those are a sensible place to start and probably fine to stay close to until you have enough context to know what you'd want to change.</p>
<p>The strategy is sold separately from Gunbot Unlimited; see the <a href="https://www.gunbot.com/devcommunity/wickmagic/" target="_blank" rel="noopener" class="">current Wick Magic page</a> for its live price and availability. Docs are thorough, logic is explained properly, and there's a Telegram community if you get stuck. If you're running Gunbot on liquid pairs and want to move beyond lagging indicators, this is built for that.</p>]]></content>
        <author>
            <name>@boekenbox</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[CopyTrading powered by Gunbot: a practical intro to GunbotHub]]></title>
        <id>https://www.gunbot.com/blog/copytrading-gunbothub-intro/</id>
        <link href="https://www.gunbot.com/blog/copytrading-gunbothub-intro/"/>
        <updated>2025-12-23T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[How GunbotHub connects strategy leaders and copytraders, how setup works, and what gets automated end to end.]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/copytrading-header.png" alt="CopyTrading powered by Gunbot: a practical intro to GunbotHub" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">CopyTrading powered by Gunbot: a practical intro to GunbotHub</figcaption></figure>
<p>If you want to jump straight in, the CopyTrading portal is here: <a href="https://copytrading.gunbot.com/" target="_blank" rel="noopener" class="">https://copytrading.gunbot.com</a>.</p>
<p>GunbotHub is a marketplace built around one job: connecting strategy leaders and copytraders so trades can be copied automatically through Gunbot.</p>
<p>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.</p>
<p>A few details make the whole thing click:</p>
<ul>
<li class="">Leaders can generate signals using <strong>Gunbot</strong> or <strong>TradingView</strong>.</li>
<li class="">Copytraders do not manually edit configs to get started; GunbotHub writes the relevant configuration into Gunbot when a strategy is enabled.</li>
<li class="">Exchange API keys remain inside the copytrader’s Gunbot setup. GunbotHub does not take those keys.</li>
</ul>
<p>You can also be both a leader and a copytrader under the same account, which matches how a lot of active traders actually work.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="first-time-setup-sign-in-verify-complete-your-profile">First-time setup: sign in, verify, complete your profile<a href="https://www.gunbot.com/blog/copytrading-gunbothub-intro/#first-time-setup-sign-in-verify-complete-your-profile" class="hash-link" aria-label="Direct link to First-time setup: sign in, verify, complete your profile" title="Direct link to First-time setup: sign in, verify, complete your profile" translate="no">​</a></h2>
<p>GunbotHub starts with a license check for everyone.</p>
<ul>
<li class="">Sign in with Google.</li>
<li class="">Enter your <strong>GUNTHY wallet address</strong> to verify your Gunbot license. This is the Ethereum address where you received GUNTHY tokens when you first purchased Gunbot.</li>
</ul>
<p>After that, the profile setup depends on what you want to do:</p>
<ul>
<li class=""><strong>Copytraders</strong> add their Gunbot URL so GunbotHub can push configuration automatically.</li>
<li class=""><strong>Leaders</strong> add payment details so earnings can be paid out.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="copying-a-strategy-what-you-do-what-gets-automated">Copying a strategy: what you do, what gets automated<a href="https://www.gunbot.com/blog/copytrading-gunbothub-intro/#copying-a-strategy-what-you-do-what-gets-automated" class="hash-link" aria-label="Direct link to Copying a strategy: what you do, what gets automated" title="Direct link to Copying a strategy: what you do, what gets automated" translate="no">​</a></h2>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="add-your-gunbot-url">Add your Gunbot URL<a href="https://www.gunbot.com/blog/copytrading-gunbothub-intro/#add-your-gunbot-url" class="hash-link" aria-label="Direct link to Add your Gunbot URL" title="Direct link to Add your Gunbot URL" translate="no">​</a></h3>
<p>In profile settings, enter the URL for your Gunbot instance.</p>
<ul>
<li class="">You can enter a domain name or an IP-based URL.</li>
<li class="">If you enter an IP address, GunbotHub can automatically convert it into a subdomain under <code>gunbot.market</code> (for example, a URL that starts as an IP can be converted into something like <code>gb-1-abc123.gunbot.market</code>). This is intended to avoid Cloudflare Worker connection issues that can happen when communicating with IP addresses directly.</li>
</ul>
<p>For the automation to work, your Gunbot needs to have the <strong>Config API</strong> running.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="marketplace-browsing-and-purchase">Marketplace browsing and purchase<a href="https://www.gunbot.com/blog/copytrading-gunbothub-intro/#marketplace-browsing-and-purchase" class="hash-link" aria-label="Direct link to Marketplace browsing and purchase" title="Direct link to Marketplace browsing and purchase" translate="no">​</a></h3>
<p>In the marketplace you can:</p>
<ul>
<li class="">search by strategy name or leader</li>
<li class="">filter by exchange and trading pair</li>
<li class="">view strategy details, ratings, and reviews</li>
<li class="">see the number of active copytraders</li>
</ul>
<p>When you purchase a strategy, it is a <strong>one-time payment for lifetime access</strong>. There are no recurring subscriptions for strategy access.</p>
<p>These terms describe marketplace strategy access, separately from the Gunbot Unlimited subscription. Independently developed community strategies may have separate licenses and prices.</p>
<p>After purchase, the strategy appears in your <strong>Active Copies</strong> tab.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="enable-in-active-copies">Enable in Active Copies<a href="https://www.gunbot.com/blog/copytrading-gunbothub-intro/#enable-in-active-copies" class="hash-link" aria-label="Direct link to Enable in Active Copies" title="Direct link to Enable in Active Copies" translate="no">​</a></h3>
<p>Enabling is a toggle. Once enabled, GunbotHub handles the setup steps that usually take the most time:</p>
<ul>
<li class="">it generates a unique API key if you do not already have one</li>
<li class="">it injects that key into your Gunbot for secure communication</li>
<li class="">it writes the strategy configuration into your Gunbot <code>config.js</code> with the correct exchange and trading pair</li>
<li class="">it begins relaying the leader’s trade signals to your Gunbot</li>
</ul>
<p>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.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="what-you-must-already-have-in-place">What you must already have in place<a href="https://www.gunbot.com/blog/copytrading-gunbothub-intro/#what-you-must-already-have-in-place" class="hash-link" aria-label="Direct link to What you must already have in place" title="Direct link to What you must already have in place" translate="no">​</a></h3>
<p>GunbotHub can configure a strategy, but it cannot trade for you without a working Gunbot environment:</p>
<ul>
<li class=""><strong>Exchange API keys must be configured in your Gunbot</strong> for the exchange the strategy uses. Without valid API credentials, signals can arrive but trades will not execute.</li>
<li class=""><strong>Gunbot needs to be running</strong> 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.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="publishing-a-strategy-what-leaders-set-up">Publishing a strategy: what leaders set up<a href="https://www.gunbot.com/blog/copytrading-gunbothub-intro/#publishing-a-strategy-what-leaders-set-up" class="hash-link" aria-label="Direct link to Publishing a strategy: what leaders set up" title="Direct link to Publishing a strategy: what leaders set up" translate="no">​</a></h2>
<p>Leaders create a strategy listing, choose a signal source, then share the strategy through the marketplace.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="create-the-listing">Create the listing<a href="https://www.gunbot.com/blog/copytrading-gunbothub-intro/#create-the-listing" class="hash-link" aria-label="Direct link to Create the listing" title="Direct link to Create the listing" translate="no">​</a></h3>
<p>A strategy listing includes:</p>
<ul>
<li class="">title and description</li>
<li class="">exchange (for example Binance or Coinbase)</li>
<li class="">trading pair (for example BTC/USDT)</li>
<li class="">a price (copytraders pay once for lifetime access)</li>
<li class="">optional image and video URLs</li>
</ul>
<p>After publishing, GunbotHub provides a <strong>Strategy Code</strong>. That code is what connects your signals to the strategy listing.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="choose-your-signal-source">Choose your signal source<a href="https://www.gunbot.com/blog/copytrading-gunbothub-intro/#choose-your-signal-source" class="hash-link" aria-label="Direct link to Choose your signal source" title="Direct link to Choose your signal source" translate="no">​</a></h3>
<h4 class="anchor anchorTargetStickyNavbar_tleR" id="option-1-gunbot-signals">Option 1: Gunbot signals<a href="https://www.gunbot.com/blog/copytrading-gunbothub-intro/#option-1-gunbot-signals" class="hash-link" aria-label="Direct link to Option 1: Gunbot signals" title="Direct link to Option 1: Gunbot signals" translate="no">​</a></h4>
<p>If you use Gunbot to generate signals, enable copytrading in your Gunbot config using the strategy code:</p>
<div class="language-json codeBlockContainer_mQmQ theme-code-block" style="--prism-color:#e2e8f0;--prism-background-color:#050505"><div class="codeBlockContent_t_Hd"><pre tabindex="0" class="prism-code language-json codeBlock_RMoD thin-scrollbar" style="color:#e2e8f0;background-color:#050505"><code class="codeBlockLines_AclH"><div class="token-line" style="color:#e2e8f0"><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token property">"copytrading"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token property">"enabled"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token boolean">true</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token property">"STRATEGY_CODE"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"YOUR-STRATEGY-CODE"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><br></div></code></pre></div></div>
<p>With this enabled, your Gunbot sends trade signals for that strategy code to the marketplace.</p>
<h4 class="anchor anchorTargetStickyNavbar_tleR" id="option-2-tradingview-signals">Option 2: TradingView signals<a href="https://www.gunbot.com/blog/copytrading-gunbothub-intro/#option-2-tradingview-signals" class="hash-link" aria-label="Direct link to Option 2: TradingView signals" title="Direct link to Option 2: TradingView signals" translate="no">​</a></h4>
<p>If you use TradingView, configure alerts to send webhook messages to:</p>
<p><code>https://gunbot.market/api/tradingview/webhook</code></p>
<p>The alert message is JSON and includes your <code>strategy_code</code> plus trade details. GunbotHub supports a range of order actions, including:</p>
<p><code>buy, sell, market_buy, market_sell, buy_stop_limit, sell_stop_limit, buy_trailing, sell_trailing, buy_oco, sell_oco, cancel, close, market_close</code></p>
<p>Example (limit buy):</p>
<div class="language-json codeBlockContainer_mQmQ theme-code-block" style="--prism-color:#e2e8f0;--prism-background-color:#050505"><div class="codeBlockContent_t_Hd"><pre tabindex="0" class="prism-code language-json codeBlock_RMoD thin-scrollbar" style="color:#e2e8f0;background-color:#050505"><code class="codeBlockLines_AclH"><div class="token-line" style="color:#e2e8f0"><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token property">"strategy_code"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"YOUR-STRATEGY-CODE"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token property">"action"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"buy"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token property">"ticker"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"BTCUSDT"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token property">"exchange"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"binance"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token property">"amount"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token number">0.001</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token property">"price"</span><span class="token operator">:</span><span class="token plain"> </span><span class="token number">50000</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><br></div></code></pre></div></div>
<p>TradingView variables can be used in payloads (for example <code>{{close}}</code>, <code>{{ticker}}</code>, and others). If you write Pine Script strategies, TradingView can embed the webhook message inside your script using the <code>alert_message</code> parameter, so the script generates consistent alert payloads.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="earnings-and-payouts">Earnings and payouts<a href="https://www.gunbot.com/blog/copytrading-gunbothub-intro/#earnings-and-payouts" class="hash-link" aria-label="Direct link to Earnings and payouts" title="Direct link to Earnings and payouts" translate="no">​</a></h3>
<p>Leaders earn revenue when copytraders purchase access:</p>
<ul>
<li class=""><strong>90%</strong> goes to the leader.</li>
<li class=""><strong>10%</strong> is a marketplace fee.</li>
</ul>
<p>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 <strong>My Sales</strong> tab.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="how-trade-copying-works-signal-relay-and-execution">How trade copying works (signal relay and execution)<a href="https://www.gunbot.com/blog/copytrading-gunbothub-intro/#how-trade-copying-works-signal-relay-and-execution" class="hash-link" aria-label="Direct link to How trade copying works (signal relay and execution)" title="Direct link to How trade copying works (signal relay and execution)" translate="no">​</a></h2>
<p>Once a strategy is enabled by a copytrader, the trade flow is:</p>
<ol>
<li class="">A leader executes a trade and sends a signal (via Gunbot or TradingView).</li>
<li class="">GunbotHub receives the signal, validates it, and identifies copytraders who have that strategy enabled.</li>
<li class="">GunbotHub forwards the signal to each copytrader’s Gunbot using that copytrader’s unique API key.</li>
<li class="">The copytrader’s Gunbot executes the trade on the exchange account configured in that Gunbot.</li>
</ol>
<p>The security model is straightforward: exchange API keys stay inside the copytrader’s Gunbot. GunbotHub relays signals; Gunbot executes.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="comparing-strategies-what-to-look-at-in-the-marketplace">Comparing strategies: what to look at in the marketplace<a href="https://www.gunbot.com/blog/copytrading-gunbothub-intro/#comparing-strategies-what-to-look-at-in-the-marketplace" class="hash-link" aria-label="Direct link to Comparing strategies: what to look at in the marketplace" title="Direct link to Comparing strategies: what to look at in the marketplace" translate="no">​</a></h2>
<p>GunbotHub gives copytraders a few concrete tools for comparison:</p>
<ul>
<li class="">exchange and trading pair</li>
<li class="">performance information and ratings</li>
<li class="">written reviews (available after purchase)</li>
<li class="">number of active copytraders</li>
</ul>
<p>One metric called out is <strong>DP1K (Daily Profit per 1K)</strong>. 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.</p>
<p>A sensible way to use the available information:</p>
<ul>
<li class="">Make sure the strategy trades on an exchange you have configured in Gunbot.</li>
<li class="">Check the trading pair matches what you actually want to trade.</li>
<li class="">Read reviews and ratings for recurring themes.</li>
<li class="">Use DP1K to compare strategies side by side, while remembering it is an indicator, not a guarantee.</li>
</ul>
<p>On sizing, the docs note that signals include recommended position sizes, but your execution is ultimately constrained by your Gunbot configuration.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="next-steps">Next steps<a href="https://www.gunbot.com/blog/copytrading-gunbothub-intro/#next-steps" class="hash-link" aria-label="Direct link to Next steps" title="Direct link to Next steps" translate="no">​</a></h2>
<p>Browse strategies, check leader stats, and start copying from the marketplace at <a href="https://copytrading.gunbot.com/" target="_blank" rel="noopener" class="">https://copytrading.gunbot.com</a>.</p>]]></content>
        <author>
            <name>@boekenbox</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Gunbot Quant: A Standalone, Open-Source Tool for Algorithmic Traders]]></title>
        <id>https://www.gunbot.com/blog/gunbot-quant-market-screener-backtesting-tool/</id>
        <link href="https://www.gunbot.com/blog/gunbot-quant-market-screener-backtesting-tool/"/>
        <updated>2025-08-12T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Explore Gunbot Quant, an open-source research tool that connects saved market screens to batch backtests and optional deployment to Gunbot.]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/gunbot-quant-header.png" alt="Gunbot Quant: A Standalone, Open-Source Tool for Algorithmic Traders" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">Gunbot Quant: A Standalone, Open-Source Tool for Algorithmic Traders</figcaption></figure>
<p>Most screeners are great at showing you what just moved; very few are built to help you <strong>systematically trade</strong> what matters next.</p>
<p>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 <em>your</em> 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.</p>
<p>That is the core of <a href="https://github.com/GuntharDeNiro/gunbot-quant" target="_blank" rel="noopener nofollow" class=""><strong>Gunbot Quant</strong></a>: a standalone, open-source tool that links <strong>saved screener setups</strong> directly to <strong>batched backtesting runs</strong>. With <strong>Gunbot Unlimited</strong>, it can hand those exact tested configs and strategies to your live bot in one click. The <a href="https://www.gunbot.com/" target="_blank" rel="noopener" class="">trading bot</a> integration offers a repeatable loop from “scan like an algo trader” to “prove it” to “run it,” all in one place you control.</p>
<p>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 <em>not</em> 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.</p>
<div class="callout callout--info theme-admonition theme-admonition-info alert alert--info"><span class="callout__icon"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4" fill="none"></path><path d="M12 8h.01" fill="none"></path></svg></span><div class="callout__body"><p class="callout__title">Free and open-source</p><div class="callout__content"><p>Gunbot Quant is free. There’s nothing to sell here - use it, fork it, improve it. Pull requests welcome.</p></div></div></div>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="what-it-is">What it is<a href="https://www.gunbot.com/blog/gunbot-quant-market-screener-backtesting-tool/#what-it-is" class="hash-link" aria-label="Direct link to What it is" title="Direct link to What it is" translate="no">​</a></h2>
<p>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.</p>
<p><img decoding="async" loading="lazy" alt="Gunbot Quant market screener and backtester showing a strategy report with equity curve and exit analysis" src="https://www.gunbot.com/blog/assets/images/gunbot-quant-market-screener-backtester-711662495f75addc6c27c969610eec0b.png" width="1919" height="966" class="img_SS3x"></p>
<p>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 <a href="https://www.gunbot.com/backtesting/" target="_blank" rel="noopener" class="">backtesting archive</a>.</p>
<p>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.</p>
<p>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.</p>
<div class="callout callout--success theme-admonition theme-admonition-tip alert alert--success"><span class="callout__icon"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="m9 12 2 2 4-4" fill="none"></path></svg></span><div class="callout__body"><p class="callout__title">The real win</p><div class="callout__content"><p>Plenty of solid screeners exist. The edge here is that <strong>saved screener setups flow straight into batched backtests</strong> with the same parameters and symbol normalization. Define once, reuse often, compare over time.</p></div></div></div>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="screener-a-research-starting-point-you-can-save-and-reuse">Screener: a research starting point you can save and reuse<a href="https://www.gunbot.com/blog/gunbot-quant-market-screener-backtesting-tool/#screener-a-research-starting-point-you-can-save-and-reuse" class="hash-link" aria-label="Direct link to Screener: a research starting point you can save and reuse" title="Direct link to Screener: a research starting point you can save and reuse" translate="no">​</a></h2>
<p>A screener for algos is less about colorful dashboards and more about <em>not wasting your backtest compute budget</em>.</p>
<p>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.</p>
<p>You can filter by <strong>liquidity</strong> using trading volume so you don’t get lured into thin books that betray your fills. You can look at <strong>price relative to different SMAs</strong> to avoid testing trend followers in chop or mean-reverters in one-way markets. You can measure <strong>momentum</strong> with rate-of-change windows that match your timeframe. You can gate by <strong>normalized volatility</strong> 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.</p>
<p>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 <em>same</em> 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.</p>
<div class="callout callout--info theme-admonition theme-admonition-info alert alert--info"><span class="callout__icon"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4" fill="none"></path><path d="M12 8h.01" fill="none"></path></svg></span><div class="callout__body"><p class="callout__title">Symbols &amp; exchanges</p><div class="callout__content"><p>Markets naming gets messy across platforms. The app normalizes symbols so your <strong>research symbol matches the live tradable pair</strong> on your exchange.</p></div></div></div>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="available-screener-metrics">Available screener metrics<a href="https://www.gunbot.com/blog/gunbot-quant-market-screener-backtesting-tool/#available-screener-metrics" class="hash-link" aria-label="Direct link to Available screener metrics" title="Direct link to Available screener metrics" translate="no">​</a></h3>
<p>The metrics are chosen to provide a holistic view of an asset's character, covering volume, momentum, trend, volatility, and risk.</p>
<table><thead><tr><th style="text-align:left">Category</th><th style="text-align:left">Metric</th><th style="text-align:left">"Why" this metric is useful</th></tr></thead><tbody><tr><td style="text-align:left"><strong>Volume</strong></td><td style="text-align:left"><code>avg_vol_30d_quote</code></td><td style="text-align:left">Checks that the asset has sustained liquidity, which is critical for executing trades at expected prices.</td></tr><tr><td style="text-align:left"></td><td style="text-align:left"><code>rel_vol_10d_quote</code></td><td style="text-align:left">Identifies assets with recent spikes in interest, which can precede significant price moves.</td></tr><tr><td style="text-align:left"><strong>Momentum</strong></td><td style="text-align:left"><code>roc_*p</code> family</td><td style="text-align:left">Measures the strength of price movement over different time horizons, important for trend-following strategies.</td></tr><tr><td style="text-align:left"><strong>Trend</strong></td><td style="text-align:left"><code>price_vs_sma*</code></td><td style="text-align:left">Quickly determines if an asset is in a short-term or long-term uptrend or downtrend.</td></tr><tr><td style="text-align:left"></td><td style="text-align:left"><code>sma50_vs_sma200</code></td><td style="text-align:left">Identifies major trend shifts (Golden/Death Crosses), a cornerstone of classical technical analysis.</td></tr><tr><td style="text-align:left"></td><td style="text-align:left"><code>adx_14p</code></td><td style="text-align:left">Distinguishes between a strong trend (good for trend-following) and a ranging market (good for mean-reversion).</td></tr><tr><td style="text-align:left"><strong>Volatility</strong></td><td style="text-align:left"><code>atr_pct_14p</code></td><td style="text-align:left">Normalizes 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.</td></tr><tr><td style="text-align:left"><strong>Oscillator</strong></td><td style="text-align:left"><code>rsi_14p</code>, <code>stochrsi_*</code></td><td style="text-align:left">Identifies potential overbought or oversold conditions, forming the basis for mean-reversion strategies.</td></tr><tr><td style="text-align:left"><strong>Heuristics</strong></td><td style="text-align:left"><code>volatility_consistency</code>, <code>max_daily_spike_pct</code>, <code>volume_concentration_pct</code></td><td style="text-align:left">These 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.</td></tr></tbody></table>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="backtesting-engine-fast-batched-reproducible">Backtesting engine: fast, batched, reproducible<a href="https://www.gunbot.com/blog/gunbot-quant-market-screener-backtesting-tool/#backtesting-engine-fast-batched-reproducible" class="hash-link" aria-label="Direct link to Backtesting engine: fast, batched, reproducible" title="Direct link to Backtesting engine: fast, batched, reproducible" translate="no">​</a></h2>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<div class="callout callout--info theme-admonition theme-admonition-important alert alert--info"><span class="callout__icon"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4" fill="none"></path><path d="M12 8h.01" fill="none"></path></svg></span><div class="callout__body"><p class="callout__title">Candle-open execution</p><div class="callout__content"><p>By default, included Gunbot strategies generally <strong>enter and exit on candle open</strong>. That keeps the strategies aligned with what’s realistically executable as a backtest and avoids intra-bar fantasy fills.</p></div></div></div>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="strategy-library-familiar-archetypes-easy-to-tinker">Strategy library: familiar archetypes, easy to tinker<a href="https://www.gunbot.com/blog/gunbot-quant-market-screener-backtesting-tool/#strategy-library-familiar-archetypes-easy-to-tinker" class="hash-link" aria-label="Direct link to Strategy library: familiar archetypes, easy to tinker" title="Direct link to Strategy library: familiar archetypes, easy to tinker" translate="no">​</a></h2>
<p>The built-in library covers the archetypes most traders actually use, so you can focus on <em>where</em> and <em>how</em> to trade rather than reinventing entry signals.</p>
<ul>
<li class=""><strong>For Mean-Reversion Traders:</strong> If you believe prices revert to an average, you’ll recognize the <code>RSI_Reversion</code> (buys oversold, uses ATR stop), <code>BB_Reversion</code> (fades outer band excursions), and <code>Stochastic_Reversion</code>. There’s also a combo that requires oscillator agreement and exits at fixed ATR multiples for tighter risk management.</li>
<li class=""><strong>For Trend Followers:</strong> If you believe trends persist, the library offers an <code>EMACross</code>, a <code>MACD_Cross</code>, a <code>Supertrend_Follower</code> (where the indicator line doubles as a trailing stop), and a <code>Heikin-Ashi</code> approach that smooths price action to reduce noise.</li>
<li class=""><strong>For Volatility and Breakout Traders:</strong> If you trade changes in market energy, you have a classic <code>Donchian_Breakout</code> and a <code>Keltner_Squeeze_Breakout</code> to separate real expansions from random noise.</li>
<li class=""><strong>For Market-Neutral Approaches:</strong> The continuous <code>Grid_Strategy</code> is designed to profit from volatility regardless of direction, with its own per-pair compounding logic.</li>
<li class=""><strong>For Hybrid and Adaptive Systems:</strong> 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 <code>Dynamic_Momentum_Optimizer</code> that retunes itself to recent conditions.</li>
</ul>
<p>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.</p>
<div class="callout callout--info theme-admonition theme-admonition-note alert alert--secondary"><span class="callout__icon"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4" fill="none"></path><path d="M12 8h.01" fill="none"></path></svg></span><div class="callout__body"><p class="callout__title">Strategy library scope</p><div class="callout__content"><p>The included strategies are <strong>not</strong> 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 <strong>clean suite of common and less-common technical approaches (i had some fun with the dynamic optimizer strat)</strong> that are transparent, auditable, and easy to benchmark.</p></div></div></div>
<hr>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="for-strategy-developers-a-look-inside-a-gunbot-quant-js-file">For strategy developers: a look inside a Gunbot Quant JS file<a href="https://www.gunbot.com/blog/gunbot-quant-market-screener-backtesting-tool/#for-strategy-developers-a-look-inside-a-gunbot-quant-js-file" class="hash-link" aria-label="Direct link to For strategy developers: a look inside a Gunbot Quant JS file" title="Direct link to For strategy developers: a look inside a Gunbot Quant JS file" translate="no">​</a></h3>
<p>The strategies are written in vanilla JavaScript for compatibility with Gunbot’s <a href="https://www.gunbot.com/support/docs/custom-strategies/what-are-custom-strategies/" target="_blank" rel="noopener" class="">custom strategy runtime</a>. They’re designed to be self-contained and readable, which makes them good templates for customization.</p>
<p>Here is the annotated structure of a typical strategy, <code>rsi_reversion.js</code>:</p>
<div class="language-javascript codeBlockContainer_mQmQ theme-code-block" style="--prism-color:#e2e8f0;--prism-background-color:#050505"><div class="codeBlockContent_t_Hd"><pre tabindex="0" class="prism-code language-javascript codeBlock_RMoD thin-scrollbar" style="color:#e2e8f0;background-color:#050505"><code class="codeBlockLines_AclH"><div class="token-line" style="color:#e2e8f0"><span class="token comment" style="color:rgb(98, 114, 164)">/*</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token comment" style="color:rgb(98, 114, 164)"> * Gunbot Quant Strategy: RSI_Reversion</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token comment" style="color:rgb(98, 114, 164)"> * A brief summary of the logic and a table of configurable parameters.</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token comment" style="color:rgb(98, 114, 164)"> * This header is read by the UI to populate help text.</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token comment" style="color:rgb(98, 114, 164)"> */</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token comment" style="color:rgb(98, 114, 164)">// Gunbot requires this to be initialized. It's a persistent, per-pair data store.</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">gb</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">data</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">pairLedger</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">customStratStore</span><span class="token plain"> </span><span class="token operator">=</span><span class="token plain"> gb</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">data</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">pairLedger</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">customStratStore</span><span class="token plain"> </span><span class="token operator">||</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token comment" style="color:rgb(98, 114, 164)">/* -------------------------------------------------------------------------</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token comment" style="color:rgb(98, 114, 164)"> *  STATE INITIALISATION: The strategy's memory.</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token comment" style="color:rgb(98, 114, 164)"> * ------------------------------------------------------------------------- */</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> store </span><span class="token operator">=</span><span class="token plain"> gb</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">data</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">pairLedger</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">customStratStore</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">typeof</span><span class="token plain"> store</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">state</span><span class="token plain"> </span><span class="token operator">!==</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"string"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> store</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">state</span><span class="token plain"> </span><span class="token operator">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"IDLE"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"> </span><span class="token comment" style="color:rgb(98, 114, 164)">// "IDLE" | "IN_POSITION"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">typeof</span><span class="token plain"> store</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">stopPrice</span><span class="token plain"> </span><span class="token operator">!==</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"number"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> store</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">stopPrice</span><span class="token plain"> </span><span class="token operator">=</span><span class="token plain"> </span><span class="token number">0</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token comment" style="color:rgb(98, 114, 164)">// ... other state variables as needed</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token comment" style="color:rgb(98, 114, 164)">/* -------------------------------------------------------------------------</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token comment" style="color:rgb(98, 114, 164)"> *  INDICATOR IMPLEMENTATIONS: Self-contained TA functions.</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token comment" style="color:rgb(98, 114, 164)"> * ------------------------------------------------------------------------- */</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> indicator_helpers </span><span class="token operator">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token function-variable function" style="color:rgb(80, 250, 123)">rsi</span><span class="token operator">:</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">function</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token parameter">source</span><span class="token parameter punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token parameter"> length</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"> </span><span class="token comment" style="color:rgb(98, 114, 164)">/* ... RSI calculation logic ... */</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token function-variable function" style="color:rgb(80, 250, 123)">atr</span><span class="token operator">:</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">function</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token parameter">high</span><span class="token parameter punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token parameter"> low</span><span class="token parameter punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token parameter"> close</span><span class="token parameter punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token parameter"> length</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"> </span><span class="token comment" style="color:rgb(98, 114, 164)">/* ... ATR calculation logic ... */</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token comment" style="color:rgb(98, 114, 164)">/* -------------------------------------------------------------------------</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token comment" style="color:rgb(98, 114, 164)"> *  ORDER HANDLERS: Wrappers for Gunbot's buy/sell methods.</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token comment" style="color:rgb(98, 114, 164)"> * ------------------------------------------------------------------------- */</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> </span><span class="token function-variable function" style="color:rgb(80, 250, 123)">buyMarket</span><span class="token plain"> </span><span class="token operator">=</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">function</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token parameter">amount</span><span class="token parameter punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token parameter"> exchange</span><span class="token parameter punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token parameter"> pair</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"> </span><span class="token comment" style="color:rgb(98, 114, 164)">/* ... gb.method.buyMarket call ... */</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> </span><span class="token function-variable function" style="color:rgb(80, 250, 123)">sellMarket</span><span class="token plain"> </span><span class="token operator">=</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">function</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token parameter">amount</span><span class="token parameter punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token parameter"> exchange</span><span class="token parameter punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token parameter"> pair</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"> </span><span class="token comment" style="color:rgb(98, 114, 164)">/* ... gb.method.sellMarket call ... */</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token comment" style="color:rgb(98, 114, 164)">/* -------------------------------------------------------------------------</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token comment" style="color:rgb(98, 114, 164)"> *  STATE RECONCILIATION: Syncs strategy state with Gunbot's reality.</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token comment" style="color:rgb(98, 114, 164)"> * ------------------------------------------------------------------------- */</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">function</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">reconcileState</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token comment" style="color:rgb(98, 114, 164)">// Checks gb.data.gotBag and gb.data.openOrders to see if we are in a position,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token comment" style="color:rgb(98, 114, 164)">// then updates store.state accordingly. This corrects state after manual trades or restarts.</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token comment" style="color:rgb(98, 114, 164)">/* -------------------------------------------------------------------------</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token comment" style="color:rgb(98, 114, 164)"> *  TRADING DECISION: The core logic function.</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token comment" style="color:rgb(98, 114, 164)"> * ------------------------------------------------------------------------- */</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">async</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">function</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">decideTrade</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token function" style="color:rgb(80, 250, 123)">reconcileState</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"> </span><span class="token comment" style="color:rgb(98, 114, 164)">// Always sync first.</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token comment" style="color:rgb(98, 114, 164)">// 1. Read parameters from Gunbot's config (`whatstrat` object)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> rsiPeriod </span><span class="token operator">=</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">parseFloat</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">whatstrat</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token constant" style="color:rgb(189, 147, 249)">GQ_RSI_REVERSION_PERIOD</span><span class="token plain"> </span><span class="token operator">||</span><span class="token plain"> </span><span class="token number">14</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token comment" style="color:rgb(98, 114, 164)">// ...</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token comment" style="color:rgb(98, 114, 164)">// 2. Calculate indicators</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> rsiValues </span><span class="token operator">=</span><span class="token plain"> indicator_helpers</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">rsi</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">candlesClose</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> rsiPeriod</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> rsi </span><span class="token operator">=</span><span class="token plain"> rsiValues</span><span class="token punctuation" style="color:rgb(248, 248, 242)">[</span><span class="token plain">iLast</span><span class="token punctuation" style="color:rgb(248, 248, 242)">]</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token comment" style="color:rgb(98, 114, 164)">// ...</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token comment" style="color:rgb(98, 114, 164)">// 3. (Optional) GUI enhancements</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> sidebar </span><span class="token operator">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">[</span><span class="token punctuation" style="color:rgb(248, 248, 242)">]</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    sidebar</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">push</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"> </span><span class="token literal-property property">label</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'RSI Value'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token literal-property property">value</span><span class="token operator">:</span><span class="token plain"> rsi</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">toFixed</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token number">2</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    gb</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">data</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">pairLedger</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">sidebarExtras</span><span class="token plain"> </span><span class="token operator">=</span><span class="token plain"> sidebar</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token comment" style="color:rgb(98, 114, 164)">// 4. Implement strategy logic using an IF/ELSE block for states</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">store</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">state</span><span class="token plain"> </span><span class="token operator">===</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"IDLE"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">        </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> wantToEnter </span><span class="token operator">=</span><span class="token plain"> rsi </span><span class="token operator">&lt;</span><span class="token plain"> rsiOversold</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">        </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">wantToEnter</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">            </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">await</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">buyMarket</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">costQuote</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> exchangeName</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> pairName</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">        </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"> </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">else</span><span class="token plain"> </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">store</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">state</span><span class="token plain"> </span><span class="token operator">===</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"IN_POSITION"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">        </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> wantToExit </span><span class="token operator">=</span><span class="token plain"> rsi </span><span class="token operator">&gt;</span><span class="token plain"> rsiOverbought </span><span class="token operator">||</span><span class="token plain"> ask </span><span class="token operator">&lt;</span><span class="token plain"> store</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">stopPrice</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">        </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">wantToExit</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">            </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">await</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">sellMarket</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">quoteBalance</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> exchangeName</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> pairName</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">        </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token comment" style="color:rgb(98, 114, 164)">/* -------------------------------------------------------------------------</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token comment" style="color:rgb(98, 114, 164)"> *  DRIVER: The entry point called by Gunbot on every tick.</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token comment" style="color:rgb(98, 114, 164)"> * ------------------------------------------------------------------------- */</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">await</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">decideTrade</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><br></div></code></pre></div></div>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="optional-gunbot-handoff-and-benchmarking">Optional Gunbot handoff and benchmarking<a href="https://www.gunbot.com/blog/gunbot-quant-market-screener-backtesting-tool/#optional-gunbot-handoff-and-benchmarking" class="hash-link" aria-label="Direct link to Optional Gunbot handoff and benchmarking" title="Direct link to Optional Gunbot handoff and benchmarking" translate="no">​</a></h2>
<p>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.</p>
<p>Once you’re live, the benchmarking tools are built to answer a simple question: <strong>is this still the best place to run this setup?</strong> You can take your live strategy and compare it against the rest of the eligible market with the <em>same</em> logic. If the rankings start to show a better candidate, you can rotate before lag turns into losses.</p>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="cli-for-repeatable-experiments">CLI for repeatable experiments<a href="https://www.gunbot.com/blog/gunbot-quant-market-screener-backtesting-tool/#cli-for-repeatable-experiments" class="hash-link" aria-label="Direct link to CLI for repeatable experiments" title="Direct link to CLI for repeatable experiments" translate="no">​</a></h2>
<p>If you prefer to script your life, the command-line interface is there. You define a base configuration and then declare a list of <strong>scenarios</strong> that override only what’s different.</p>
<p><strong>Example:</strong> design a CLI scenario to test two <code>RSI_Reversion</code> configurations against a default <code>EMACross</code> on <code>BTCUSDT</code>.</p>
<ol>
<li class="">Open <code>gunbot_quant/config/scenarios.py</code>.</li>
<li class="">Add a new dictionary to the <code>SCENARIOS</code> list:</li>
</ol>
<div class="language-python codeBlockContainer_mQmQ theme-code-block" style="--prism-color:#e2e8f0;--prism-background-color:#050505"><div class="codeBlockContent_t_Hd"><pre tabindex="0" class="prism-code language-python codeBlock_RMoD thin-scrollbar" style="color:#e2e8f0;background-color:#050505"><code class="codeBlockLines_AclH"><div class="token-line" style="color:#e2e8f0"><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token string" style="color:rgb(255, 121, 198)">"name"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"Multi_RSI_vs_EMACross_BTC"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token string" style="color:rgb(255, 121, 198)">"params"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">        </span><span class="token string" style="color:rgb(255, 121, 198)">"EXCHANGE"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"binance"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">        </span><span class="token string" style="color:rgb(255, 121, 198)">"TIMEFRAME"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"4h"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">        </span><span class="token string" style="color:rgb(255, 121, 198)">"BACKTEST_START_DATE"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> get_date_relative_to_now</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">days</span><span class="token operator">=</span><span class="token number">365</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">        </span><span class="token string" style="color:rgb(255, 121, 198)">"SYMBOL_SELECTION_METHOD"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"EXPLICIT_LIST"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">        </span><span class="token string" style="color:rgb(255, 121, 198)">"SYMBOLS"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">[</span><span class="token string" style="color:rgb(255, 121, 198)">"BTCUSDT"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">]</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">        </span><span class="token string" style="color:rgb(255, 121, 198)">"STRATEGIES"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">[</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">            </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">                </span><span class="token string" style="color:rgb(255, 121, 198)">"name"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"RSI_Reversion"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">                </span><span class="token string" style="color:rgb(255, 121, 198)">"alias"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"RSI_Sensitive_Config"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">                </span><span class="token string" style="color:rgb(255, 121, 198)">"params"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">                    </span><span class="token string" style="color:rgb(255, 121, 198)">"GQ_RSI_REVERSION_PERIOD"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token number">10</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">                    </span><span class="token string" style="color:rgb(255, 121, 198)">"GQ_RSI_REVERSION_OVERSOLD"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token number">25</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">                </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">            </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">            </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">                </span><span class="token string" style="color:rgb(255, 121, 198)">"name"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"RSI_Reversion"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">                </span><span class="token string" style="color:rgb(255, 121, 198)">"alias"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"RSI_Conservative_Config"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">                </span><span class="token string" style="color:rgb(255, 121, 198)">"params"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">                    </span><span class="token string" style="color:rgb(255, 121, 198)">"GQ_RSI_REVERSION_PERIOD"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token number">21</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">                    </span><span class="token string" style="color:rgb(255, 121, 198)">"GQ_RSI_REVERSION_OVERSOLD"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token number">35</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">                    </span><span class="token string" style="color:rgb(255, 121, 198)">"GQ_RSI_REVERSION_ATR_MULT"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token number">3.0</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">                </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">            </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">            </span><span class="token string" style="color:rgb(255, 121, 198)">"EMACross"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">        </span><span class="token punctuation" style="color:rgb(248, 248, 242)">]</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><br></div></code></pre></div></div>
<ol start="3">
<li class="">Run the scenario from your terminal:</li>
</ol>
<div class="language-bash codeBlockContainer_mQmQ theme-code-block" style="--prism-color:#e2e8f0;--prism-background-color:#050505"><div class="codeBlockContent_t_Hd"><pre tabindex="0" class="prism-code language-bash codeBlock_RMoD thin-scrollbar" style="color:#e2e8f0;background-color:#050505"><code class="codeBlockLines_AclH"><div class="token-line" style="color:#e2e8f0"><span class="token plain">python -m gunbot_quant.cli.main run Multi_RSI_vs_EMACross_BTC</span><br></div></code></pre></div></div>
<p>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.</p>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="limitations">Limitations<a href="https://www.gunbot.com/blog/gunbot-quant-market-screener-backtesting-tool/#limitations" class="hash-link" aria-label="Direct link to Limitations" title="Direct link to Limitations" translate="no">​</a></h2>
<p>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.</p>
<p>Backtesting history is limited by exchange candle data availability. Some exchanges are more generous than others.</p>
<p>:::warning Avoid overfitting by convenience
Batch testing makes it easy to try hundreds of variations. Don’t let that become <strong>parameter fishing</strong>. Lock a baseline, evaluate on multiple markets/regimes, and only promote changes that improve risk-adjusted metrics <strong>and</strong> drawdown behavior, not just headline returns.
:::</p>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="wrap-up">Wrap-up<a href="https://www.gunbot.com/blog/gunbot-quant-market-screener-backtesting-tool/#wrap-up" class="hash-link" aria-label="Direct link to Wrap-up" title="Direct link to Wrap-up" translate="no">​</a></h2>
<p>Gunbot Quant is a straightforward way to do <strong>saved, algo-first market screeners</strong> combined with <strong>batched backtests</strong>, and, if you want, to let those <strong>exact</strong> tested configurations go live in one click in Gunbot.</p>
<p>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.</p>
<p><strong>GitHub:</strong> <a href="https://github.com/GuntharDeNiro/gunbot-quant" target="_blank" rel="noopener nofollow" class="">https://github.com/GuntharDeNiro/gunbot-quant</a></p>
<pre tabindex="0" class="codeBlockStandalone_wQog thin-scrollbar codeBlockContainer_mQmQ theme-code-block" style="--prism-color:#e2e8f0;--prism-background-color:#050505"><code class="codeBlockLines_AclH"></code></pre>]]></content>
        <author>
            <name>@boekenbox</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Re-introducing StepGridScalp - another Gunbot classic strategy]]></title>
        <id>https://www.gunbot.com/blog/stepgridscalp-strategy/</id>
        <link href="https://www.gunbot.com/blog/stepgridscalp-strategy/"/>
        <updated>2025-07-14T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Learn how StepGridScalp combines grid trading, volatility-aware scalps and support buys, with configurable sizing and exit behavior.]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/stepgridscalp-header.png" alt="Re-introducing StepGridScalp - another Gunbot classic strategy" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">Re-introducing StepGridScalp - another Gunbot classic strategy</figcaption></figure>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="blending-grid-and-scalping-approaches">Blending grid and scalping approaches<a href="https://www.gunbot.com/blog/stepgridscalp-strategy/#blending-grid-and-scalping-approaches" class="hash-link" aria-label="Direct link to Blending grid and scalping approaches" title="Direct link to Blending grid and scalping approaches" translate="no">​</a></h2>
<p>StepGridScalp takes Gunbot's <a href="https://www.gunbot.com/blog/stepgrid-strategy/" target="_blank" rel="noopener" class="">classic StepGrid strategy</a> a step further by blending disciplined grid trading with dynamic scalping and strategic support buys. This unique combination means you can efficiently trade spot markets through rapid intraday price movements as well as deeper market dips, all within one cohesive, automated strategy.</p>
<p>Instead of manually switching strategies or constantly adjusting settings, StepGridScalp automatically evaluates market conditions in real-time. It adjusts your position sizing, entries, and exits accordingly, helping you stay profitable while reducing the need for constant oversight usually needed in fast-moving markets.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="grid-trading-with-a-scalping-twist">Grid Trading with a Scalping Twist<a href="https://www.gunbot.com/blog/stepgridscalp-strategy/#grid-trading-with-a-scalping-twist" class="hash-link" aria-label="Direct link to Grid Trading with a Scalping Twist" title="Direct link to Grid Trading with a Scalping Twist" translate="no">​</a></h2>
<p>At its heart, <a href="https://www.gunbot.com/support/docs/built-in-strategies/spot-strategies/stepgridscalp/" target="_blank" rel="noopener" class="">StepGridScalp</a> relies on the familiar grid trading model, buying assets at set intervals as prices fall and selling them at higher intervals as prices recover. This helps trades close profitably after covering trading fees.</p>
<p>What makes StepGridScalp special, however, is its added scalping capability. When bullish momentum kicks in, your bot will execute quick, opportunistic trades designed to capture profits from short-term price jumps. It also places limit orders at medium- or long-term support levels identified by Gunbot’s built-in trend detection, giving you another way to manage downturns.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="capturing-momentum-with-dynamic-scalps">Capturing Momentum with Dynamic Scalps<a href="https://www.gunbot.com/blog/stepgridscalp-strategy/#capturing-momentum-with-dynamic-scalps" class="hash-link" aria-label="Direct link to Capturing Momentum with Dynamic Scalps" title="Direct link to Capturing Momentum with Dynamic Scalps" translate="no">​</a></h2>
<p>When Gunbot detects rising bullish momentum, StepGridScalp actively seeks scalping opportunities. These trades are smaller than typical grid trades but timed perfectly around short-term market dips, such as when prices momentarily fall beneath key indicators like EMA10.</p>
<p>These quick trades use ultra-tight trailing stops, protecting your profits without risking them due to market volatility. StepGridScalp continuously recalibrates these scalp trades, keeping each entry and exit aligned with current market conditions.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="smart-accumulation-at-support-levels">Smart Accumulation at Support Levels<a href="https://www.gunbot.com/blog/stepgridscalp-strategy/#smart-accumulation-at-support-levels" class="hash-link" aria-label="Direct link to Smart Accumulation at Support Levels" title="Direct link to Smart Accumulation at Support Levels" translate="no">​</a></h2>
<p>Alongside quick scalps, StepGridScalp strategically positions larger limit buy orders at important support levels identified through Gunbot’s trend analysis. These buys happen at points historically proven as strong support, lowering your overall average entry price.</p>
<p>This smart accumulation approach allows you to confidently navigate deeper corrections, turning market downturns into opportunities rather than setbacks.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="unified-and-intelligent-trade-management">Unified and Intelligent Trade Management<a href="https://www.gunbot.com/blog/stepgridscalp-strategy/#unified-and-intelligent-trade-management" class="hash-link" aria-label="Direct link to Unified and Intelligent Trade Management" title="Direct link to Unified and Intelligent Trade Management" translate="no">​</a></h2>
<p>StepGridScalp manages all your trades as a unified position. It calculates profitability against a common break-even point, so each trade genuinely contributes to your bottom line after accounting for fees.</p>
<p>The strategy automatically prevents unprofitable partial sells, so every executed trade adds positive value to your portfolio.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="tuning-stepgridscalp-to-your-needs">Tuning StepGridScalp to Your Needs<a href="https://www.gunbot.com/blog/stepgridscalp-strategy/#tuning-stepgridscalp-to-your-needs" class="hash-link" aria-label="Direct link to Tuning StepGridScalp to Your Needs" title="Direct link to Tuning StepGridScalp to Your Needs" translate="no">​</a></h2>
<p>Despite its advanced mechanics, StepGridScalp remains easy to customize. Key parameters allow you to quickly fine-tune the strategy to your trading style and risk appetite:</p>
<ul>
<li class="">Adjust your standard trade sizes easily with the <strong>Trading Limit</strong>.</li>
<li class="">Fine-tune your scalping trade size using the <strong>Scalp Trading Ratio</strong>.</li>
<li class="">Set the aggressiveness of your support buys with simple <strong>Support Buy Ratios</strong>.</li>
<li class="">Choose automatic or manual grid spacing through the <strong>Step Size</strong> parameter.</li>
</ul>
<p>Adjusting these simple settings lets you comfortably manage risk, increase profitability, and easily adapt to changing market conditions.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="making-the-most-out-of-stepgridscalp">Making the Most Out of StepGridScalp<a href="https://www.gunbot.com/blog/stepgridscalp-strategy/#making-the-most-out-of-stepgridscalp" class="hash-link" aria-label="Direct link to Making the Most Out of StepGridScalp" title="Direct link to Making the Most Out of StepGridScalp" translate="no">​</a></h2>
<p>To maximize your results, here are some practical suggestions:</p>
<p>Try starting with very low trading amounts, and using a fairly <a href="https://www.gunbot.com/support/docs/built-in-strategies/spot-strategies/stepgridscalp/#overview-of-restrictions" target="_blank" rel="noopener" class="">unrestricted</a> setup. This keeps your risk super low, while you can observe the strategy behavior.</p>
<p>Regularly check your scalps and support buys, making slight adjustments based on your personal observations.</p>
<p>Keep an eye on market volatility - if it changes significantly, adjust your grid spacing accordingly to avoid unnecessary losses. Moving to higher timeframes can also be a solution to reduce activitity in uncertain market situations.</p>
<p>Accurately configure your exchange fees in Gunbot. This small step is essential for keeping profitability calculations accurate, especially when scalping.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="conclusion-a-complete-strategy-for-diverse-markets">Conclusion: A Complete Strategy for Diverse Markets<a href="https://www.gunbot.com/blog/stepgridscalp-strategy/#conclusion-a-complete-strategy-for-diverse-markets" class="hash-link" aria-label="Direct link to Conclusion: A Complete Strategy for Diverse Markets" title="Direct link to Conclusion: A Complete Strategy for Diverse Markets" translate="no">​</a></h2>
<p>StepGridScalp effectively merges structured grid discipline with responsive scalping and smart support-level trading. This blend gives you a trading setup that can adapt smoothly to different market conditions.</p>
<p>With StepGridScalp, you can confidently participate in different market phases - slow accumulation periods, sudden bullish spikes, or sharp downturns - all managed within a single, reliable strategy.</p>
<p>If you want to simplify your trading approach while maximizing your returns, StepGridScalp offers the perfect combination of consistency, flexibility, and performance.</p>]]></content>
        <author>
            <name>@boekenbox</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[StepGrid Strategy: Fee-aware Grid Trading in Spot Markets]]></title>
        <id>https://www.gunbot.com/blog/stepgrid-strategy/</id>
        <link href="https://www.gunbot.com/blog/stepgrid-strategy/"/>
        <updated>2025-07-03T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[StepGrid adds dynamic step sizing and fee aware exits to grid trading. Learn how to configure it in Gunbot for safer, consistent profits.]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/stepgrid-header.png" alt="StepGrid Strategy: Fee-aware Grid Trading in Spot Markets" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">StepGrid Strategy: Fee-aware Grid Trading in Spot Markets</figcaption></figure>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="stepgrid-turning-volatility-into-structured-fee-aware-profits">StepGrid: Turning Volatility Into Structured, Fee-Aware Profits<a href="https://www.gunbot.com/blog/stepgrid-strategy/#stepgrid-turning-volatility-into-structured-fee-aware-profits" class="hash-link" aria-label="Direct link to StepGrid: Turning Volatility Into Structured, Fee-Aware Profits" title="Direct link to StepGrid: Turning Volatility Into Structured, Fee-Aware Profits" translate="no">​</a></h2>
<p>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.</p>
<p><a href="https://www.gunbot.com/support/docs/built-in-strategies/spot-strategies/stepgrid/" target="_blank" rel="noopener" class="">StepGrid</a> 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.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="how-stepgrid-thinks-about-a-trade">How StepGrid Thinks About a Trade<a href="https://www.gunbot.com/blog/stepgrid-strategy/#how-stepgrid-thinks-about-a-trade" class="hash-link" aria-label="Direct link to How StepGrid Thinks About a Trade" title="Direct link to How StepGrid Thinks About a Trade" translate="no">​</a></h3>
<p>The moment StepGrid fires its first buy, it stamps that execution price as a reference. From there it watches both directions:</p>
<ul>
<li class=""><strong>Downward:</strong> Each time price falls by one grid step, the bot checks that it still has room under <code>MAX_BUY_COUNT</code>. If so, it spends another <code>TRADING_LIMIT</code>.</li>
<li class=""><strong>Upward:</strong> 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.</li>
</ul>
<p>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 <code>PROTECT_PARTIAL_SELL</code> confirms that the slice alone is green.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="choosing-a-step-size">Choosing a Step Size<a href="https://www.gunbot.com/blog/stepgrid-strategy/#choosing-a-step-size" class="hash-link" aria-label="Direct link to Choosing a Step Size" title="Direct link to Choosing a Step Size" translate="no">​</a></h3>
<p>Most users leave <code>AUTO_STEP_SIZE</code> set to <strong>true</strong>. The bot then measures Average True Range over the last <code>ATR_PERIOD</code> 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.</p>
<p>Manual spacing still has its place. Event traders often disable auto stepping, enter a <code>STEP_SIZE</code> that matches the expected headline move, and turn <code>ENFORCE_STEP</code> on. Enforcement forces every buy and sell to respect those exact levels, which keeps position size predictable in news-driven spikes.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="position-sizing-and-capital-risk">Position Sizing and Capital Risk<a href="https://www.gunbot.com/blog/stepgrid-strategy/#position-sizing-and-capital-risk" class="hash-link" aria-label="Direct link to Position Sizing and Capital Risk" title="Direct link to Position Sizing and Capital Risk" translate="no">​</a></h3>
<p>Grid strategies live or die on exposure management. StepGrid makes that explicit by linking three parameters:</p>
<ol>
<li class=""><code>TRADING_LIMIT</code> – the capital per buy.</li>
<li class=""><code>MAX_BUY_COUNT</code> – the maximum number of buys.</li>
<li class=""><code>KEEP_QUOTE</code> – the amount of quote the bot must leave untouched for fees or withdrawals.</li>
</ol>
<p>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 <code>MAX_BUY_COUNT</code> because you fear a long winter and you must lower <code>TRADING_LIMIT</code> to keep risk constant. The math never changes.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="a-typical-cycle-in-practice">A Typical Cycle in Practice<a href="https://www.gunbot.com/blog/stepgrid-strategy/#a-typical-cycle-in-practice" class="hash-link" aria-label="Direct link to A Typical Cycle in Practice" title="Direct link to A Typical Cycle in Practice" translate="no">​</a></h3>
<p>Consider a trader who runs USDT-BTC with a two-thousand-USDT account, a <code>TRADING_LIMIT</code> of 1000 USDT, and <code>MAX_BUY_COUNT</code> set to twenty.</p>
<ul>
<li class=""><strong>Phase one:</strong> 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.</li>
<li class=""><strong>Phase two:</strong> 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.</li>
<li class=""><strong>Phase three:</strong> 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.</li>
<li class=""><strong>Phase four:</strong> 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.</li>
</ul>
<p>During that entire sequence the trader never touched a button. The only manual decision was where to put <code>TRADING_LIMIT</code> and <code>MAX_BUY_COUNT</code> on day one.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="when-to-change-the-defaults">When to Change the Defaults<a href="https://www.gunbot.com/blog/stepgrid-strategy/#when-to-change-the-defaults" class="hash-link" aria-label="Direct link to When to Change the Defaults" title="Direct link to When to Change the Defaults" translate="no">​</a></h3>
<p>Most StepGrid setups work out-of-the-box, but three scenarios often require tweaks:</p>
<ul>
<li class=""><strong>Extremely tight spreads with maker rebates:</strong> Lower <code>MIN_VOLUME_TO_SELL</code> so the bot can realize tiny gains without tripping exchange minimums.</li>
<li class=""><strong>Illiquid altcoins:</strong> Turn <code>ENFORCE_STEP</code> on. This reduces the chance that a thin order book drags a trailer into a worse-than-step fill.</li>
<li class=""><strong>Long-term accumulation:</strong> Disable <code>SELL_ENABLED</code> or enable <code>FOREVER_BAGS</code>. StepGrid will buy dips forever and never calculate a full exit, effectively dollar-cost averaging with grid precision.</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="backtesting-proof-before-money">Backtesting: Proof Before Money<a href="https://www.gunbot.com/blog/stepgrid-strategy/#backtesting-proof-before-money" class="hash-link" aria-label="Direct link to Backtesting: Proof Before Money" title="Direct link to Backtesting: Proof Before Money" translate="no">​</a></h3>
<p>Gunbot Unlimited users can replay trades with <code>BF_SINCE</code> and <code>BF_UNTIL</code>. 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.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="final-thoughts">Final Thoughts<a href="https://www.gunbot.com/blog/stepgrid-strategy/#final-thoughts" class="hash-link" aria-label="Direct link to Final Thoughts" title="Direct link to Final Thoughts" translate="no">​</a></h3>
<p>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.</p>]]></content>
        <author>
            <name>@boekenbox</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Gunbot Python SDK – Automate Trading Logic with Simpler Code]]></title>
        <id>https://www.gunbot.com/blog/python-sdk/</id>
        <link href="https://www.gunbot.com/blog/python-sdk/"/>
        <updated>2025-06-27T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Build crypto trading tools with the Gunbot Python SDK. Use readable method calls to interact with your Gunbot instance's REST API.]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/python-sdk-header.png" alt="Gunbot Python SDK \u2013 Automate Trading Logic with Simpler Code" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">Gunbot Python SDK \u2013 Automate Trading Logic with Simpler Code</figcaption></figure>
<p>The <strong>Gunbot Python SDK</strong> 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.</p>
<p>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.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="tldr">TL;DR<a href="https://www.gunbot.com/blog/python-sdk/#tldr" class="hash-link" aria-label="Direct link to TL;DR" title="Direct link to TL;DR" translate="no">​</a></h2>
<ul>
<li class=""><strong>Simplifies working with the Gunbot API in Python</strong></li>
<li class=""><strong>Lets you send trades, check balances, manage config, analyze market data, etc</strong></li>
<li class=""><strong>No need to handle auth headers or raw requests manually</strong></li>
<li class=""><strong>Available now</strong> as package on <a href="https://pypi.org/project/gunbot-sdk-python/" target="_blank" rel="noopener nofollow" class="">PyPI</a> and source code on <a href="https://github.com/GuntharDeNiro/gunbot-sdk-python/" target="_blank" rel="noopener nofollow" class="">GitHub</a></li>
</ul>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="why-this-sdk-exists">Why This SDK Exists<a href="https://www.gunbot.com/blog/python-sdk/#why-this-sdk-exists" class="hash-link" aria-label="Direct link to Why This SDK Exists" title="Direct link to Why This SDK Exists" translate="no">​</a></h2>
<p>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.</p>
<p>This SDK takes care of the low-level plumbing so you can focus on writing your trading logic.</p>
<table><thead><tr><th>Without SDK</th><th>With <code>gunbot-sdk-python</code></th></tr></thead><tbody><tr><td>Manual URL building</td><td>Use named methods like <code>config_pair_add()</code></td></tr><tr><td>Custom headers/auth</td><td>Handled automatically</td></tr><tr><td>JSON serialization</td><td>Done behind the scenes</td></tr><tr><td>Error handling?</td><td>Still on you, but cleaner</td></tr></tbody></table>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="install-in-one-step">Install in One Step<a href="https://www.gunbot.com/blog/python-sdk/#install-in-one-step" class="hash-link" aria-label="Direct link to Install in One Step" title="Direct link to Install in One Step" translate="no">​</a></h2>
<div class="language-bash codeBlockContainer_mQmQ theme-code-block" style="--prism-color:#e2e8f0;--prism-background-color:#050505"><div class="codeBlockContent_t_Hd"><pre tabindex="0" class="prism-code language-bash codeBlock_RMoD thin-scrollbar" style="color:#e2e8f0;background-color:#050505"><code class="codeBlockLines_AclH"><div class="token-line" style="color:#e2e8f0"><span class="token plain">pip install gunbot-sdk-python</span><br></div></code></pre></div></div>
<p>It’s a lightweight package published to PyPI, with minimal external dependencies.</p>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="setup-example">Setup Example<a href="https://www.gunbot.com/blog/python-sdk/#setup-example" class="hash-link" aria-label="Direct link to Setup Example" title="Direct link to Setup Example" translate="no">​</a></h2>
<div class="language-python codeBlockContainer_mQmQ theme-code-block" style="--prism-color:#e2e8f0;--prism-background-color:#050505"><div class="codeBlockContent_t_Hd"><pre tabindex="0" class="prism-code language-python codeBlock_RMoD thin-scrollbar" style="color:#e2e8f0;background-color:#050505"><code class="codeBlockLines_AclH"><div class="token-line" style="color:#e2e8f0"><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">from</span><span class="token plain"> gunbot_sdk_python </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">import</span><span class="token plain"> ApiClient</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> GunbotApi</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">client </span><span class="token operator">=</span><span class="token plain"> ApiClient</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    base_path</span><span class="token operator">=</span><span class="token string" style="color:rgb(255, 121, 198)">"http://&lt;your-gunbot-host&gt;:3001/api/v1"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    token</span><span class="token operator">=</span><span class="token string" style="color:rgb(255, 121, 198)">"&lt;your-api-token&gt;"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">api </span><span class="token operator">=</span><span class="token plain"> GunbotApi</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">client</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><br></div></code></pre></div></div>
<p>That’s enough to start making requests against your running Gunbot instance. If you want to review auth and endpoints first, use the <a href="https://www.gunbot.com/support/docs/rest-api/gunbot-api-intro/" target="_blank" rel="noopener" class="">Gunbot REST API intro</a>.</p>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="common-use-cases">Common Use Cases<a href="https://www.gunbot.com/blog/python-sdk/#common-use-cases" class="hash-link" aria-label="Direct link to Common Use Cases" title="Direct link to Common Use Cases" translate="no">​</a></h2>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="total-portfolio-value">Total Portfolio Value<a href="https://www.gunbot.com/blog/python-sdk/#total-portfolio-value" class="hash-link" aria-label="Direct link to Total Portfolio Value" title="Direct link to Total Portfolio Value" translate="no">​</a></h3>
<div class="language-python codeBlockContainer_mQmQ theme-code-block" style="--prism-color:#e2e8f0;--prism-background-color:#050505"><div class="codeBlockContent_t_Hd"><pre tabindex="0" class="prism-code language-python codeBlock_RMoD thin-scrollbar" style="color:#e2e8f0;background-color:#050505"><code class="codeBlockLines_AclH"><div class="token-line" style="color:#e2e8f0"><span class="token plain">result </span><span class="token operator">=</span><span class="token plain"> api</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token plain">assets_total</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">body</span><span class="token operator">=</span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token string" style="color:rgb(255, 121, 198)">"exchange"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"binance"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token string" style="color:rgb(255, 121, 198)">"base"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"USDT"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token string" style="color:rgb(255, 121, 198)">"start"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token number">1719350400000</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token string" style="color:rgb(255, 121, 198)">"end"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token number">1719436800000</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">print</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token string-interpolation string" style="color:rgb(255, 121, 198)">f"Total USDT: </span><span class="token string-interpolation interpolation punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token string-interpolation interpolation">result</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(248, 248, 242)">[</span><span class="token string-interpolation interpolation string" style="color:rgb(255, 121, 198)">'data'</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(248, 248, 242)">]</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(248, 248, 242)">[</span><span class="token string-interpolation interpolation string" style="color:rgb(255, 121, 198)">'total'</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(248, 248, 242)">]</span><span class="token string-interpolation interpolation punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token string-interpolation string" style="color:rgb(255, 121, 198)">"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><br></div></code></pre></div></div>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="add-a-trading-pair-to-strategy-config">Add a Trading Pair to Strategy Config<a href="https://www.gunbot.com/blog/python-sdk/#add-a-trading-pair-to-strategy-config" class="hash-link" aria-label="Direct link to Add a Trading Pair to Strategy Config" title="Direct link to Add a Trading Pair to Strategy Config" translate="no">​</a></h3>
<div class="language-python codeBlockContainer_mQmQ theme-code-block" style="--prism-color:#e2e8f0;--prism-background-color:#050505"><div class="codeBlockContent_t_Hd"><pre tabindex="0" class="prism-code language-python codeBlock_RMoD thin-scrollbar" style="color:#e2e8f0;background-color:#050505"><code class="codeBlockLines_AclH"><div class="token-line" style="color:#e2e8f0"><span class="token plain">api</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token plain">config_pair_add</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">body</span><span class="token operator">=</span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token string" style="color:rgb(255, 121, 198)">"exchange"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"binance"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token string" style="color:rgb(255, 121, 198)">"pair"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">"USDT-ETH"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token string" style="color:rgb(255, 121, 198)">"settings"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><br></div></code></pre></div></div>
<p>You provide Python dictionaries as input, and the SDK handles formatting and sending the request.</p>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="where-it-fits">Where It Fits<a href="https://www.gunbot.com/blog/python-sdk/#where-it-fits" class="hash-link" aria-label="Direct link to Where It Fits" title="Direct link to Where It Fits" translate="no">​</a></h2>
<p>This SDK is useful in various Python environments:</p>
<ul>
<li class=""><strong>CLI scripts</strong>: Automate trading tasks or daily reports</li>
<li class=""><strong>Jupyter notebooks</strong>: For testing signals or visualizing asset data</li>
<li class=""><strong>FastAPI/Flask apps</strong>: Build basic web dashboards or control panels</li>
<li class=""><strong>Airflow or cron jobs</strong>: Schedule config updates or balance pulls</li>
<li class=""><strong>Serverless functions</strong>: Trigger alerts or simple trades with minimal code</li>
</ul>
<p>There’s no framework lock-in. The SDK is straightforward to integrate wherever plain Python runs.</p>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="open-source--contributions">Open Source &amp; Contributions<a href="https://www.gunbot.com/blog/python-sdk/#open-source--contributions" class="hash-link" aria-label="Direct link to Open Source &amp; Contributions" title="Direct link to Open Source &amp; Contributions" translate="no">​</a></h2>
<p>The SDK is licensed under MIT and source code is available on GitHub:</p>
<ul>
<li class=""><a href="https://github.com/GuntharDeNiro/gunbot-sdk-python/" target="_blank" rel="noopener nofollow" class="">GitHub Repo</a></li>
</ul>
<p>Pull requests, issues and suggestions are welcome.</p>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="a-quick-reminder-on-security">A Quick Reminder on Security<a href="https://www.gunbot.com/blog/python-sdk/#a-quick-reminder-on-security" class="hash-link" aria-label="Direct link to A Quick Reminder on Security" title="Direct link to A Quick Reminder on Security" translate="no">​</a></h2>
<p>When automating anything related to real funds:</p>
<ul>
<li class=""><strong>Don’t hardcode tokens in scripts</strong></li>
<li class=""><strong>Use secure environments or secrets managers</strong></li>
<li class=""><strong>Avoid exposing your Gunbot instance publicly</strong></li>
<li class=""><strong>Prefer HTTPS whenever not using Gunbot on localhost</strong></li>
</ul>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="what-is-gunbot">What Is Gunbot?<a href="https://www.gunbot.com/blog/python-sdk/#what-is-gunbot" class="hash-link" aria-label="Direct link to What Is Gunbot?" title="Direct link to What Is Gunbot?" translate="no">​</a></h2>
<p>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.</p>
<p>The Python SDK is just one way to extend Gunbot with your own code.</p>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="getting-started">Getting Started<a href="https://www.gunbot.com/blog/python-sdk/#getting-started" class="hash-link" aria-label="Direct link to Getting Started" title="Direct link to Getting Started" translate="no">​</a></h2>
<p>To recap:</p>
<ol>
<li class="">Install the SDK: <code>pip install gunbot-sdk-python</code></li>
<li class="">Connect to your Gunbot instance</li>
<li class="">Authenticate using your API token</li>
<li class="">Call API methods using simple Python</li>
</ol>
<p>Resources:</p>
<ul>
<li class="">PyPI: <a href="https://pypi.org/project/gunbot-sdk-python/" target="_blank" rel="noopener nofollow" class="">https://pypi.org/project/gunbot-sdk-python/</a></li>
<li class="">GitHub: <a href="https://github.com/GuntharDeNiro/gunbot-sdk-python/" target="_blank" rel="noopener nofollow" class="">https://github.com/GuntharDeNiro/gunbot-sdk-python/</a></li>
</ul>]]></content>
        <author>
            <name>@boekenbox</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Gunbot JavaScript SDK – Your Shortcut to Automated Trading]]></title>
        <id>https://www.gunbot.com/blog/js-sdk/</id>
        <link href="https://www.gunbot.com/blog/js-sdk/"/>
        <updated>2025-06-16T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Build trading tools with the open-source Gunbot JavaScript SDK, using TypeScript types and API methods for spot, futures and supported DeFi markets.]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/js-sdk-header.png" alt="Gunbot JavaScript SDK \u2013 Your Shortcut to Automated Trading" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">Gunbot JavaScript SDK \u2013 Your Shortcut to Automated Trading</figcaption></figure>
<p>Ship your trading ideas faster: the <strong>open-source Gunbot JavaScript SDK</strong> wraps the Gunbot REST API in a single NPM package, with strong TypeScript types and one-line calls for spot, futures and DeFi markets. If you're a battle-hardened dev or just looking at automated trading, the SDK turns "send orders" and "pull balances" into a few readable lines of code, no boilerplate, no guesswork.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="tldr">TL;DR<a href="https://www.gunbot.com/blog/js-sdk/#tldr" class="hash-link" aria-label="Direct link to TL;DR" title="Direct link to TL;DR" translate="no">​</a></h2>
<ul>
<li class=""><strong>Direct REST calls are history</strong>: <code>gunbot-sdk-js</code> gives you strongly-typed methods and a unified payload structure</li>
<li class=""><strong>Works everywhere</strong>: Node 18+, browsers, serverless, Deno, Bun</li>
<li class=""><strong>100% open-source (MIT)</strong>: fork it, extend it, ship it</li>
<li class=""><strong>Brand-new to Gunbot?</strong> Start with the GUI today, graduate to the SDK tomorrow without changing tools</li>
</ul>
<p><strong>Grab it now:</strong></p>
<ul>
<li class=""><strong>npm</strong>: <a href="https://www.npmjs.com/package/gunbot-sdk-js" target="_blank" rel="noopener nofollow" class="">https://www.npmjs.com/package/gunbot-sdk-js</a></li>
<li class=""><strong>GitHub</strong>: <a href="https://github.com/gunthardeniro/gunbot-sdk-js" target="_blank" rel="noopener nofollow" class="">https://github.com/gunthardeniro/gunbot-sdk-js</a></li>
<li class=""><strong>API docs</strong>: <a href="https://gunthardeniro.github.io/gunbot-sdk-js/" target="_blank" rel="noopener nofollow" class="">https://gunthardeniro.github.io/gunbot-sdk-js/</a></li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="why-developers-asked-for-an-sdk">Why Developers Asked for an SDK<a href="https://www.gunbot.com/blog/js-sdk/#why-developers-asked-for-an-sdk" class="hash-link" aria-label="Direct link to Why Developers Asked for an SDK" title="Direct link to Why Developers Asked for an SDK" translate="no">​</a></h2>
<p>Building trading applications directly against REST APIs is tedious and error-prone. You're constantly assembling URLs, crafting JSON payloads by hand, and hoping your homemade TypeScript interfaces match the server schema. One small typo in a parameter name, and your order fails silently. Miss a required field, and you're debugging authentication errors at 2 AM.</p>
<p>The Gunbot JavaScript SDK eliminates this friction by providing a developer-first abstraction layer that feels natural to use:</p>
<table><thead><tr><th>Without SDK</th><th>With <code>gunbot-sdk-js</code></th></tr></thead><tbody><tr><td>Manual URLs &amp; payloads</td><td>Call intuitive methods like <code>configPairAdd()</code></td></tr><tr><td>Hand-written interfaces</td><td>Types auto-generated from OpenAPI</td></tr><tr><td>Different shapes per market</td><td>One consistent payload format</td></tr><tr><td>Build tweaks for ESM/CJS</td><td>Works out-of-the-box everywhere</td></tr></tbody></table>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="the-problem-with-raw-api-calls">The Problem with Raw API Calls<a href="https://www.gunbot.com/blog/js-sdk/#the-problem-with-raw-api-calls" class="hash-link" aria-label="Direct link to The Problem with Raw API Calls" title="Direct link to The Problem with Raw API Calls" translate="no">​</a></h2>
<p>Let's be honest: working with trading APIs directly is a pain. You end up with code that looks like this:</p>
<div class="language-js codeBlockContainer_mQmQ theme-code-block" style="--prism-color:#e2e8f0;--prism-background-color:#050505"><div class="codeBlockContent_t_Hd"><pre tabindex="0" class="prism-code language-js codeBlock_RMoD thin-scrollbar" style="color:#e2e8f0;background-color:#050505"><code class="codeBlockLines_AclH"><div class="token-line" style="color:#e2e8f0"><span class="token comment" style="color:rgb(98, 114, 164)">// The old way - error-prone and verbose</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> response </span><span class="token operator">=</span><span class="token plain"> </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">await</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">fetch</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token template-string template-punctuation string" style="color:rgb(255, 121, 198)">`</span><span class="token template-string interpolation interpolation-punctuation punctuation" style="color:rgb(248, 248, 242)">${</span><span class="token template-string interpolation">baseUrl</span><span class="token template-string interpolation interpolation-punctuation punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token template-string string" style="color:rgb(255, 121, 198)">/api/v1/config/addpair</span><span class="token template-string template-punctuation string" style="color:rgb(255, 121, 198)">`</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token literal-property property">method</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'POST'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token literal-property property">headers</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token string-property property">'Authorization'</span><span class="token operator">:</span><span class="token plain"> </span><span class="token template-string template-punctuation string" style="color:rgb(255, 121, 198)">`</span><span class="token template-string string" style="color:rgb(255, 121, 198)">Bearer </span><span class="token template-string interpolation interpolation-punctuation punctuation" style="color:rgb(248, 248, 242)">${</span><span class="token template-string interpolation">token</span><span class="token template-string interpolation interpolation-punctuation punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token template-string template-punctuation string" style="color:rgb(255, 121, 198)">`</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token string-property property">'Content-Type'</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'application/json'</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token literal-property property">body</span><span class="token operator">:</span><span class="token plain"> </span><span class="token known-class-name class-name">JSON</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">stringify</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token literal-property property">exchange</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'binance'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token literal-property property">pair</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'BTC-USDT'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token comment" style="color:rgb(98, 114, 164)">// Wait, was it 'base' or 'baseCurrency'?</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">    </span><span class="token comment" style="color:rgb(98, 114, 164)">// Let me check the docs again...</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><br></div></code></pre></div></div>
<p>With the SDK, that same operation becomes:</p>
<div class="language-js codeBlockContainer_mQmQ theme-code-block" style="--prism-color:#e2e8f0;--prism-background-color:#050505"><div class="codeBlockContent_t_Hd"><pre tabindex="0" class="prism-code language-js codeBlock_RMoD thin-scrollbar" style="color:#e2e8f0;background-color:#050505"><code class="codeBlockLines_AclH"><div class="token-line" style="color:#e2e8f0"><span class="token comment" style="color:rgb(98, 114, 164)">// The SDK way - clean and type-safe</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">await</span><span class="token plain"> gunbot</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">configPairAdd</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token literal-property property">exchange</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'binance'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token literal-property property">pair</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'BTC-USDT'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token literal-property property">settings</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><br></div></code></pre></div></div>
<p>Your IDE provides autocomplete, TypeScript catches errors before runtime, and you spend more time building features instead of debugging API calls.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="install-in-under-a-minute">Install in Under a Minute<a href="https://www.gunbot.com/blog/js-sdk/#install-in-under-a-minute" class="hash-link" aria-label="Direct link to Install in Under a Minute" title="Direct link to Install in Under a Minute" translate="no">​</a></h2>
<p>Getting started is straightforward:</p>
<div class="language-bash codeBlockContainer_mQmQ theme-code-block" style="--prism-color:#e2e8f0;--prism-background-color:#050505"><div class="codeBlockContent_t_Hd"><pre tabindex="0" class="prism-code language-bash codeBlock_RMoD thin-scrollbar" style="color:#e2e8f0;background-color:#050505"><code class="codeBlockLines_AclH"><div class="token-line" style="color:#e2e8f0"><span class="token plain">npm install gunbot-sdk-js</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"># or yarn add gunbot-sdk-js</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"># or pnpm add gunbot-sdk-js</span><br></div></code></pre></div></div>
<p>The package exposes ESM, CommonJS and bundled <code>.d.ts</code> types via <code>exports</code>, so your toolchain picks the right build automatically. No configuration required, no build step headaches.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="three-line-setup">Three-Line Setup<a href="https://www.gunbot.com/blog/js-sdk/#three-line-setup" class="hash-link" aria-label="Direct link to Three-Line Setup" title="Direct link to Three-Line Setup" translate="no">​</a></h2>
<div class="language-js codeBlockContainer_mQmQ theme-code-block" style="--prism-color:#e2e8f0;--prism-background-color:#050505"><div class="codeBlockContent_t_Hd"><pre tabindex="0" class="prism-code language-js codeBlock_RMoD thin-scrollbar" style="color:#e2e8f0;background-color:#050505"><code class="codeBlockLines_AclH"><div class="token-line" style="color:#e2e8f0"><span class="token keyword module" style="color:rgb(189, 147, 249);font-style:italic">import</span><span class="token plain"> </span><span class="token imports punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token imports"> </span><span class="token imports maybe-class-name">ApiClient</span><span class="token imports punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token imports"> </span><span class="token imports maybe-class-name">GunbotApi</span><span class="token imports"> </span><span class="token imports punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"> </span><span class="token keyword module" style="color:rgb(189, 147, 249);font-style:italic">from</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'gunbot-sdk-js'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> api </span><span class="token operator">=</span><span class="token plain"> </span><span class="token maybe-class-name">ApiClient</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">instance</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">api</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">basePath</span><span class="token plain"> </span><span class="token operator">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'http://&lt;your-gunbot-host&gt;:3001/api/v1'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">api</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">authentications</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access maybe-class-name">BearerAuth</span><span class="token plain"> </span><span class="token operator">=</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"> </span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token literal-property property">type</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'oauth2'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token literal-property property">accessToken</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'&lt;your-api-token&gt;'</span><span class="token plain"> </span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> gunbot </span><span class="token operator">=</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">new</span><span class="token plain"> </span><span class="token class-name">GunbotApi</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">api</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><br></div></code></pre></div></div>
<p>That's it. You're ready to start making API calls. If you want the endpoint/auth flow before diving into code, start with the <a href="https://www.gunbot.com/support/docs/rest-api/gunbot-api-intro/" target="_blank" rel="noopener" class="">Gunbot REST API intro</a>.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="real-world-examples">Real-World Examples<a href="https://www.gunbot.com/blog/js-sdk/#real-world-examples" class="hash-link" aria-label="Direct link to Real-World Examples" title="Direct link to Real-World Examples" translate="no">​</a></h2>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="portfolio-overview">Portfolio Overview<a href="https://www.gunbot.com/blog/js-sdk/#portfolio-overview" class="hash-link" aria-label="Direct link to Portfolio Overview" title="Direct link to Portfolio Overview" translate="no">​</a></h3>
<p>Want to see your total USDT assets on Binance for the last 24 hours?</p>
<div class="language-js codeBlockContainer_mQmQ theme-code-block" style="--prism-color:#e2e8f0;--prism-background-color:#050505"><div class="codeBlockContent_t_Hd"><pre tabindex="0" class="prism-code language-js codeBlock_RMoD thin-scrollbar" style="color:#e2e8f0;background-color:#050505"><code class="codeBlockLines_AclH"><div class="token-line" style="color:#e2e8f0"><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> assets </span><span class="token operator">=</span><span class="token plain"> </span><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">await</span><span class="token plain"> gunbot</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">assetsTotal</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token literal-property property">exchange</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'binance'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token literal-property property">base</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'USDT'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token literal-property property">start</span><span class="token operator">:</span><span class="token plain"> </span><span class="token known-class-name class-name">Date</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">now</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token operator">-</span><span class="token plain"> </span><span class="token number">86400000</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token literal-property property">end</span><span class="token operator">:</span><span class="token plain"> </span><span class="token known-class-name class-name">Date</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">now</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token console class-name">console</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">log</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token template-string template-punctuation string" style="color:rgb(255, 121, 198)">`</span><span class="token template-string string" style="color:rgb(255, 121, 198)">Total USDT value: </span><span class="token template-string interpolation interpolation-punctuation punctuation" style="color:rgb(248, 248, 242)">${</span><span class="token template-string interpolation">assets</span><span class="token template-string interpolation punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token template-string interpolation property-access">data</span><span class="token template-string interpolation punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token template-string interpolation property-access">total</span><span class="token template-string interpolation interpolation-punctuation punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token template-string template-punctuation string" style="color:rgb(255, 121, 198)">`</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><br></div></code></pre></div></div>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="strategy-management">Strategy Management<a href="https://www.gunbot.com/blog/js-sdk/#strategy-management" class="hash-link" aria-label="Direct link to Strategy Management" title="Direct link to Strategy Management" translate="no">​</a></h3>
<p>Add a new trading pair to your strategy configuration:</p>
<div class="language-js codeBlockContainer_mQmQ theme-code-block" style="--prism-color:#e2e8f0;--prism-background-color:#050505"><div class="codeBlockContent_t_Hd"><pre tabindex="0" class="prism-code language-js codeBlock_RMoD thin-scrollbar" style="color:#e2e8f0;background-color:#050505"><code class="codeBlockLines_AclH"><div class="token-line" style="color:#e2e8f0"><span class="token keyword control-flow" style="color:rgb(189, 147, 249);font-style:italic">await</span><span class="token plain"> gunbot</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">configPairAdd</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token literal-property property">exchange</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'binance'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token literal-property property">pair</span><span class="token operator">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'ETH-USDT'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">  </span><span class="token literal-property property">settings</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><br></div></code></pre></div></div>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="universal-compatibility">Universal Compatibility<a href="https://www.gunbot.com/blog/js-sdk/#universal-compatibility" class="hash-link" aria-label="Direct link to Universal Compatibility" title="Direct link to Universal Compatibility" translate="no">​</a></h2>
<p>The SDK works in every modern JavaScript environment:</p>
<table><thead><tr><th>Environment</th><th>Status</th><th>Notes</th></tr></thead><tbody><tr><td>Node 18+</td><td>✅</td><td>Full feature support</td></tr><tr><td>Deno &amp; Bun</td><td>✅</td><td>Native ESM support</td></tr><tr><td>Modern browsers (Vite/Next)</td><td>✅</td><td>Works with all major bundlers</td></tr><tr><td>AWS Lambda / Cloud Functions</td><td>✅</td><td>Perfect for serverless trading bots</td></tr><tr><td>TypeScript strict mode</td><td>✅</td><td>Type-safe throughout</td></tr></tbody></table>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="browser-usage">Browser Usage<a href="https://www.gunbot.com/blog/js-sdk/#browser-usage" class="hash-link" aria-label="Direct link to Browser Usage" title="Direct link to Browser Usage" translate="no">​</a></h3>
<p>When using the SDK in browsers, it integrates smoothly with popular frameworks like React, Vue, and Angular, making it easy to build trading interfaces and dashboards.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="serverless-functions">Serverless Functions<a href="https://www.gunbot.com/blog/js-sdk/#serverless-functions" class="hash-link" aria-label="Direct link to Serverless Functions" title="Direct link to Serverless Functions" translate="no">​</a></h3>
<p>The SDK is ideal for serverless trading applications. Its small footprint and zero dependencies (beyond the generated client) mean fast cold starts and minimal bundle sizes.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="open-source--community">Open Source &amp; Community<a href="https://www.gunbot.com/blog/js-sdk/#open-source--community" class="hash-link" aria-label="Direct link to Open Source &amp; Community" title="Direct link to Open Source &amp; Community" translate="no">​</a></h2>
<p>Licensed under <strong>MIT</strong>, the SDK lives on GitHub and welcomes contributions.</p>
<p><strong>Contributing is easy:</strong></p>
<ol>
<li class="">Fork the repository</li>
<li class="">Create your feature branch</li>
<li class="">Add tests for new functionality</li>
<li class="">Submit a pull request</li>
</ol>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="security-best-practices">Security Best Practices<a href="https://www.gunbot.com/blog/js-sdk/#security-best-practices" class="hash-link" aria-label="Direct link to Security Best Practices" title="Direct link to Security Best Practices" translate="no">​</a></h2>
<p>When using the SDK in production:</p>
<ul>
<li class=""><strong>Never hardcode API tokens</strong>: Use environment variables or secure vaults</li>
<li class=""><strong>Implement proper authentication</strong>: Follow OAuth2 best practices for token management</li>
<li class=""><strong>Use HTTPS</strong>: Always connect to Gunbot over secure connections, unless used on localhost</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="new-to-gunbot">New to Gunbot?<a href="https://www.gunbot.com/blog/js-sdk/#new-to-gunbot" class="hash-link" aria-label="Direct link to New to Gunbot?" title="Direct link to New to Gunbot?" translate="no">​</a></h2>
<p>Gunbot powers automated trading strategies on 25+ exchanges, from Binance and Coinbase to decentralized exchanges like Hyperliquid. The platform offers:</p>
<ul>
<li class=""><strong>Pre-built strategies</strong>: DCA, grid trading, arbitrage, and more</li>
<li class=""><strong>Strategy builder</strong>: No coding required for basic automation</li>
<li class=""><strong>Backtesting tools</strong>: Test strategies against historical data</li>
<li class=""><strong>Risk management</strong>: Stop losses, trailing stops, and position sizing</li>
<li class=""><strong>Multi-exchange support</strong>: Trade across dozens of venues simultaneously</li>
</ul>
<p>The SDK isn't mandatory at all for using Gunbot, but it gives you deeper automation possibilities, custom dashboards, AI signal integrations, CI/CD pipeline checks, and complex multi-strategy orchestration, whenever you're ready to level up your trading operation.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="ready-to-build">Ready to Build?<a href="https://www.gunbot.com/blog/js-sdk/#ready-to-build" class="hash-link" aria-label="Direct link to Ready to Build?" title="Direct link to Ready to Build?" translate="no">​</a></h2>
<p>Getting started takes just four steps:</p>
<ol>
<li class=""><strong>Install the SDK</strong>: <code>npm install gunbot-sdk-js</code></li>
<li class=""><strong>Configure the client</strong>: Point <code>api.basePath</code> at your Gunbot REST host</li>
<li class=""><strong>Authenticate</strong>: Drop in a bearer token from the GUI or use <code>authLogin()</code></li>
<li class=""><strong>Start building</strong>: Automate trades, tweak strategies, and pull balances with just a few lines of code</li>
</ol>
<p>The SDK documentation includes detailed examples, from simple balance checks to complex multi-exchange arbitrage bots. If you're building a weekend project or a production trading system, the Gunbot JavaScript SDK gives you the tools to ship faster and with confidence.</p>
<p><strong>Ready to turn your trading ideas into code?</strong> Install the SDK today and join the <a href="https://www.gunbot.com/devcommunity/" target="_blank" rel="noopener" class="">community</a> of developers automating their way to better trading results.</p>]]></content>
        <author>
            <name>@boekenbox</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Integrating External Trading Signals with Gunbot]]></title>
        <id>https://www.gunbot.com/blog/maximize-profits-external-trading-signals-gunbot/</id>
        <link href="https://www.gunbot.com/blog/maximize-profits-external-trading-signals-gunbot/"/>
        <updated>2025-06-01T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Connect external trading signals to Gunbot. Learn how signal integration works and how to include external alerts in your automated trading setup.]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/signals-header.png" alt="Integrating External Trading Signals with Gunbot" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">Integrating External Trading Signals with Gunbot</figcaption></figure>
<p>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.</p>
<p><em>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.</em></p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="why-integrate-trading-signals-with-gunbot">Why Integrate Trading Signals with Gunbot?<a href="https://www.gunbot.com/blog/maximize-profits-external-trading-signals-gunbot/#why-integrate-trading-signals-with-gunbot" class="hash-link" aria-label="Direct link to Why Integrate Trading Signals with Gunbot?" title="Direct link to Why Integrate Trading Signals with Gunbot?" translate="no">​</a></h2>
<p>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.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="benefits-of-using-external-signals">Benefits of Using External Signals<a href="https://www.gunbot.com/blog/maximize-profits-external-trading-signals-gunbot/#benefits-of-using-external-signals" class="hash-link" aria-label="Direct link to Benefits of Using External Signals" title="Direct link to Benefits of Using External Signals" translate="no">​</a></h3>
<p>By adding advanced external signals, you can:</p>
<ul>
<li class=""><strong>Improve trade entries and exits</strong>: Rely on a wider array of market indicators for better timing.</li>
<li class=""><strong>Customize data sources</strong>: Select data that best fits your strategy, including advanced indicators from sources like TradingView.</li>
<li class=""><strong>Make more informed decisions</strong>: External tools often provide more detailed market insights, improving the quality of your trading.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="integrating-signals-from-external-tools">Integrating Signals from External Tools<a href="https://www.gunbot.com/blog/maximize-profits-external-trading-signals-gunbot/#integrating-signals-from-external-tools" class="hash-link" aria-label="Direct link to Integrating Signals from External Tools" title="Direct link to Integrating Signals from External Tools" translate="no">​</a></h2>
<p>To <a href="https://www.gunbot.com/support/docs/alerts/webhook-alerts/" target="_blank" rel="noopener" class="">connect trading signals to Gunbot</a>, 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.</p>
<p><img decoding="async" loading="lazy" alt="TradingView webhook alert configured to send an external trading signal to Gunbot" src="https://www.gunbot.com/blog/assets/images/gunbot-tradingview-webhook-alert-59a04a4bc71243399cb8b1438d0fb441.png" title="TradingView webhook alert that Gunbot processes as an automated trading signal" width="958" height="700" class="img_SS3x"></p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="connecting-tradingview-to-gunbot">Connecting TradingView to Gunbot<a href="https://www.gunbot.com/blog/maximize-profits-external-trading-signals-gunbot/#connecting-tradingview-to-gunbot" class="hash-link" aria-label="Direct link to Connecting TradingView to Gunbot" title="Direct link to Connecting TradingView to Gunbot" translate="no">​</a></h3>
<ol>
<li class="">
<p><strong>Configure TradingView Alerts</strong></p>
<p>Start by setting up the alerts in TradingView. Format these alerts so Gunbot can accept them. A typical alert might look like this:</p>
<div class="language-text codeBlockContainer_mQmQ theme-code-block" style="--prism-color:#e2e8f0;--prism-background-color:#050505"><div class="codeBlockContent_t_Hd"><pre tabindex="0" class="prism-code language-text codeBlock_RMoD thin-scrollbar" style="color:#e2e8f0;background-color:#050505"><code class="codeBlockLines_AclH"><div class="token-line" style="color:#e2e8f0"><span class="token plain">123456 binance buy USDT-BTC 0.1 42553.4</span><br></div><div class="token-line" style="color:#e2e8f0"><span class="token plain">(passphrase, exchange, order type, pair, amount, price)</span><br></div></code></pre></div></div>
<ul>
<li class=""><strong>Passphrase</strong>: This makes it so only signals sent by you are processed. You can set up this passphrase in Gunbot's configuration settings.</li>
<li class=""><strong>Exchange, Order Type, Pair, Amount, Price</strong>: These fields provide the specifics of the trade.</li>
</ul>
</li>
<li class="">
<p><strong>Set Up Your TradingView Account</strong></p>
<p>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.</p>
</li>
<li class="">
<p><strong>Enable Webhook Listener in Gunbot</strong></p>
<p>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.</p>
</li>
<li class="">
<p><strong>Connect the Webhook URL in TradingView</strong></p>
<p>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.</p>
</li>
</ol>
<blockquote>
<p>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.</p>
</blockquote>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="example-setup">Example Setup<a href="https://www.gunbot.com/blog/maximize-profits-external-trading-signals-gunbot/#example-setup" class="hash-link" aria-label="Direct link to Example Setup" title="Direct link to Example Setup" translate="no">​</a></h3>
<p>Here's an example of how an alert might look in TradingView when configured to send data to Gunbot:</p>
<ul>
<li class=""><strong>Webhook URL</strong>: <code>https://[Your_Gunbot_IP]:443</code></li>
<li class=""><strong>Message</strong>: <code>123456 binance buy BTC-USDT 0.05</code> (Use placeholders for price or other variables if needed).</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="optimizing-your-strategy-with-external-signals">Optimizing Your Strategy with External Signals<a href="https://www.gunbot.com/blog/maximize-profits-external-trading-signals-gunbot/#optimizing-your-strategy-with-external-signals" class="hash-link" aria-label="Direct link to Optimizing Your Strategy with External Signals" title="Direct link to Optimizing Your Strategy with External Signals" translate="no">​</a></h2>
<p>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:</p>
<ol>
<li class="">
<p><strong>Use Multiple Indicators to Filter Trades</strong></p>
<p>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.</p>
</li>
<li class="">
<p><strong>Refine Your Risk Management</strong></p>
<p>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.</p>
</li>
<li class="">
<p><strong>Monitor Performance and Adjust Regularly</strong></p>
<p>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.</p>
</li>
<li class="">
<p><strong>Stay Up to Date with Market Conditions</strong></p>
<p>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.</p>
</li>
</ol>
<p>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.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="conclusion">Conclusion<a href="https://www.gunbot.com/blog/maximize-profits-external-trading-signals-gunbot/#conclusion" class="hash-link" aria-label="Direct link to Conclusion" title="Direct link to Conclusion" translate="no">​</a></h2>
<p>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.</p>
<p>For more tutorials and tips on Gunbot, be sure to check out our other articles.</p>]]></content>
        <author>
            <name>@boekenbox</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Alpaca Integration: Automate Stock and ETF Trading with Gunbot]]></title>
        <id>https://www.gunbot.com/blog/alpaca-integration/</id>
        <link href="https://www.gunbot.com/blog/alpaca-integration/"/>
        <updated>2025-04-04T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Gunbot now supports Alpaca, bringing automation to U.S. stock and ETF markets. Run your crypto strategies, or new ones, on traditional assets with full control.]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/alpaca-header.png" alt="Alpaca Integration: Automate Stock and ETF Trading with Gunbot" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">Alpaca Integration: Automate Stock and ETF Trading with Gunbot</figcaption></figure>
<p>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.</p>
<div class="callout callout--info theme-admonition theme-admonition-info alert alert--info"><span class="callout__icon"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4" fill="none"></path><path d="M12 8h.01" fill="none"></path></svg></span><div class="callout__body"><p class="callout__title">info</p><div class="callout__content"><p>This is a new integration. Some things may not work perfectly yet. We're actively tracking issues and improving stability as we go.</p></div></div></div>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="why-alpaca">Why Alpaca?<a href="https://www.gunbot.com/blog/alpaca-integration/#why-alpaca" class="hash-link" aria-label="Direct link to Why Alpaca?" title="Direct link to Why Alpaca?" translate="no">​</a></h2>
<p>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.</p>
<p>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.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="what-you-can-automate">What You Can Automate<a href="https://www.gunbot.com/blog/alpaca-integration/#what-you-can-automate" class="hash-link" aria-label="Direct link to What You Can Automate" title="Direct link to What You Can Automate" translate="no">​</a></h2>
<p>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, <a href="https://www.gunbot.com/support/docs/custom-strategies/what-are-custom-strategies/" target="_blank" rel="noopener" class="">customizing trade logic</a>, and reacting to market movements in real time, just like you would with crypto.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="stock-and-etf-trading">Stock and ETF Trading<a href="https://www.gunbot.com/blog/alpaca-integration/#stock-and-etf-trading" class="hash-link" aria-label="Direct link to Stock and ETF Trading" title="Direct link to Stock and ETF Trading" translate="no">​</a></h3>
<p>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.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="strategy-reuse-and-adaptation">Strategy Reuse and Adaptation<a href="https://www.gunbot.com/blog/alpaca-integration/#strategy-reuse-and-adaptation" class="hash-link" aria-label="Direct link to Strategy Reuse and Adaptation" title="Direct link to Strategy Reuse and Adaptation" translate="no">​</a></h3>
<p>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.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="diversification-without-manual-overhead">Diversification, Without Manual Overhead<a href="https://www.gunbot.com/blog/alpaca-integration/#diversification-without-manual-overhead" class="hash-link" aria-label="Direct link to Diversification, Without Manual Overhead" title="Direct link to Diversification, Without Manual Overhead" translate="no">​</a></h3>
<p>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.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="setup-and-control">Setup and Control<a href="https://www.gunbot.com/blog/alpaca-integration/#setup-and-control" class="hash-link" aria-label="Direct link to Setup and Control" title="Direct link to Setup and Control" translate="no">​</a></h2>
<p>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.</p>
<p>Setup is quick:</p>
<ol>
<li class="">Connect your Alpaca account using API keys</li>
<li class="">Configure a strategy, choose from Gunbot’s library or build your own</li>
<li class="">Let Gunbot run the strategy and handle execution</li>
</ol>
<p>Everything runs locally or on your server, just like with crypto, giving you the same security and transparency you’re used to.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="why-this-matters">Why This Matters<a href="https://www.gunbot.com/blog/alpaca-integration/#why-this-matters" class="hash-link" aria-label="Direct link to Why This Matters" title="Direct link to Why This Matters" translate="no">​</a></h2>
<p>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.</p>
<p>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.</p>]]></content>
        <author>
            <name>@boekenbox</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Hyperliquid Integration: Trade Spot and Perps with Gunbot on DeFi]]></title>
        <id>https://www.gunbot.com/blog/hyperliquid-integration/</id>
        <link href="https://www.gunbot.com/blog/hyperliquid-integration/"/>
        <updated>2025-04-04T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Gunbot now supports Hyperliquid for decentralized spot and perpetual trading. Automate your strategies on-chain with full custody and fast execution.]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/hyperliquid-header.png" alt="Hyperliquid Integration: Trade Spot and Perps with Gunbot on DeFi" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">Hyperliquid Integration: Trade Spot and Perps with Gunbot on DeFi</figcaption></figure>
<p>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.</p>
<div class="callout callout--info theme-admonition theme-admonition-info alert alert--info"><span class="callout__icon"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4" fill="none"></path><path d="M12 8h.01" fill="none"></path></svg></span><div class="callout__body"><p class="callout__title">info</p><div class="callout__content"><p>This is a new integration. Some things may not work perfectly yet. We're actively tracking issues and improving stability as we go.</p></div></div></div>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="why-hyperliquid">Why Hyperliquid?<a href="https://www.gunbot.com/blog/hyperliquid-integration/#why-hyperliquid" class="hash-link" aria-label="Direct link to Why Hyperliquid?" title="Direct link to Why Hyperliquid?" translate="no">​</a></h2>
<p>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 <a href="https://www.gunbot.com/exchanges/hyperliquid-trading-bot/" target="_blank" rel="noopener" class="">Hyperliquid trading bot overview</a>.</p>
<p>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 <a href="https://www.gunbot.com/defi-trading-bot/" target="_blank" rel="noopener" class="">self-hosted DeFi trading automation</a> without compromising on the speed or efficiency they’re used to.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="what-you-can-do-with-gunbot-on-hyperliquid">What You Can Do with Gunbot on Hyperliquid<a href="https://www.gunbot.com/blog/hyperliquid-integration/#what-you-can-do-with-gunbot-on-hyperliquid" class="hash-link" aria-label="Direct link to What You Can Do with Gunbot on Hyperliquid" title="Direct link to What You Can Do with Gunbot on Hyperliquid" translate="no">​</a></h2>
<p>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.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="spot-trading">Spot Trading<a href="https://www.gunbot.com/blog/hyperliquid-integration/#spot-trading" class="hash-link" aria-label="Direct link to Spot Trading" title="Direct link to Spot Trading" translate="no">​</a></h3>
<p>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.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="perpetual-swap-derivatives-trading">Perpetual Swap (Derivatives) Trading<a href="https://www.gunbot.com/blog/hyperliquid-integration/#perpetual-swap-derivatives-trading" class="hash-link" aria-label="Direct link to Perpetual Swap (Derivatives) Trading" title="Direct link to Perpetual Swap (Derivatives) Trading" translate="no">​</a></h3>
<p>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.</p>
<p>These tools can help traders manage risk and maintain consistency, especially in markets where conditions change quickly and manual trading becomes a bottleneck.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="how-to-set-it-up">How to Set It Up<a href="https://www.gunbot.com/blog/hyperliquid-integration/#how-to-set-it-up" class="hash-link" aria-label="Direct link to How to Set It Up" title="Direct link to How to Set It Up" translate="no">​</a></h2>
<p>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.</p>
<p>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.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="why-it-matters">Why It Matters<a href="https://www.gunbot.com/blog/hyperliquid-integration/#why-it-matters" class="hash-link" aria-label="Direct link to Why It Matters" title="Direct link to Why It Matters" translate="no">​</a></h2>
<p>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.</p>
<p>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.</p>
<p>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, <a href="https://www.gunbot.com/support/docs/guides/trading-logic-and-optimization/selecting-spot-strategies/" target="_blank" rel="noopener" class="">test new ones</a>, or adapt to different market conditions, all without giving up control of your assets.</p>]]></content>
        <author>
            <name>@boekenbox</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[PancakeSwap Integration: Trade DeFi on BSC with Gunbot]]></title>
        <id>https://www.gunbot.com/blog/pancakeswap-integration/</id>
        <link href="https://www.gunbot.com/blog/pancakeswap-integration/"/>
        <updated>2025-04-04T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Explore Gunbot's PancakeSwap integration for automated token swaps on Binance Smart Chain, with self-custody and configurable DeFi strategies.]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/pancakeswap-header.png" alt="PancakeSwap Integration: Trade DeFi on BSC with Gunbot" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">PancakeSwap Integration: Trade DeFi on BSC with Gunbot</figcaption></figure>
<p>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 <a href="https://www.gunbot.com/defi-trading-bot/" target="_blank" rel="noopener" class="">DeFi trading bot automation</a> stack.</p>
<div class="callout callout--info theme-admonition theme-admonition-info alert alert--info"><span class="callout__icon"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4" fill="none"></path><path d="M12 8h.01" fill="none"></path></svg></span><div class="callout__body"><p class="callout__title">info</p><div class="callout__content"><p>This is a new integration. Some things may not work perfectly yet. We're actively tracking issues and improving stability as we go.</p></div></div></div>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="why-were-supporting-pancakeswap">Why We’re Supporting PancakeSwap<a href="https://www.gunbot.com/blog/pancakeswap-integration/#why-were-supporting-pancakeswap" class="hash-link" aria-label="Direct link to Why We’re Supporting PancakeSwap" title="Direct link to Why We’re Supporting PancakeSwap" translate="no">​</a></h2>
<p>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.</p>
<p>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.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="what-gunbot-can-do-on-pancakeswap">What Gunbot Can Do on PancakeSwap<a href="https://www.gunbot.com/blog/pancakeswap-integration/#what-gunbot-can-do-on-pancakeswap" class="hash-link" aria-label="Direct link to What Gunbot Can Do on PancakeSwap" title="Direct link to What Gunbot Can Do on PancakeSwap" translate="no">​</a></h2>
<p>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:</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="token-swap-automation">Token Swap Automation<a href="https://www.gunbot.com/blog/pancakeswap-integration/#token-swap-automation" class="hash-link" aria-label="Direct link to Token Swap Automation" title="Direct link to Token Swap Automation" translate="no">​</a></h3>
<p>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.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="strategy-flexibility">Strategy Flexibility<a href="https://www.gunbot.com/blog/pancakeswap-integration/#strategy-flexibility" class="hash-link" aria-label="Direct link to Strategy Flexibility" title="Direct link to Strategy Flexibility" translate="no">​</a></h3>
<p>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.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="derivatives-like-products">Derivatives-like Products<a href="https://www.gunbot.com/blog/pancakeswap-integration/#derivatives-like-products" class="hash-link" aria-label="Direct link to Derivatives-like Products" title="Direct link to Derivatives-like Products" translate="no">​</a></h3>
<p>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.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="setup-and-wallet-interaction">Setup and Wallet Interaction<a href="https://www.gunbot.com/blog/pancakeswap-integration/#setup-and-wallet-interaction" class="hash-link" aria-label="Direct link to Setup and Wallet Interaction" title="Direct link to Setup and Wallet Interaction" translate="no">​</a></h2>
<p>As with other DeFi platforms Gunbot supports, your assets stay in your wallet, and Gunbot interacts with PancakeSwap. That means:</p>
<ul>
<li class="">You keep custody of your funds</li>
<li class="">Everything happens on-chain</li>
</ul>
<p>This setup reduces counterparty risk while still giving you access to full automation.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="trading-on-bsc-with-gunbot">Trading on BSC with Gunbot<a href="https://www.gunbot.com/blog/pancakeswap-integration/#trading-on-bsc-with-gunbot" class="hash-link" aria-label="Direct link to Trading on BSC with Gunbot" title="Direct link to Trading on BSC with Gunbot" translate="no">​</a></h2>
<p>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.</p>
<p>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.</p>]]></content>
        <author>
            <name>@boekenbox</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Gunbot Xmas 2024 Trading Tournament – Watch Live]]></title>
        <id>https://www.gunbot.com/blog/gunbot-xmas-2024-tournament/</id>
        <link href="https://www.gunbot.com/blog/gunbot-xmas-2024-tournament/"/>
        <updated>2025-01-02T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[The Gunbot Xmas 2024 Trading Tournament is happening right now. If you love trading, bots, or just seeing clever ideas in action, this is for you.]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/xmas-tournament-header.png" alt="Gunbot Xmas 2024 Trading Tournament \u2013 Watch Live" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">Gunbot Xmas 2024 Trading Tournament \u2013 Watch Live</figcaption></figure>
<p>The Gunbot Xmas 2024 Trading Tournament is happening right now, and it’s been a blast to watch so far. Running from <strong>27 December 2024</strong> to <strong>26 January 2025</strong>, 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.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="where-to-watch">Where to Watch?<a href="https://www.gunbot.com/blog/gunbot-xmas-2024-tournament/#where-to-watch" class="hash-link" aria-label="Direct link to Where to Watch?" title="Direct link to Where to Watch?" translate="no">​</a></h2>
<p>You can catch it live right here:</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/ZJskwgY9s2A" title="Gunbot Xmas 2024 Trading Tournament" loading="lazy" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"></iframe>
<p>Or hop over to <a href="https://www.youtube.com/@gunthardeniro" target="_blank" rel="noopener nofollow" class="">YouTube</a> to join the chat.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="whats-this-tournament-about">What’s This Tournament About?<a href="https://www.gunbot.com/blog/gunbot-xmas-2024-tournament/#whats-this-tournament-about" class="hash-link" aria-label="Direct link to What’s This Tournament About?" title="Direct link to What’s This Tournament About?" translate="no">​</a></h2>
<p>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.</p>
<p>Here’s a quick overview of the kinds of strategies that are competing:</p>
<ul>
<li class=""><strong>Builder Strategies</strong> – Using Gunbot’s built-in tools to craft smart, adaptive setups.</li>
<li class=""><strong>Native + Tweaked Logic</strong> – Taking a default strategy and supercharging it with personal touches through autoconfig.</li>
<li class=""><strong>Custom Code</strong> – Completely unique trading algorithms written specifically for this tournament.</li>
</ul>
<p>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.</p>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="whats-on-the-line">What’s on the Line?<a href="https://www.gunbot.com/blog/gunbot-xmas-2024-tournament/#whats-on-the-line" class="hash-link" aria-label="Direct link to What’s on the Line?" title="Direct link to What’s on the Line?" translate="no">​</a></h2>
<p>The tournament isn’t just about pride (though there’s a lot of that, too). The winner of the official category gets:</p>
<ul>
<li class=""><strong>1268 USDT</strong></li>
<li class=""><strong>2.06 SOL</strong></li>
</ul>
<p>And here’s a fun twist: the prize pool comes from the contributions of the <em>losers</em> from the last competition. Talk about motivation to win!</p>
<p>This tournament is also the finals for the <a href="https://www.gunbot.com/leaderboard/" target="_blank" rel="noopener" class="">Gunbot Community Cup 2024</a>, so there’s plenty of history and rivalry behind it.</p>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="how-are-winners-picked">How Are Winners Picked?<a href="https://www.gunbot.com/blog/gunbot-xmas-2024-tournament/#how-are-winners-picked" class="hash-link" aria-label="Direct link to How Are Winners Picked?" title="Direct link to How Are Winners Picked?" translate="no">​</a></h2>
<p>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: <a href="https://www.gunbot.com/blog/compare-trading-bot-performance/" target="_blank" rel="noopener" class="">Comparing Trading Bot Performance</a>, this post got updated with the full code for the metric.</p>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="why-tune-in">Why Tune In?<a href="https://www.gunbot.com/blog/gunbot-xmas-2024-tournament/#why-tune-in" class="hash-link" aria-label="Direct link to Why Tune In?" title="Direct link to Why Tune In?" translate="no">​</a></h2>
<p>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.</p>
<p>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.</p>
<p><a href="https://www.youtube.com/live/ZJskwgY9s2A" target="_blank" rel="noopener nofollow" class="">Join the livestream on YouTube</a> and join the chat while you’re there. See you in the comments!</p>]]></content>
        <author>
            <name>@boekenbox</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Gunbot REST API: What Developers Actually Need to Know]]></title>
        <id>https://www.gunbot.com/blog/rest-api-introduction/</id>
        <link href="https://www.gunbot.com/blog/rest-api-introduction/"/>
        <updated>2024-12-16T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Explore the Gunbot REST API for building custom tools, connecting external systems and controlling a user-operated trading bot.]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/rest-api-header.png" alt="Gunbot REST API: What Developers Actually Need to Know" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">Gunbot REST API: What Developers Actually Need to Know</figcaption></figure>
<p>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 <em>you</em> want.”</p>
<p>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.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="why-use-the-api">Why Use the API?<a href="https://www.gunbot.com/blog/rest-api-introduction/#why-use-the-api" class="hash-link" aria-label="Direct link to Why Use the API?" title="Direct link to Why Use the API?" translate="no">​</a></h2>
<p>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 <a href="https://www.gunbot.com/support/docs/rest-api/gunbot-api-intro/" target="_blank" rel="noopener" class="">REST API</a> makes sense, it lets you run your own show.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="let-gunbot-handle-the-annoying-stuff">Let Gunbot Handle the Annoying Stuff<a href="https://www.gunbot.com/blog/rest-api-introduction/#let-gunbot-handle-the-annoying-stuff" class="hash-link" aria-label="Direct link to Let Gunbot Handle the Annoying Stuff" title="Direct link to Let Gunbot Handle the Annoying Stuff" translate="no">​</a></h2>
<p>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.</p>
<p>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.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="build-what-you-need-in-a-trading-bot">Build What <em>You</em> Need In A Trading Bot<a href="https://www.gunbot.com/blog/rest-api-introduction/#build-what-you-need-in-a-trading-bot" class="hash-link" aria-label="Direct link to build-what-you-need-in-a-trading-bot" title="Direct link to build-what-you-need-in-a-trading-bot" translate="no">​</a></h2>
<p>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.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="custom-algorithms-on-your-schedule"><strong>Custom Algorithms on Your Schedule</strong><a href="https://www.gunbot.com/blog/rest-api-introduction/#custom-algorithms-on-your-schedule" class="hash-link" aria-label="Direct link to custom-algorithms-on-your-schedule" title="Direct link to custom-algorithms-on-your-schedule" translate="no">​</a></h3>
<p>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.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="better-risk-controls"><strong>Better Risk Controls</strong><a href="https://www.gunbot.com/blog/rest-api-introduction/#better-risk-controls" class="hash-link" aria-label="Direct link to better-risk-controls" title="Direct link to better-risk-controls" translate="no">​</a></h3>
<p>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:</p>
<ul>
<li class="">Adjust position sizes dynamically based on your own risk models.</li>
<li class="">Create early warning systems tied to market conditions, like volatility spikes or liquidity drops.</li>
<li class="">Automate fail-safes that kick in before things go south; pause trades, hedge positions, or close out risky ones automatically.</li>
</ul>
<p>This isn’t “set it and forget it.” It’s active risk management matched to how you trade.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="integrate-everything">Integrate Everything<a href="https://www.gunbot.com/blog/rest-api-introduction/#integrate-everything" class="hash-link" aria-label="Direct link to Integrate Everything" title="Direct link to Integrate Everything" translate="no">​</a></h2>
<p>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.</p>
<ul>
<li class=""><strong>Bring in External Data</strong>: 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.</li>
<li class=""><strong>Sync With Other Tools</strong>: 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.</li>
<li class=""><strong>Build Custom Dashboards</strong>: Let’s be real, sometimes you just want a clean interface that shows <em>exactly</em> what you care about and nothing else. The API lets you design your own dashboards, no compromises.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="why-its-worth-your-time">Why It’s Worth Your Time<a href="https://www.gunbot.com/blog/rest-api-introduction/#why-its-worth-your-time" class="hash-link" aria-label="Direct link to Why It’s Worth Your Time" title="Direct link to Why It’s Worth Your Time" translate="no">​</a></h2>
<p>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.</p>
<p>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.</p>]]></content>
        <author>
            <name>@boekenbox</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Black Friday 2024: Special Gunbot Deals & A Look Back on a Strong Year]]></title>
        <id>https://www.gunbot.com/blog/black-friday-2024-gunbot-deals/</id>
        <link href="https://www.gunbot.com/blog/black-friday-2024-gunbot-deals/"/>
        <updated>2024-11-14T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Black Friday 2024 offers for Gunbot, plus a look back at what the community built during the year.]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/black-friday-2024-header.png" alt="Black Friday 2024: Special Gunbot Deals &amp; A Look Back on a Strong Year" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">Black Friday 2024: Special Gunbot Deals &amp; A Look Back on a Strong Year</figcaption></figure>
<p>This article records the Black Friday 2024 campaign and the community milestones around it. The campaign has ended; the current plans page is the source of truth for active offers.</p>
<div class="callout callout--info theme-admonition theme-admonition-note alert alert--secondary"><span class="callout__icon"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4" fill="none"></path><path d="M12 8h.01" fill="none"></path></svg></span><div class="callout__body"><p class="callout__title">Archived promotion</p><div class="callout__content"><p>This 2024 promotion has ended. Product names and prices from the expired offer have been removed. See the <a href="https://www.gunbot.com/plans/" target="_blank" rel="noopener" class="">current plans page</a> for today's purchase options.</p></div></div></div>
<p><img decoding="async" loading="lazy" alt="Gunbot Black Friday 2024 promotion artwork for automated crypto trading software deals" src="https://www.gunbot.com/blog/assets/images/black-friday-2024-header-e7af0864cdb5568162688ee52c22d65f.png" title="Gunbot Black Friday 2024 trading bot deals" width="1536" height="1024" class="img_SS3x"></p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="black-friday-2024-offers">Black Friday 2024 Offers<a href="https://www.gunbot.com/blog/black-friday-2024-gunbot-deals/#black-friday-2024-offers" class="hash-link" aria-label="Direct link to Black Friday 2024 Offers" title="Direct link to Black Friday 2024 Offers" translate="no">​</a></h2>
<p>The expired offer included a discounted Gunbot purchase option for new users.</p>
<ol start="2">
<li class=""><strong>Free Gunbot Monitor for Upgrades</strong><br>
<!-- -->If you're already a Gunbot user and thinking about upgrading, we’re adding a bonus: a free copy of <strong>Gunbot Monitor</strong>, the tool that lets you monitor multiple Gunbot instances from one interface. Normally it’s worth $99, but it’s yours free when you upgrade during the Black Friday sale. <a href="https://www.gunbot.com/blog/gunbot-monitor-for-power-users/" target="_blank" rel="noopener" class="">Learn more about Gunbot Monitor</a>.</li>
</ol>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="looking-back-on-2024">Looking Back on 2024<a href="https://www.gunbot.com/blog/black-friday-2024-gunbot-deals/#looking-back-on-2024" class="hash-link" aria-label="Direct link to Looking Back on 2024" title="Direct link to Looking Back on 2024" translate="no">​</a></h2>
<p>This year’s been a milestone for Gunbot, and a lot of that is thanks to the community. 2024 was the year users took things to a new level, especially with the custom strategy setups shared by community developers. If you’ve been around for a while, you know the power of a good setup, and it’s good to see people sharing what works and fine-tuning things together. It’s made it easier than ever for new and experienced users alike to set up Gunbot as a real, steady earner.</p>
<p>We’ve seen so many creative approaches, strategies, and even new tools come out this year. The bigger story is what you have made possible by sharing ideas, strategy setups, and feedback. A lot of users are getting results they had not reached before.</p>
<p>On our end, we’ve tried to make Gunbot as user-friendly as possible without losing any of the power our veteran users love. We’ve added tools like <strong>Gunbot Monitor</strong> to streamline multi-instance management, and the shared strategy bundles from the community have cut down the time it takes to go from setup to success. If you're brand new or a longtime user who loves experimenting, 2024 was a year where it felt like everyone leveled up.</p>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="black-friday-deals-archived">Black Friday Deals (Archived)<a href="https://www.gunbot.com/blog/black-friday-2024-gunbot-deals/#black-friday-deals-archived" class="hash-link" aria-label="Direct link to Black Friday Deals (Archived)" title="Direct link to Black Friday Deals (Archived)" translate="no">​</a></h2>
<p>The 2024 Black Friday offers were time-limited and are no longer available. Head over to <a href="https://www.gunbot.com/plans/" target="_blank" rel="noopener" class="">our current plans page</a> to see what fits best for you today.</p>
<p>Thank you all for being here, sharing ideas, and keeping the momentum going. We can’t wait to see what the community does next year. Here’s to an epic end to 2024 and an even bigger 2025.</p>]]></content>
        <author>
            <name>@boekenbox</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Boost Your Gunbot Setup with exoTrader: A Custom Strategy from the Community]]></title>
        <id>https://www.gunbot.com/blog/exotrader-custom-strategy/</id>
        <link href="https://www.gunbot.com/blog/exotrader-custom-strategy/"/>
        <updated>2024-10-31T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Learn about the exoTrader strategy for Gunbot, built by a community member to optimize crypto trading with advanced indicators and adaptive strategies.]]></summary>
        <content type="html"><![CDATA[<figure class="blog-article-cover"><span class="blog-image-frame"><img src="https://www.gunbot.com/blog/img/exotrader-header.png" alt="Boost Your Gunbot Setup with exoTrader: A Custom Strategy from the Community" loading="eager" fetchpriority="high" decoding="async"></span><figcaption class="sr-only">Boost Your Gunbot Setup with exoTrader: A Custom Strategy from the Community</figcaption></figure>
<p>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 <strong>exoTrader</strong> come in handy. Developed by <strong>@flightcommander</strong>, a fellow Gunbot enthusiast, exoTrader aims to smooth out the ups and downs of crypto trading with a smart, adaptive approach.</p>
<p>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.</p>
<div class="callout callout--info theme-admonition theme-admonition-info alert alert--info"><span class="callout__icon"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4" fill="none"></path><path d="M12 8h.01" fill="none"></path></svg></span><div class="callout__body"><p class="callout__title">info</p><div class="callout__content"><p>This strategy is built by a Gunbot community member. It's an excellent showcase of how far you can take custom strategies in Gunbot.</p></div></div></div>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="what-is-exotrader">What Is exoTrader?<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#what-is-exotrader" class="hash-link" aria-label="Direct link to What Is exoTrader?" title="Direct link to What Is exoTrader?" translate="no">​</a></h2>
<p>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 <a href="https://www.gunbot.com/features/custom-strategies/" target="_blank" rel="noopener" class="">custom strategy capabilities</a>.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="a-community-effort">A Community Effort<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#a-community-effort" class="hash-link" aria-label="Direct link to A Community Effort" title="Direct link to A Community Effort" translate="no">​</a></h3>
<p>exoTrader is a community project created by <strong>@flightcommander</strong> and shared with Gunbot users. It reflects how Gunbot traders share tools, test ideas, and help each other avoid avoidable mistakes.</p>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="how-exotrader-works">How exoTrader Works<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#how-exotrader-works" class="hash-link" aria-label="Direct link to How exoTrader Works" title="Direct link to How exoTrader Works" translate="no">​</a></h2>
<p>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:</p>
<ul>
<li class="">
<p><strong>Multi-Indicator Analysis</strong>: 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.</p>
</li>
<li class="">
<p><strong>Adaptive Behavior</strong>: This strategy isn't static. It evolves as the market shifts, essential for crypto, where things change faster than you can hit refresh.</p>
</li>
<li class="">
<p><strong>Risk Management Tools</strong>: 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.</p>
</li>
<li class="">
<p><strong>User-Friendly Interface</strong>: 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.</p>
</li>
<li class="">
<p><strong>Performance Metrics</strong>: Trading is all about results. exoTrader provides insights into its performance, so you can make tweaks and optimize over time.</p>
</li>
</ul>
<p><img decoding="async" loading="lazy" alt="Gunbot exoTrader custom strategy chart showing automated entries across highlighted market phases" src="https://www.gunbot.com/blog/assets/images/gunbot-exotrader-custom-strategy-trading-chart-85fd6ed250c4e542e75466b6b9880e5a.png" width="1000" height="743" class="img_SS3x"></p>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="the-technical-tools-behind-exotrader">The Technical Tools Behind exoTrader<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#the-technical-tools-behind-exotrader" class="hash-link" aria-label="Direct link to The Technical Tools Behind exoTrader" title="Direct link to The Technical Tools Behind exoTrader" translate="no">​</a></h2>
<p>exoTrader uses a mix of indicators to inform its decisions. Here's a quick look at each:</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="wave-trend-wt">Wave Trend (WT)<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#wave-trend-wt" class="hash-link" aria-label="Direct link to Wave Trend (WT)" title="Direct link to Wave Trend (WT)" translate="no">​</a></h3>
<p>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.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="relative-strength-index-rsi">Relative Strength Index (RSI)<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#relative-strength-index-rsi" class="hash-link" aria-label="Direct link to Relative Strength Index (RSI)" title="Direct link to Relative Strength Index (RSI)" translate="no">​</a></h3>
<p>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.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="bollinger-bands-bb">Bollinger Bands (BB)<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#bollinger-bands-bb" class="hash-link" aria-label="Direct link to Bollinger Bands (BB)" title="Direct link to Bollinger Bands (BB)" translate="no">​</a></h3>
<p>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.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="heikin-ashi-candles">Heikin-Ashi Candles<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#heikin-ashi-candles" class="hash-link" aria-label="Direct link to Heikin-Ashi Candles" title="Direct link to Heikin-Ashi Candles" translate="no">​</a></h3>
<p>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.</p>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="how-exotrader-executes-trades">How exoTrader Executes Trades<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#how-exotrader-executes-trades" class="hash-link" aria-label="Direct link to How exoTrader Executes Trades" title="Direct link to How exoTrader Executes Trades" translate="no">​</a></h2>
<p>With indicators analyzed, here's how exoTrader moves from insights to action:</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="order-placement">Order Placement<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#order-placement" class="hash-link" aria-label="Direct link to Order Placement" title="Direct link to Order Placement" translate="no">​</a></h3>
<p>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.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="trade-management">Trade Management<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#trade-management" class="hash-link" aria-label="Direct link to Trade Management" title="Direct link to Trade Management" translate="no">​</a></h3>
<p>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.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="risk-management">Risk Management<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#risk-management" class="hash-link" aria-label="Direct link to Risk Management" title="Direct link to Risk Management" translate="no">​</a></h3>
<p>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.</p>
<p><img decoding="async" loading="lazy" alt="Gunbot exoTrader strategy interface with trading chart, performance metrics, and risk-management controls" src="https://www.gunbot.com/blog/assets/images/gunbot-exotrader-risk-management-dashboard-a8510af6d382d2571638f2bc21a25fd9.png" width="1000" height="680" class="img_SS3x"></p>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="why-give-exotrader-a-shot">Why Give exoTrader a Shot?<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#why-give-exotrader-a-shot" class="hash-link" aria-label="Direct link to Why Give exoTrader a Shot?" title="Direct link to Why Give exoTrader a Shot?" translate="no">​</a></h2>
<p>Here are some reasons why exoTrader might be worth your attention:</p>
<ul>
<li class="">
<p><strong>Balanced Market Analysis</strong>: By using multiple indicators, exoTrader provides a well-rounded view of the market, giving it an edge over simpler strategies.</p>
</li>
<li class="">
<p><strong>Adapts to Market Changes</strong>: Crypto markets can swing dramatically, and exoTrader’s adaptive approach helps keep it effective no matter what happens.</p>
</li>
<li class="">
<p><strong>Risk Management Features</strong>: With built-in tools to protect your capital, exoTrader prioritizes long-term success, not just short-term wins.</p>
</li>
<li class="">
<p><strong>Community Support</strong>: 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.</p>
</li>
</ul>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="getting-started-with-exotrader">Getting Started with exoTrader<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#getting-started-with-exotrader" class="hash-link" aria-label="Direct link to Getting Started with exoTrader" title="Direct link to Getting Started with exoTrader" translate="no">​</a></h2>
<p>Ready to try exoTrader? Here's how to set it up:</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="1-install-and-set-up-gunbot">1. Install and Set Up Gunbot<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#1-install-and-set-up-gunbot" class="hash-link" aria-label="Direct link to 1. Install and Set Up Gunbot" title="Direct link to 1. Install and Set Up Gunbot" translate="no">​</a></h3>
<p>Make sure Gunbot is installed and connected to your preferred exchange. If needed, update to the latest version for full compatibility.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="2-get-an-exotrader-license">2. Get an exoTrader License<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#2-get-an-exotrader-license" class="hash-link" aria-label="Direct link to 2. Get an exoTrader License" title="Direct link to 2. Get an exoTrader License" translate="no">​</a></h3>
<p>Find exoTrader, and a live demo, on the Gunbot Dev Community: <a href="https://www.gunbot.com/devcommunity/quantaexotrader/" target="_blank" rel="noopener" class="">https://www.gunbot.com/devcommunity/quantaexotrader/</a></p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="3-select-exotrader-as-your-strategy">3. Select exoTrader as Your Strategy<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#3-select-exotrader-as-your-strategy" class="hash-link" aria-label="Direct link to 3. Select exoTrader as Your Strategy" title="Direct link to 3. Select exoTrader as Your Strategy" translate="no">​</a></h3>
<p>When configuring a trading pair in Gunbot, choose the exoTrader strategy from the list.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="4-adjust-settings">4. Adjust Settings<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#4-adjust-settings" class="hash-link" aria-label="Direct link to 4. Adjust Settings" title="Direct link to 4. Adjust Settings" translate="no">​</a></h3>
<p>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.</p>
<h3 class="anchor anchorTargetStickyNavbar_tleR" id="5-start-trading">5. Start Trading<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#5-start-trading" class="hash-link" aria-label="Direct link to 5. Start Trading" title="Direct link to 5. Start Trading" translate="no">​</a></h3>
<p>With everything set, let Gunbot and exoTrader do the work. Keep an eye on early performance, and adjust as necessary.</p>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_tleR" id="final-thoughts">Final Thoughts<a href="https://www.gunbot.com/blog/exotrader-custom-strategy/#final-thoughts" class="hash-link" aria-label="Direct link to Final Thoughts" title="Direct link to Final Thoughts" translate="no">​</a></h2>
<p>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.</p>
<p>Interested in seeing if exoTrader can make a difference for you? Check it out and join the conversation with other Gunbot users on Telegram.</p>]]></content>
        <author>
            <name>@boekenbox</name>
        </author>
    </entry>
</feed>