<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged backtesting</title>
<link>https://coderlegion.com/tag/backtesting</link>
<description>Powered by Question2Answer</description>
<item>
<title>We pre-registered a Polymarket insider score. It passed, and we still didn't ship it</title>
<link>https://coderlegion.com/32057/we-pre-registered-a-polymarket-insider-score-it-passed-and-we-still-didnt-ship-it</link>
<description>&lt;p&gt;Polymarket insider trading makes headlines every few weeks, so an insider score sounds like an obvious feature for a Polymarket analytics site. We built one, called it the Early score, wrote the rules down before running it, and tested it on 355,732 wallets. It passed its own test, and we did not release it. The full results are &lt;a rel=&quot;nofollow&quot; href=&quot;https://orcalayer.com/blog/polymarket-insider-score-entry-price&quot;&gt;on our blog&lt;/a&gt; and the aggregated data and a script are &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/orcalayer/polymarket-insider-score-backtest&quot;&gt;on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This post is about the method: how to set up a wallet score so the test can actually fail, the traps we hit before the test, and the check that changed our mind.&lt;/p&gt;
&lt;h3 id=&quot;1-write-the-rules-down-first&quot;&gt;1. Write the rules down first&lt;/h3&gt;
&lt;p&gt;Before computing a single score, we put the whole method in a pre-registration file: what an entry is, how the move is measured, the shrinkage constant, which markets are out, which periods are compared, and what counts as a pass. Every later change went in as a dated line with the reason.&lt;/p&gt;
&lt;p&gt;The pass rule was simple: score wallets on October 2025 to March 2026 (period A), and the top 10% must still be positive on April to September 2026 (period B), also without the 5 largest events.&lt;/p&gt;
&lt;p&gt;Without this file it is very easy to keep adjusting until something works. With it, every change you make has to be justified in writing before you see the outcome.&lt;/p&gt;
&lt;h3 id=&quot;2-the-score&quot;&gt;2. The score&lt;/h3&gt;
&lt;p&gt;If a wallet knows something first, the price should move its way after it trades. So for each entry we measured the price of the side the wallet holds 24 hours later, minus the price it paid, in cents. A wallet's score is the size-weighted average, pulled toward zero for wallets with few entries:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;def shrunk_mean(moves, weights, k=5.0):
    &quot;&quot;&quot;Size-weighted mean move, shrunk toward 0.
    weights are entry sizes capped at $10,000, so n_eff counts 'effective entries'.&quot;&quot;&quot;
    total_w = sum(weights)
    if total_w == 0:
        return 0.0
    raw = sum(m * w for m, w in zip(moves, weights)) / total_w
    n_eff = total_w ** 2 / sum(w * w for w in weights)
    return raw * n_eff / (n_eff + k)   # 5 effective entries keep half the raw mean
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Wallets within 1 cent of zero (one price tick) get a neutral 50; the rest become a percentile. Sports and short Up or Down markets are out: a day after a match the price is the result, so the score would just rank sports bettors.&lt;/p&gt;
&lt;h3 id=&quot;3-trap-wallets-trading-with-each-other-at-made-up-prices&quot;&gt;3. Trap: wallets trading with each other at made-up prices&lt;/h3&gt;
&lt;p&gt;On one test day the top of our list was a group of related wallets passing the same shares back and forth in finished tennis matches. One bought at 0.02 and sold to a partner at 0.96 four minutes later. Read trade by trade, that is a +94 cent entry.&lt;/p&gt;
&lt;p&gt;The fix was to define an entry as a wallet's &lt;strong&gt;net position change in one market over one UTC day&lt;/strong&gt;, not as a single trade:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;from collections import defaultdict

def daily_entries(trades):
    &quot;&quot;&quot;Simplified. trades: dicts with wallet, market, day, side ('YES'/'NO'), shares (+buy/-sell), price.
    Selling NO counts as buying YES. A same-day round trip nets to zero.&quot;&quot;&quot;
    net = defaultdict(lambda: {&quot;yes&quot;: 0.0, &quot;no&quot;: 0.0, &quot;cost_yes&quot;: 0.0, &quot;cost_no&quot;: 0.0})
    for t in trades:
        k = (t[&quot;wallet&quot;], t[&quot;market&quot;], t[&quot;day&quot;])
        s = &quot;yes&quot; if t[&quot;side&quot;] == &quot;YES&quot; else &quot;no&quot;
        net[k][s] += t[&quot;shares&quot;]
        net[k][&quot;cost_&quot; + s] += t[&quot;shares&quot;] * t[&quot;price&quot;]
    for k, v in net.items():
        delta = v[&quot;yes&quot;] - v[&quot;no&quot;]
        if delta == 0:
            continue
        side = &quot;yes&quot; if abs(v[&quot;yes&quot;]) &amp;gt;= abs(v[&quot;no&quot;]) else &quot;no&quot;
        avg_price = v[&quot;cost_&quot; + side] / v[side] if v[side] else None
        yield k, delta, avg_price
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you rank Polymarket wallets by anything trade-based, expect these pairs near the top of your list.&lt;/p&gt;
&lt;h3 id=&quot;4-trap-a-thin-price-after-&quot;&gt;4. Trap: a thin &quot;price after&quot;&lt;/h3&gt;
&lt;p&gt;In one market a handful of trades of $1.50 to $15 at 0.15 set the price 24 hours later, though the market settled at 1. One tiny trade can fake a move. We now require at least $100 of &lt;strong&gt;other wallets'&lt;/strong&gt; trades in that hour before using a price, and fall back to the final price only if the market has closed.&lt;/p&gt;
&lt;h3 id=&quot;5-the-test-passed&quot;&gt;5. The test passed&lt;/h3&gt;
&lt;p&gt;Period A groups, measured on period B, with t-statistics clustered by event (many entries in one event are not independent):&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Group from period A &lt;/th&gt;&lt;th&gt;24 h move in B, cents per entry &lt;/th&gt;&lt;th&gt;t&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Top 10% &lt;/td&gt;&lt;td&gt;+0.83 &lt;/td&gt;&lt;td&gt;7.9&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Bottom 10% &lt;/td&gt;&lt;td&gt;-0.76 &lt;/td&gt;&lt;td&gt;-4.7&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;All wallets &lt;/td&gt;&lt;td&gt;-0.01 &lt;/td&gt;&lt;td&gt;-0.2&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;It held without the 5 largest events, without weather markets, and for every shrinkage constant from 0 to 100. By the rule we wrote, a pass.&lt;/p&gt;
&lt;h3 id=&quot;6-the-check-that-changed-our-mind-look-at-the-mechanism&quot;&gt;6. The check that changed our mind: look at the mechanism&lt;/h3&gt;
&lt;p&gt;A pass tells you the score finds &lt;em&gt;something&lt;/em&gt; that repeats. It does not tell you what. An insider and a wallet that simply buys cheaper both show a positive move, but with a different shape:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;news spreading: the price keeps moving for hours;&lt;/li&gt;
&lt;li&gt;a cheap fill: the gap is there at once and stops growing.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So we split each wallet's move into the first hour and the drift from 1 to 24 hours, and asked which part repeats between the two periods:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;from statistics import correlation  # Python 3.10+

def ranks(xs):
    order = sorted(range(len(xs)), key=xs.__getitem__)
    r = [0] * len(xs)
    for i, j in enumerate(order):
        r[j] = i
    return r

def spearman(a, b):
    return correlation(ranks(a), ranks(b))

# per wallet, period A vs period B
rho_first_hour = spearman(first_hour_A, first_hour_B)   # 0.138
rho_drift      = spearman(drift_A, drift_B)             # 0.050
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The top 10% were already +0.75 cents ahead after one hour and +0.83 after 24. The first-hour part repeats; the drift, the part an insider score exists to catch, barely does. The score was ranking wallets by fill quality.&lt;/p&gt;
&lt;p&gt;This check was not in the pre-registration, and we label it exploratory everywhere. But it is the one that decided whether a label like &quot;insider&quot; would tell users the truth. It would not, so the score is not on the site, in the API or in MCP.&lt;/p&gt;
&lt;h3 id=&quot;7-money-not-moves&quot;&gt;7. Money, not moves&lt;/h3&gt;
&lt;p&gt;A 24-hour move is not profit, so we also held every entry in a resolved market to settlement and subtracted the fee each wallet actually paid on-chain. The top 10% made +1.17 cents per entry after fees (t 2.9), on both mostly taker and mostly maker entries. One detail that matters if you repeat this: compare groups with &lt;strong&gt;all wallets&lt;/strong&gt;, not with zero. On longer-dated markets every group drifts up, so zero is the wrong baseline.&lt;/p&gt;
&lt;h3 id=&quot;reproduce-it&quot;&gt;Reproduce it&lt;/h3&gt;
&lt;p&gt;The repo has the aggregated tables behind every number and &lt;code&gt;scripts/early_score_check.py&lt;/code&gt; (standard library only), which rebuilds entries, scores and the period test from the OrcaLayer API:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;export ORCALAYER_API_KEY=sk_orca_...        # never commit it
python3 scripts/early_score_check.py --csv entries.csv        # first 1,000 markets of data/markets.csv
python3 scripts/early_score_check.py --load-csv entries.csv   # rerun the analysis, no API calls
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The API's trade history starts on May 1, 2026, so the script scores on May and June and checks on July to September, on a fixed list of 1,000 markets. The script writes wallets only as salted hashes, and the repo publishes groups only, no addresses.&lt;/p&gt;
&lt;h3 id=&quot;what-this-does-not-show&quot;&gt;What this does not show&lt;/h3&gt;
&lt;p&gt;Sports, individual wallets, and copying these wallets (a copy trades after them and does not get their price). On the shorter API check, the groups did not separate when held to settlement, so treat the money part as the weakest result.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Originally published on &lt;a rel=&quot;nofollow&quot; href=&quot;https://orcalayer.com/blog/polymarket-insider-score-entry-price&quot;&gt;orcalayer.com&lt;/a&gt;. OrcaLayer is an independent Polymarket analytics provider, not affiliated with Polymarket.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/32057/we-pre-registered-a-polymarket-insider-score-it-passed-and-we-still-didnt-ship-it</guid>
<pubDate>Thu, 22 Oct 2026 09:55:28 +0000</pubDate>
</item>
<item>
<title>Backtesting live football on Polymarket: 6 traps in a recorded order book</title>
<link>https://coderlegion.com/31052/backtesting-live-football-on-polymarket-6-traps-in-a-recorded-order-book</link>
<description>&lt;p&gt;We recorded the order book of every Polymarket football (soccer) market for three weeks and tested two in-play ideas: buying a team right after a late price jump at a level score, and protecting goal bets with a stop-loss. Neither paid. Buying the jump 2 seconds later lost $2.85 per $10 over 837 jumps (t -7.9), and every one of 28 stop settings did worse than holding on the replay. The full results are &lt;a rel=&quot;nofollow&quot; href=&quot;https://orcalayer.com/blog/polymarket-live-football-late-goals-stop-loss&quot;&gt;on our blog&lt;/a&gt; and the data is &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/orcalayer/polymarket-football-late-goal-stop-loss-backtest&quot;&gt;on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This post is about the data side: six traps we hit while building the test. Most of them will bite anyone who backtests in-play markets on Polymarket.&lt;/p&gt;
&lt;h3 id=&quot;1-you-have-to-record-the-book-yourself-then-check-the-recording&quot;&gt;1. You have to record the book yourself, then check the recording&lt;/h3&gt;
&lt;p&gt;Public Polymarket APIs give you trades and the current book, not the book as it was a second ago. For an in-play test you need the best bid and ask around every event, so we recorded the CLOB WebSocket market channel (&lt;code&gt;book&lt;/code&gt;, &lt;code&gt;price_change&lt;/code&gt;, &lt;code&gt;last_trade_price&lt;/code&gt;) with exchange timestamps.&lt;/p&gt;
&lt;p&gt;Before using it, check it against on-chain trades. Ours had 99.9% of on-chain trades, and 97.6% of them happened at the best price the recording showed at that moment. If your numbers are much lower, your replay will invent fills.&lt;/p&gt;
&lt;h3 id=&quot;2-events-arrive-out-of-order&quot;&gt;2. Events arrive out of order&lt;/h3&gt;
&lt;p&gt;The exchange can send the &lt;code&gt;price_change&lt;/code&gt; for a level that a trade just ate before the &lt;code&gt;last_trade_price&lt;/code&gt; of that same trade. Read events in arrival order and fills look about 25% worse than they were. Put each trade ahead of the book change it caused before you measure anything.&lt;/p&gt;
&lt;h3 id=&quot;3-the-mid-is-not-a-price-you-can-trade&quot;&gt;3. The mid is not a price you can trade&lt;/h3&gt;
&lt;p&gt;Our first detector watched the mid-price: if a team's mid jumps by 0.25 or more late in a level match, call it a goal. Many of those &quot;goals&quot; were sellers pulling their quotes. The mid doubles, the bid stays where it was, and the spread opens up.&lt;/p&gt;
&lt;p&gt;One example from the data: the mid went from 0.24 to 0.505 in seconds, but the ask was 0.78 and the bid about 0.23. A bot buying 2 seconds later paid 0.81. Ten seconds after the jump the ask was back at 0.25, and the match ended in a draw.&lt;/p&gt;
&lt;p&gt;Store the ask and the spread, not only the mid. The implied bid is easy to get back if you only kept mid and ask:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;def spread_at_jump(mid: float, ask: float) -&amp;gt; float:
    bid = 2 * mid - ask          # implied bid
    return round(ask - bid, 2)   # e.g. mid 0.505, ask 0.78 -&amp;gt; 0.55
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In our data 627 of 837 late jumps had a spread of 20 cents or more, and the jumping side won only 36% of those.&lt;/p&gt;
&lt;h3 id=&quot;4-the-level-score-can-be-fake-too&quot;&gt;4. The &quot;level score&quot; can be fake too&lt;/h3&gt;
&lt;p&gt;Our rule also needed the draw to be the favorite 30 seconds before the jump. That condition is read from mids as well, so pulled quotes can fake it in a match one team already leads. When all three books of a 1X2 match are two-sided, the three mids add up to about 1.00. Check that before you trust the state:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;def book_looks_clean(home_mid: float, draw_mid: float, away_mid: float) -&amp;gt; bool:
    return 0.95 &amp;lt;= home_mid + draw_mid + away_mid &amp;lt;= 1.05
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In 51 of the 85 jumps that had a tight spread, the three mids before the jump added up to more than 1.10. One of them was a team that had led for 20 minutes: its bid disappeared for a moment, the score looked level, and the bid coming back looked like a late goal.&lt;/p&gt;
&lt;h3 id=&quot;5-daily-batch-files-overlap&quot;&gt;5. Daily batch files overlap&lt;/h3&gt;
&lt;p&gt;We ran the scan one day at a time, and each day file also covered the first hours after midnight UTC. Jumps after midnight landed in two files: 48 duplicates out of 885 raw rows. They did not change the conclusion, but they would have inflated every count and t-statistic. If you split a time series by day, check the joins.&lt;/p&gt;
&lt;h3 id=&quot;6-the-fastest-entry-is-not-reachable&quot;&gt;6. The fastest entry is not reachable&lt;/h3&gt;
&lt;p&gt;Football markets have &lt;code&gt;secondsDelay: 1&lt;/code&gt; in the Gamma API: a taker order waits a second before it can match, and you cannot cancel it during that time. So a result &quot;at +0 s&quot; is not a strategy, it is a plot point. In our test the earliest entries lost the most (-$4.21 per $10 at +0 s, -$2.85 at +2 s), because the first seconds after a jump are when the price is most wrong in the direction you are buying.&lt;/p&gt;
&lt;p&gt;The same delay hurts stops. Polymarket has no stop orders, so a stop is a bot watching trades and then market-selling after the delay, paying the taker fee a second time. In live football prices swing several cents within minutes, and a 3-cent stop fired on 86 to 96% of our replayed bets.&lt;/p&gt;
&lt;h3 id=&quot;reproduce-it-1&quot;&gt;Reproduce it&lt;/h3&gt;
&lt;p&gt;The repo has &lt;code&gt;data/late_goal_jumps.csv&lt;/code&gt; (one row per jump, with the asks 0 to 60 seconds after it and the result) and a standard-library script that recomputes every late-goal number:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;python3 scripts/summarize_late_goals.py data/late_goal_jumps.csv
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;METHOD.md&lt;/code&gt; describes the recorder, the detection rule and each trap above in more detail.&lt;/p&gt;
&lt;h3 id=&quot;what-this-does-not-show-1&quot;&gt;What this does not show&lt;/h3&gt;
&lt;p&gt;About three weeks of football, mostly club leagues. Pre-match markets, other sports and stops on strategies whose entries already make money were not tested. Bets in the same match are not independent, so read t values near 2 with care.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Originally published on &lt;a rel=&quot;nofollow&quot; href=&quot;https://orcalayer.com/blog/polymarket-live-football-late-goals-stop-loss&quot;&gt;orcalayer.com&lt;/a&gt;. OrcaLayer is an independent Polymarket analytics provider, not affiliated with Polymarket.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/31052/backtesting-live-football-on-polymarket-6-traps-in-a-recorded-order-book</guid>
<pubDate>Wed, 14 Oct 2026 11:44:45 +0000</pubDate>
</item>
<item>
<title>Backtesting a Polymarket copy trading bot without fooling yourself</title>
<link>https://coderlegion.com/30590/backtesting-a-polymarket-copy-trading-bot-without-fooling-yourself</link>
<description>&lt;p&gt;Copy trading is the most common bot idea on Polymarket: find the wallets that win and buy what they buy. We tested it on five sports (MLB, NFL, college football, League of Legends and Valorant) and it did not survive. The full results are &lt;a rel=&quot;nofollow&quot; href=&quot;https://orcalayer.com/blog/polymarket-copy-trading-whales-backtest&quot;&gt;on our blog&lt;/a&gt; and the data and script are &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/orcalayer/polymarket-copy-trading-whales-backtest&quot;&gt;on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This post is about the backtest itself: how to set it up so it can tell you &quot;no&quot;, and the one mistake that makes almost every copy bot backtest look better than it would be live.&lt;/p&gt;
&lt;h3 id=&quot;1-define-a-copy-you-could-actually-execute&quot;&gt;1. Define a copy you could actually execute&lt;/h3&gt;
&lt;p&gt;A &quot;copy&quot; in our test is a wallet's first buy of at least $20 in a market, at a price between 0.30 and 0.85. We buy the same outcome for $10 at the wallet's price &lt;strong&gt;plus 1 cent&lt;/strong&gt;, pay the sports taker fee and hold to resolution. Roughly, in code:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;def copy_result(price: float, won: bool, stake: float = 10.0, slip: float = 0.01) -&amp;gt; float:
    p = price + slip                      # you never get the whale's exact price
    shares = stake / p
    fee = shares * 0.05 * p * (1 - p)     # Polymarket sports taker fee
    payout = shares if won else 0.0
    return payout - stake - fee
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;One cent is generous. In fast in-play markets the price moves much further before a copy fills. We also reran MLB at +3 cents: every result went negative, including the top 10.&lt;/p&gt;
&lt;h3 id=&quot;2-pick-on-one-period-measure-on-the-next&quot;&gt;2. Pick on one period, measure on the next&lt;/h3&gt;
&lt;p&gt;The rule: rank wallets by their copy results over the two months before the test month, then copy only in the test month. Nothing from the test month touches the selection. We used three rules fixed before the run:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ALL10&lt;/code&gt;: every wallet with at least 10 copies (the &quot;average whale&quot;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;POS&lt;/code&gt;: at least 20 copies, mean above zero, t-statistic of 2 or more&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TOP10&lt;/code&gt;: the 10 best by t-statistic&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;MLB, top 10, per $10 copied:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Test month &lt;/th&gt;&lt;th&gt;While picked &lt;/th&gt;&lt;th&gt;Month after&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;July 2026 &lt;/td&gt;&lt;td&gt;+$3.65 &lt;/td&gt;&lt;td&gt;+$0.16&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;August 2026 &lt;/td&gt;&lt;td&gt;+$3.06 &lt;/td&gt;&lt;td&gt;-$0.04&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;September 2026 &lt;/td&gt;&lt;td&gt;+$2.72 &lt;/td&gt;&lt;td&gt;-$0.47&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Oct 1-4 2026 &lt;/td&gt;&lt;td&gt;+$3.78 &lt;/td&gt;&lt;td&gt;-$2.23 (n 7)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The same rule that showed +$3 in the pick window showed about zero the month after.&lt;/p&gt;
&lt;h3 id=&quot;3-check-whether-rank-carries-over-at-all&quot;&gt;3. Check whether rank carries over at all&lt;/h3&gt;
&lt;p&gt;Before tuning thresholds, check if past performance predicts future performance for individual wallets. For MLB wallets with at least 10 copies in both periods, the Spearman correlation between the pick months and the next month was -0.01, +0.15, +0.08 and -0.03. NFL was between -0.09 and +0.03.&lt;/p&gt;
&lt;p&gt;With correlations like that, picking &quot;the best&quot; is picking the luckiest. With thousands of active wallets, dozens will have a great two months by chance.&lt;/p&gt;
&lt;h3 id=&quot;4-look-at-the-baseline-before-the-winners&quot;&gt;4. Look at the baseline before the winners&lt;/h3&gt;
&lt;p&gt;The average MLB whale, copied one cent worse than its own price, lost 31 to 63 cents per $10 in every test month. If the baseline is negative, a selection rule has to beat a loss before it makes anything. Check &lt;code&gt;ALL10&lt;/code&gt; first.&lt;/p&gt;
&lt;h3 id=&quot;5-the-trap-wallet-labels-computed-today&quot;&gt;5. The trap: wallet labels computed today&lt;/h3&gt;
&lt;p&gt;This one is easy to miss. Analytics sites (ours included) label wallets: &quot;smart money&quot;, &quot;50+ resolved markets&quot;, win rate, profit factor. Those labels are computed &lt;strong&gt;today, on each wallet's full history&lt;/strong&gt;, including the months you are about to backtest.&lt;/p&gt;
&lt;p&gt;If you pick wallets with today's labels and backtest them on last summer, the selection already knows who survived. Wallets that blew up are not labeled &quot;smart&quot;, so the backtest never copies them. It will always look better than it would have live.&lt;/p&gt;
&lt;p&gt;We hit a mild version of this ourselves: one filter in our profile screen used each wallet's share of activity in the sport on its full history. We disclosed it in the methodology. It most likely flatters the pools, and they still showed no edge.&lt;/p&gt;
&lt;p&gt;Rule of thumb: every feature used to pick a wallet must be computable from data strictly before the pick date.&lt;/p&gt;
&lt;h3 id=&quot;6-make-it-reproducible&quot;&gt;6. Make it reproducible&lt;/h3&gt;
&lt;p&gt;The repo has &lt;code&gt;scripts/copy_backtest.py&lt;/code&gt; (Python 3.9+, standard library only) that runs the same walk-forward on the OrcaLayer API for any league:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;export ORCALAYER_API_KEY=sk_orca_...        # never commit it
python3 scripts/copy_backtest.py --league mlb --start 2026-05-01 --end 2026-09-30 --max-markets 800
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To check that the API path and our internal database agree, we ran both on the same 800 MLB games: 161,094 copies in both, every wallet, price and result equal, total -$83,012.60 in both. The script output showed the same picture: top 10 from about +$3 per $10 to between -$1.29 and +$1.06 the month after.&lt;/p&gt;
&lt;p&gt;The script needs a Premium API key. If you just want to look at a wallet's record before copying it, the free &lt;a rel=&quot;nofollow&quot; href=&quot;https://orcalayer.com/docs/mcp&quot;&gt;OrcaLayer MCP server&lt;/a&gt; works from Claude without a key.&lt;/p&gt;
&lt;h3 id=&quot;what-this-does-not-show-2&quot;&gt;What this does not show&lt;/h3&gt;
&lt;p&gt;Five sports, and picking by past results only. Slower markets like politics, where informed money can stay ahead for days, and picking wallets by how they trade rather than how much they made, were not tested.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Originally published on &lt;a rel=&quot;nofollow&quot; href=&quot;https://orcalayer.com/blog/polymarket-copy-trading-whales-backtest&quot;&gt;orcalayer.com&lt;/a&gt;. OrcaLayer is an independent Polymarket analytics provider, not affiliated with Polymarket.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/30590/backtesting-a-polymarket-copy-trading-bot-without-fooling-yourself</guid>
<pubDate>Sat, 10 Oct 2026 13:28:30 +0000</pubDate>
</item>
<item>
<title>Building a Better Market Microstructure Analyzer: Backtests, Reproducibility, and Honest Limits</title>
<link>https://coderlegion.com/28703/building-better-market-microstructure-analyzer-backtests-reproducibility-honest-limits</link>
<description>&lt;p&gt;In my &lt;a rel=&quot;nofollow&quot; href=&quot;https://dev.to/aariiparekh3012/building-a-real-time-market-microstructure-analyzer-for-indian-equities-30j3&quot;&gt;first post&lt;/a&gt;, I introduced a project that processes five-level order-book snapshots and displays measures such as spread, order-flow imbalance (OFI), and VWAP.&lt;/p&gt;
&lt;p&gt;After publishing it, I wanted to make it more than a basic demo. Adding another indicator would have been easy to describe, but it would not have answered the question I had started asking about the project: &lt;strong&gt;how much can I trust its outputs?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I went back to the backtesting methods, the data generator, and the parts of the pipeline that connect one calculation to the next. I also made the project’s licence and limitations easier to find. Here is what changed and what I learned.&lt;/p&gt;
&lt;h3 id=&quot;a-backtest-needs-to-account-for-the-whole-trade&quot;&gt;A backtest needs to account for the whole trade&lt;/h3&gt;
&lt;p&gt;The project includes a directional backtester based on OFI. The initial version could produce a trade log and performance figures, but some of its accounting was too basic. In particular, transaction costs needed to be reconciled across entry and exit, and drawdown needed a meaningful starting capital value.&lt;/p&gt;
&lt;p&gt;I corrected those calculations so that trade-level profit and loss can be checked against the change in final equity. I also removed an annualised return statistic that did not make sense for a sequence of synthetic ticks and replaced it with an explicitly unannualised completed-trade measure.&lt;/p&gt;
&lt;p&gt;This may sound less exciting than adding a new strategy. It was more useful. If the accounting is inconsistent, a convincing-looking chart is not evidence of anything.&lt;/p&gt;
&lt;h3 id=&quot;testing-one-period-is-not-enough&quot;&gt;Testing one period is not enough&lt;/h3&gt;
&lt;p&gt;A backtest can look good because its parameters happen to suit the data used to choose them. To make that harder, I added a walk-forward evaluation workflow with chronological splits. Parameters are selected using earlier observations and assessed on later held-out observations. The workflow also checks what happens under harsher transaction costs and whether results are stable across folds.&lt;/p&gt;
&lt;p&gt;That is a better test of the &lt;strong&gt;evaluation method&lt;/strong&gt; than running one strategy over an entire dataset and reporting its best outcome. But there is an important boundary here: the project’s validated data workflow is still synthetic. Passing a walk-forward check on generated data does &lt;strong&gt;not&lt;/strong&gt; establish that OFI predicts returns in Indian equities or that a strategy would be profitable in a live market.&lt;/p&gt;
&lt;p&gt;I wanted the project to make that distinction clear. A backtester can be implemented and internally consistent without being a validated trading strategy.&lt;/p&gt;
&lt;h3 id=&quot;reproducing-the-same-experiment&quot;&gt;Reproducing the same experiment&lt;/h3&gt;
&lt;p&gt;Earlier, the synthetic feed used global randomness and wall-clock time. That made it difficult to investigate a changed result: had the code changed, or had the input simply changed?&lt;/p&gt;
&lt;p&gt;The generator now uses a local random-number generator, an explicit seed, a fixed clock when requested, and a defined tick count. Running the same configuration produces the same input records and analytics output. This lets me compare code changes against a stable example rather than a moving target.&lt;/p&gt;
&lt;p&gt;The repository also has automated tests for the analytics engine and connected workflows. Its &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/aariiparekh3012-collab/market-microstructure-analyzer/blob/main/docs/VALIDATION.md&quot;&gt;validation guide&lt;/a&gt; describes what those checks cover and, just as importantly, what they do not cover.&lt;/p&gt;
&lt;h3 id=&quot;fixing-the-stream-not-only-the-formulas&quot;&gt;Fixing the stream, not only the formulas&lt;/h3&gt;
&lt;p&gt;Some problems only appeared when components ran together. The analytics engine initially failed on its first snapshot because an anomaly-detector argument did not match its constructor. Internal code also disagreed about whether a snapshot’s time field was called &lt;code&gt;ts&lt;/code&gt; or &lt;code&gt;timestamp&lt;/code&gt;. Tick classification returned text labels where signed-volume calculations needed numerical values.&lt;/p&gt;
&lt;p&gt;I fixed these connections and added tests that exercise more than an isolated formula. I also changed the rolling OFI windows to use queues and running sums rather than scanning the retained history on each tick. Anomaly calculations similarly maintain rolling sums instead of repeatedly traversing their windows.&lt;/p&gt;
&lt;p&gt;The lesson for me was that “real-time” is not just about displaying a changing chart. The calculations need to remain manageable as more observations arrive, and the entire path from input to output needs to work.&lt;/p&gt;
&lt;h3 id=&quot;naming-results-accurately&quot;&gt;Naming results accurately&lt;/h3&gt;
&lt;p&gt;Reviewing the project also meant revisiting the labels on some outputs. A trade/quote variance diagnostic had been described as a classical Hasbrouck information-share estimate, although the project’s single-venue setup does not implement that method. It is now described as the diagnostic it actually calculates.&lt;/p&gt;
&lt;p&gt;Similarly, the execution replay had called a change in the last fill price “market impact.” Because the replay uses a static order book, it cannot show the causal effect an order would have on the market. The output now calls this &lt;em&gt;last-fill slippage&lt;/em&gt;, and the replay-VWAP comparison carries its look-ahead limitation.&lt;/p&gt;
&lt;p&gt;I would rather have a narrower, accurate description of a result than a more impressive label that the code cannot defend.&lt;/p&gt;
&lt;h3 id=&quot;what-remains-unfinished&quot;&gt;What remains unfinished&lt;/h3&gt;
&lt;p&gt;There is &lt;strong&gt;no live exchange feed&lt;/strong&gt; in the validated workflow. I do not currently have an Angel One account connected to the project, and the SmartAPI adapter in the repository remains a stub. The interactive demo replays simulated data; it does not show live NSE order books.&lt;/p&gt;
&lt;p&gt;Before making claims about live performance or a trading signal, I would need appropriate real data and further validation. Live ingestion would also require careful handling of reconnects, gaps, rate limits, and market sessions.&lt;/p&gt;
&lt;p&gt;I revisited the project’s licence as part of making the public repository clearer; it now displays its AGPL-3.0 terms alongside the code and documentation. The &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/aariiparekh3012-collab/market-microstructure-analyzer&quot;&gt;repository&lt;/a&gt; contains the current implementation, validation notes, and instructions for reproducing the synthetic-data workflow.&lt;/p&gt;
&lt;p&gt;The project is stronger now because I can explain &lt;strong&gt;what runs, what has been tested, and what I still cannot claim&lt;/strong&gt;. That is the standard I want to carry into the next stage of the work.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/28703/building-better-market-microstructure-analyzer-backtests-reproducibility-honest-limits</guid>
<pubDate>Sat, 26 Sep 2026 09:42:15 +0000</pubDate>
</item>
<item>
<title>AutoTradingKit</title>
<link>https://coderlegion.com/1852/autotradingkit</link>
<description>&lt;h2 id=&quot;atk---auto-trading-kit&quot;&gt;ATK - Auto Trading Kit&lt;/h2&gt;
&lt;hr&gt;
&lt;h3 id=&quot;introduction---elevate-your-trading-with-atk&quot;&gt;Introduction - Elevate Your Trading with ATK&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;ATK (Auto Trading Kit)&lt;/strong&gt; is a free, open-source platform engineered for &lt;strong&gt;traders and developers&lt;/strong&gt; seeking to automate, backtest, and optimize their trading strategies. Whether you are a seasoned trader or a coding enthusiast, ATK empowers you to design, test, and execute strategies across popular exchanges with real-time analytics and advanced tools.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; ATK is designed to &lt;strong&gt;reduce manual work, enhance strategy development, and enable efficient trade execution&lt;/strong&gt;. Built using Python and PySide6, ATK is cross-platform (Windows, MacOS, and Linux) and features an intuitive UI inspired by trading industry leaders.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h3 id=&quot;key-features-of-atk&quot;&gt;Key Features of ATK&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;&lt;strong&gt;Feature&lt;/strong&gt;                             &lt;/th&gt;&lt;th&gt;&lt;strong&gt;All Plan&lt;/strong&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Number of Charts                        &lt;/td&gt;&lt;td&gt;Unlimited (PC performance dependent)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Number of Indicators                     &lt;/td&gt;&lt;td&gt;Unlimited&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Alerts                                   &lt;/td&gt;&lt;td&gt;Under Development&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Historical Data                          &lt;/td&gt;&lt;td&gt;Unlimited&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Data Export                              &lt;/td&gt;&lt;td&gt;Under Development&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Customer Support                         &lt;/td&gt;&lt;td&gt;8/5&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Real-time Data                           &lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Auto Trade                               &lt;/td&gt;&lt;td&gt;Under Development (API &amp;amp; Secret key required)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Backtesting                              &lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Drawing Tools (Basic &amp;amp; Advanced)         &lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Multiple Tabs                            &lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Timeframe Support                        &lt;/td&gt;&lt;td&gt;Yes (1m to 1M)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Buy/Sell (Market, Limit, Trailing Stop)  &lt;/td&gt;&lt;td&gt;Under Development&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Crypto                                   &lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Forex                                    &lt;/td&gt;&lt;td&gt;Under Development&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Stock                                    &lt;/td&gt;&lt;td&gt;Under Development&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;img src=&quot;images/README/1739977622209.png&quot; alt=&quot;Chart Example&quot;&gt;&lt;br&gt;
&lt;img src=&quot;images/README/1739977750678.png&quot; alt=&quot;Indicator Example&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;how-to-get-started-with-atk&quot;&gt;How to Get Started with ATK&lt;/h3&gt;
&lt;h4 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Python 3.12&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Windows 10/11 (64-bit), MacOS, or Linux&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;installation-steps&quot;&gt;Installation Steps&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Clone the repository:&lt;/strong&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;git clone https://github.com/Khanhlinhdang/AutoTradingKit
cd AutoTradingKit
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Set up a virtual environment:&lt;/strong&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;python -m venv .venv
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Activate the virtual environment:&lt;/strong&gt;&lt;ul&gt;
&lt;li&gt;Windows:&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;.venv\Scripts\activate
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;MacOS/Linux:&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;source .venv/bin/activate
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Install dependencies:&lt;/strong&gt;&lt;ul&gt;
&lt;li&gt;Windows:&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;pip install -r requirements.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;MacOS/Linux:&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;pip install -r mac_linux_requirements.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Run ATK:&lt;/strong&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;python ATK.py
# or
python3 ATK.py
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;build-application&quot;&gt;Build Application&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Convert &lt;code&gt;.py&lt;/code&gt; to &lt;code&gt;.pyd/.so&lt;/code&gt; using Cython for performance.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;pyinstaller&lt;/code&gt; to build executable files for your OS.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;supported-indicators&quot;&gt;Supported Indicators&lt;/h3&gt;
&lt;p&gt;ATK integrates a wide range of indicators, sourced from &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/twopirllc/pandas-ta/tree/main&quot;&gt;pandas-ta&lt;/a&gt; and custom conversions from TradingView, MT4, and MT5.&lt;/p&gt;
&lt;h4 id=&quot;current-indicator-list&quot;&gt;Current Indicator List&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Aroon&lt;/li&gt;
&lt;li&gt;Average Directional Index (ADX)&lt;/li&gt;
&lt;li&gt;Average True Range (ATR)&lt;/li&gt;
&lt;li&gt;Bollinger Bands (BB)&lt;/li&gt;
&lt;li&gt;Commodity Channel Index (CCI)&lt;/li&gt;
&lt;li&gt;Donchian Channel (DC)&lt;/li&gt;
&lt;li&gt;Keltner Channel (KC)&lt;/li&gt;
&lt;li&gt;Moving Averages (ALMA, DEMA, EMA, HMA, KAMA, SMA, SMMA, T3, TEMA, VWMA, WMA, ZLEMA)&lt;/li&gt;
&lt;li&gt;MACD&lt;/li&gt;
&lt;li&gt;Rate of Change (ROC)&lt;/li&gt;
&lt;li&gt;RSI&lt;/li&gt;
&lt;li&gt;Schaff Trend Cycle (STC)&lt;/li&gt;
&lt;li&gt;Stochastic Oscillator &amp;amp; Stochastic RSI&lt;/li&gt;
&lt;li&gt;SuperTrend&lt;/li&gt;
&lt;li&gt;TRIX&lt;/li&gt;
&lt;li&gt;True Strength Index (TSI)&lt;/li&gt;
&lt;li&gt;Ultimate Oscillator (UO)&lt;/li&gt;
&lt;li&gt;Vortex Indicator (VTX)&lt;/li&gt;
&lt;li&gt;VWAP&lt;/li&gt;
&lt;li&gt;Smart Money Concept (SMC)&lt;/li&gt;
&lt;li&gt;UTBOT&lt;/li&gt;
&lt;li&gt;...and more!&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;upcoming-indicators&quot;&gt;Upcoming Indicators&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;TTM Squeeze, Standard Deviation, SFX TOR, Pivots High/Low, Parabolic SAR, OBV, SOBV, Mean Deviation, McGinley Dynamic, Mass Index, KST, KVO, Ichimoku, Force Index, DPO, IBS, EMV, Chaikin Oscillator, Chande Kroll Stop, Choppiness Index, Coppock Curve, Awesome Oscillator, Balance of Power, ADL, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;how-to-add-a-new-indicator-to-atk&quot;&gt;How to Add a New Indicator to ATK&lt;/h3&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;How-to Guide:&lt;/strong&gt;&lt;br&gt;
Adding a new indicator follows a standardized structure. For example, to create a new &quot;bop&quot; indicator, follow these steps:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Create the calculation module:&lt;/strong&gt;&lt;br&gt;
Add &lt;code&gt;bop.py&lt;/code&gt; in &lt;code&gt;atklip/controls/momentum&lt;/code&gt; referencing &lt;code&gt;pandas_ta&lt;/code&gt; calculations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Implement the chart component:&lt;/strong&gt;&lt;br&gt;
Add &lt;code&gt;bop.py&lt;/code&gt; in &lt;code&gt;atklip/graphics/chart_component/indicators/sub_indicators/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Register the model:&lt;/strong&gt;&lt;br&gt;
Update &lt;code&gt;atklip/controls/models.py&lt;/code&gt; with the new indicator class.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Update the indicator menu:&lt;/strong&gt;&lt;br&gt;
Add the indicator to &lt;code&gt;atklip/gui/top_bar/indicator/indicator_menu.py&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Register the IndicatorType:&lt;/strong&gt;&lt;br&gt;
If needed, update &lt;code&gt;atklip/controls/ma_type.py&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Add to sub panel:&lt;/strong&gt;&lt;br&gt;
Update &lt;code&gt;setup_indicator&lt;/code&gt; in &lt;code&gt;atklip/graphics/chart_component/sub_panel_indicator.py&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;FAQ:&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;How do I request a new indicator?&lt;/em&gt;&lt;br&gt;
Submit a &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/Khanhlinhdang/AutoTradingKit/issues&quot;&gt;GitHub Issue&lt;/a&gt; with your request.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h3 id=&quot;roadmap-2025&quot;&gt;Roadmap 2025&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Add more indicators (MT4, MT5, TradingView)&lt;/li&gt;
&lt;li&gt;Expand trading strategies&lt;/li&gt;
&lt;li&gt;Enable API/Secret integration with more exchanges (Binance, MEXC, ...)&lt;/li&gt;
&lt;li&gt;Enhance drawing tools and charting features&lt;/li&gt;
&lt;li&gt;Improve backtesting and replay&lt;/li&gt;
&lt;li&gt;Layout customization &amp;amp; theme settings&lt;/li&gt;
&lt;li&gt;Order/position management UI&lt;/li&gt;
&lt;li&gt;Secure login and account management&lt;/li&gt;
&lt;li&gt;Integrate AI-powered indicators and strategies&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;support-amp-community&quot;&gt;Support &amp;amp; Community&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Get help or request features:&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/Khanhlinhdang/AutoTradingKit/issues&quot;&gt;GitHub Issues&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Email:&lt;/strong&gt; &lt;em&gt;Emails are not allowed&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;YouTube:&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.youtube.com/@AutoTradingKit&quot;&gt;AutoTradingKit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Facebook:&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.facebook.com/che.linh.9096/&quot;&gt;Pham Cong Che&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Discord:&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://discord.gg/bRDF7KxyQR&quot;&gt;ATK Community&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Facebook Group:&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.facebook.com/groups/748831980507126&quot;&gt;ATK Facebook Group&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;support-atk-development&quot;&gt;Support ATK Development&lt;/h3&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;br&gt;
Maintaining and improving ATK requires resources. Your sponsorship helps us deliver new features, bug fixes, and better support for the community.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Ways to Sponsor:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/sponsors/Khanhlinhdang&quot;&gt;GitHub Sponsor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://opencollective.com/autotradingkit&quot;&gt;OpenCollective&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;amp;hosted_button_id=XTHUBP3TB5H7J&quot;&gt;Paypal Sponsor&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h3 id=&quot;author-amp-acknowledgement&quot;&gt;Author &amp;amp; Acknowledgement&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Pham Cong Che (BigD)&lt;/strong&gt;&lt;br&gt;
Trader, freelancer, and developer from Vietnam.  &lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;“Let’s build the future of algorithmic trading together!”&lt;/em&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h3 id=&quot;license&quot;&gt;License&lt;/h3&gt;
&lt;p&gt;ATK is released under the &lt;a rel=&quot;nofollow&quot; href=&quot;LICENSE&quot;&gt;MIT License&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;references&quot;&gt;References&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/twopirllc/pandas-ta&quot;&gt;pandas-ta Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.tradingview.com/&quot;&gt;TradingView&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.metatrader4.com/&quot;&gt;MT4/MT5 Official&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.python.org/&quot;&gt;Python Official&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;tags&quot;&gt;Tags&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;Python&lt;/code&gt; &lt;code&gt;Trading&lt;/code&gt; &lt;code&gt;Algorithmic Trading&lt;/code&gt; &lt;code&gt;Backtesting&lt;/code&gt; &lt;code&gt;Open Source&lt;/code&gt; &lt;code&gt;Indicators&lt;/code&gt; &lt;code&gt;Crypto&lt;/code&gt; &lt;code&gt;Forex&lt;/code&gt; &lt;code&gt;Stock&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;In summary, &lt;strong&gt;ATK (Auto Trading Kit)&lt;/strong&gt; is a robust and extensible platform for algorithmic traders and developers. With its &lt;strong&gt;cross-platform compatibility, support for unlimited charts and indicators, and a growing ecosystem&lt;/strong&gt;, ATK is well-positioned for both beginners and professionals. The roadmap promises exciting features like AI-powered indicators and enhanced backtesting. &lt;strong&gt;Unlock your trading potential with ATK—explore, contribute, and join our thriving community today!&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
</description>
<category>Open Source Tools</category>
<guid isPermaLink="true">https://coderlegion.com/1852/autotradingkit</guid>
<pubDate>Tue, 15 Apr 2025 00:43:56 +0000</pubDate>
</item>
</channel>
</rss>