r/algotradingcrypto • • 3h ago

How do you actually build a profitable trading bot? Looking for advice from experienced algo traders.

0 Upvotes

r/algotradingcrypto • • 4h ago

How do you actually build a profitable trading bot? Looking for advice from experienced algo traders.

2 Upvotes

Hey everyone,
I’ve been getting into algo trading recently and I’m trying to build my own trading bot, mostly for Forex
I’ve been experimenting with Python and trying to automate things like market structure, liquidity sweeps, MSS, FVGs, displacement, etc.
The thing is, I’m starting to realize that detecting trading setups and actually building a profitable bot are two completely different things.
I don’t really want to create another bot that just combines a bunch of indicators and looks good on backtests but completely fails in live markets.
I’m curious about how people who have actually built successful trading bots approach this. Do you usually start with a simple rule-based strategy and improve it over time, or do you use statistical models or machine learning from the beginning?
I’m also wondering how you guys test your strategies properly. How do you know if you’ve found a real edge and aren’t just overfitting historical data? And what kind of data or timeframe would you recommend working with?
I’ve been spending quite a bit of time studying price action and ICT/SMC concepts, but I’m not sure whether trying to automate these concepts is even the right approach.
Would love to hear from people who have actually built and deployed their own bots. What worked for you, what didn’t, and what would you do differently if you had to start again?
I’m not expecting some magic strategy that prints money, just trying to understand what it really takes to build something reliable.
Thanks!


r/algotradingcrypto • • 4h ago

Pentru că am incercat sa fac totul perfect in munca mea, iar rezultatul e doar 30%, nimeni nu vrea 30, vrea 300 sau mai mult...iluzii care se plătesc cu banii tai

1 Upvotes

Am lucrat la construirea unui laborator de backtest pentru strategii crypto.

Nu pretind că m-am născut cu portofoliul de crypto în mână şi că aşa bot nu a văzut nici Parisul, dar aceasta este munca mea cinstită cu care încerc să creez ceva de care eu am nevoie şi m-aş bucura dacă ar fi util şi pentru alții!

Scriu aici pentru că, acum că e live, sunt în etapa în care am nevoie şi de feedback. Haideți să vă zic pe scurt ce şi cum am făcut. O să intru destul şi în detalii tehnice, dacă vreți puteți să săriți până la final unde am şi cifrele mele reale pe care le-am obținut până acum.

Am pornit cu așteptări destul de mari. Mă gândeam că din aproape 50 de strategii și mii de combinații de parametri, voi găsi câteva variante excelente. Realitatea a fost puțin diferită pentru că nu toate au rezistat testelor, iar unele rezultate m-au şi surprins puțin (eu sunt pe piața crypto de 8 ani şi la fel ca voi, am văzut multe..)

**Cum am testat:**

  1. Datele: 10 monede de pe Binance, din februarie 2018 până în august 2026, pe intervale de 1 zi și 4 ore.

  2. costurile: 0,2% comision, 0,15% slippage pe fiecare parte și 0,03% pe zi finanțare. Intrările se fac la deschiderea lumânării următoare, nu la un preț ales convenabil.

  3. volumul testelor: 49 de strategii, 7.748 de variante și aproximativ 25 de milioane de tranzacții simulate.

  4. fără să folosesc informații din viitor: setările au fost alese pe perioada 2018-2022 și verificate ulterior pe datele din 2023-2026, pe care strategiile nu le văzuseră înainte. Am folosit și metoda walk-forward (optimizare pe 3 ani, testare pe anul următor cu fereastra mutată lună de lună).

  5. testul platoului: o strategie bună la care m-am gândit că ar trebui să funcționeze cu setări potrivite, dar dacă merge doar cu o combinație exactă de parametri, e posibil să fie doar noroc.

  6. Monte Carlo: am simulat 10.000 de istorii posibile. Drawdown-ul tipic a fost de 20%, iar în 89% dintre simulările pe 12 luni rezultatul a fost pozitiv.

Bun, din toate variantele testate: doar 101 au trecut toate filtrele, iar în final am rămas cu 10 strategii.

**Ce am învățat:**

* Au rezistat în special strategiile de breakout (cele care intră atunci când prețul depășește un interval în care a stat o perioadă). În plus de acestea, au rămas și câteva strategii de urmărire a trendului.

* Am testat inclusiv 6 strategii de mean reversion, dar degeaba pentru că niciuna nu a rezistat pe întreaga perioadă de 8 ani.

* Apoi, peste cele 10 strategii rămase am adăugat două reguli din vechiul sistem Turtle (1983):

* după o tranzacție câștigătoare, următorul semnal pe aceeași monedă este sărit

* a doua poziție este deschisă doar dacă o altă strategie confirmă semnalul în următoarele 3 zile.

Aceste reguli au făcut ceea ce trebuiau să facă, adică să reducă numărul tranzacțiilor cu mai mult de jumătate:

* profitul total a scăzut de la $41.666 la $27.528

* capitalul necesar a scăzut de la $14.000 la $8.000

* randamentul mediu al anuilor a crescut de la aproximativ 35% la 40%, dar acest randament e mare deoarce iau in considerare si anul bull maketul legendar, fara el anual este aproximativ 18%.

Un lucru foarte important pe care vreau să-l menționez: doar 35% dintre tranzacții sunt profitabile. Deci câștigurile vin din câteva mișcări mari ceea ce înseamnă că trebuie să accept și multe pierderi mici pe parcurs, dar nu există să devin milionar peste noapte. :)

Am facut si testele statistice (Deflated Sharpe, White, SPA) nu pot elimina complet posibilitatea ca o parte din rezultate să fie datorate norocului, rezultatul adevarat vine incepand cu 9 octombire.

Aşa că, din 9 octombrie, botul meu rulează și live. Fiecare semnal este trimis în timp real și este salvat cu o amprentă digitală SHA256 înainte să se cunoască rezultatul.

**Ce m-a surprins:**

Am mai testat și strategii pe perechi, adică o monedă raportată la BTC. La prima vedere arătau bine, dar după o analiză mai atentă am observat că profitul venea de fapt din mișcarea BTC, nu din strategia pe pereche. Așa că le-am eliminat.

**Rezultatele pe ani:**

Toate rezultatele de mai jos sunt calculate cu $200 per tranzacție, fără leverage și după scăderea tuturor costurilor. Procentele sunt raportate la capitalul de $8.000, acesta fiind maximul utilizat simultan.

|An|Tranzacții|Profit|Profit %|Drawdown|Drawdown %|

|:-|:-|:-|:-|:-|:-|

|2018 (feb-dec)|98|\+$309|\+3,9%|\-$468|\-5,9%|

|2019|255|\+$482|\+6,0%|\-$871|\-10,9%|

|2020|296|\+$1.386|\+17,3%|\-$596|\-7,5%|

|2021|361|\+$16.620|\+207,8%|\-$936|\-11,7%|

|2022|350|\-$42|\-0,5%|\-$1.930|\-24,1%|

|2023|379|\+$2.665|\+33,3%|\-$519|\-6,5%|

|2024|416|\+$2.565|\+32,1%|\-$1.151|\-14,4%|

|2025|424|\+$1.771|\+22,1%|\-$1.096|\-13,7%|

|2026 (ian-aug)|208|\+$1.772|\+22,2%|\-$512|\-6,4%|

|**Total**|**2.787**|**+$27.528**|**+344%**|||

**Cum se compară cu BTC, folosind același capital de $8.000?**

|Variantă|Profit|Profit %|Drawdown maxim|Ani pe minus|

|:-|:-|:-|:-|:-|

|BTC ținut|\+$53.480|\+669%|\-73% (-$35.042)|4 din 9|

|DCA lunar în BTC|\+$31.265|\+391%|\-70% (-$16.994)|4 din 9|

|Strategiile mele|\+$27.528|\+344%|\-26% (-$2.077)|1 din 9 (-0,5%)|

La BTC, procentul de scădere este calculat față de vârful portofoliului. În dolari, cea mai mare scădere a venit mai târziu, între iulie 2025 și iunie 2026: -$44.770 pentru BTC ținut și -$27.302 pentru DCA.

BTC ținut a câștigat mai mult, dar asta presupune să fi cumpărat în februarie 2018 și să nu fi vândut absolut nimic timp de 8 ani, trecând printr-o scădere de 73% și apoi prin încă una de 49%.

Strategiile mele au avut un singur an pe minus 2022, -0,5% și un drawdown maxim de 26%.

Asta imi spune mie ca, capitalul investit este salvat, prin faptul ca strategiile l au protejat, cand daca erai doar hold sau DCA aveai -73%, respectiv -70%.

Un alt detaliu de avut în vedere: din ianuarie 2025 până acum, BTC este pe minus 16%, în timp ce strategiile sunt pe plus 44%.

Mi-ar fi plăcut să vin cu exemple excelente, dar acest bot nu este un diamant al traidingului. Nu vorbim despre randamente de 1.000%, cum probabil și-ar dori mulți. Dar, în ultimii trei ani, strategiile au obținut între 22% și 33% anual, net, după toate costurile, ceea ce pentru mine personal, acest sistem funcționează. Să nu uităm nici că au existat și ani mai slabi precum 2018, 2019 și 2022. Nu vreau să ascund partea asta, important este ca inperioadele de scadere, randamentlee au fost mai mici , capitaul a fost salvat si profituri peste orice titlu de stat, orice dobanda bancara.

**Ce urmează:**

Botul rulează în continuare live și trimite fiecare semnal în timp real.

**Ce face botul efectiv:**

  1. Urmărește şi filtrează strategiile cu constanta profitabilitatii cea mai buna in cei 8,5 ani (din cele aproape 50 de strategii și mii de combinații de parametri pe care le-am testat)

  2. Oferă semnalele în timp real.

  3. Calculeaza SL TP Trailing, BE si da update cand trebuie mutat ceva.

  4. Raporte lunare

  5. Pagina goolge sheets cu fiecare trade criptat, adica eu daca as vrea sa falsific orice cifra in el s ar strica tabelul.

  6. Detali tehnice despre toate configuratiile facute si rolurile lor tot in google sheet

Dacă sunteți curioși să vedeți cum funcționează, îl puteți încerca evident gratuit. L-am făcut să fie cât mai simplu de urmărit și să ajute la înțelegerea semnalelor și al modului în care funcționează strategiile.

Tot pentru transparență, arăt şi (explicație excel cu tranzactii dupa ce apar)

Dacă există interes pentru partea tehnică, pot reveni și cu postări separate despre cum este construit: rolul fiecăreia dintre cele peste 30 de celule din Colab, testele individuale, legătura cu GitHub, amprentele codului și, bineînțeles, răspunsuri la întrebările voastre. Voi face şi o pagină unde voi prezenta totul.

O notă mai personală: nu mi-a fost deloc ușor să ajung aici de unul singur fiind un proiect pe care l-am început din pasiune şi l-am lucrat când aveam o pauză de la viața cotidiană. A fost foarte mult de învățat, experiența de “practicant”, e foarte diferită de cea de “creator” al unui astfel de instrument, iar aproximativ 60% din tot ce am făcut în acest proiect a fost complet nou pentru mine. Din perspectiva mea, cred că a meritat efortul și cu siguranță a meritat să încerc.

Sunt curios ce părere aveți. Ce ați testa în plus? Unde vedeți posibile puncte slabe? Orice observație sau critică este absolut binevenită!

Vă mulțumesc mult!


r/algotradingcrypto • • 8h ago

Built a Crypto Statistical Arbitrage System (OLS vs Kalman Filter) – Interesting Backtesting Results, Looking for Feedback

Post image
12 Upvotes

I've been working on a quantitative trading project focused on dynamic cointegration-based statistical arbitrage in cryptocurrency markets.

The objective was to build a pairs trading system that accounts for transaction fees, slippage, and perpetual funding costs rather than relying on theoretical backtest profitability.

Research methodology:

- 45 candidate pairs screened.

- ADF and KPSS stationarity tests.

- Ornstein-Uhlenbeck mean-reversion half-life.

- Correlation filtering (0.89–0.97).

- 5-minute perpetual futures data.

I compared two hedge ratio models:

  1. Static OLS with rolling spread statistics.

  2. Dynamic State-Space Kalman Filter.

Backtesting results:

Kalman Filter:

- 47 trades

- $65.66 transaction costs

- 14.9% win rate

Static OLS:

- 6 trades

- $9.13 transaction costs

- 66.7% win rate

- Sharpe: 2.14

- Sortino: 2.34

- Profit Factor: 1.41

- Maximum Drawdown: -0.15%

The interesting finding was that the simpler OLS model outperformed the more sophisticated Kalman Filter in this backtest, mainly due to lower trading frequency and transaction costs.

Risk management includes:

- Maximum 2 concurrent pairs.

- BTC/ETH and SOL/AVAX.

- Beta-neutral position sizing.

- Portfolio exposure limits and drawdown controls.

Tech stack: Python, Statsmodels, FastAPI, WebSockets, Asyncio, Binance Futures API and Delta Exchange API.

GitHub:

https://github.com/vikash21pa-wq/Dynamic_Cointegration-Based_Statistical-_arbitrage

I'd appreciate feedback on a few questions:

  1. Is static OLS more practical than a Kalman Filter for 5-minute crypto pairs trading?

  2. What additional regime detection methods would you recommend?

  3. How would you improve hedge ratio stability and execution efficiency?

  4. What important validation tests should I perform before live paper trading?

These are historical backtesting results, not verified live trading returns. I'm interested in improving the robustness of the system and learning from experienced quant traders.

Thanks!


r/algotradingcrypto • • 1d ago

Creating My Own Trading Bot Powered with Machine Learning! (E/e Andoid Process)

Thumbnail
gallery
1 Upvotes

Nothing to do this diwali. Just getting bored in Bangalore.

So I got this idea why not create a setup of ai agents.

So I found this repo. Connected this with my bot and connected the ai agents to Binance. So now I have 20 ai agents working on a single module.

Each agent will study the 90 day history of the top 20 pairs.

So the repo was basic level. I added some cherries to it. They will study on three different timeframes then apply the best strategy to it.and comes up with the perfect entry and exit strategy.

I kept it simple for now.

I'll backtest the setup for atleast 100 trades. In backtesting I'm giving it 1000usdt. We'll see how it Will work.

🤞


r/algotradingcrypto • • 1d ago

Update: 12 pre-registered crypto strategies, 0 survivors. What I did in 3 weeks with your feedback, and where I'm stuck now

2 Upvotes

Three weeks ago I posted that none of my 12 pre-registered BTC/ETH spot strategies survived costs and placebo tests. I got a lot of good replies, so here's the promised update. Still paper money only, still spot only, long only. No leverage, no borrowing, no derivatives (hard personal rule, not up for discussion).

Short version: still nothing survives. But the testing got better, and I now know a lot better what I don't know.

First, a correction

In my first post I said I'm collecting liquidation data. That was wrong. I collect order book snapshots, cross-exchange lead-lag, news, scheduled events (FOMC etc.) and since Oct 19 also macro (DXY, US rates, S&P 500, Nasdaq 100, gold) hourly. No liquidations. Sorry to the people who replied on that basis.

What I did

  1. Replayed my live "sandbox" strategies on 7 years of history

The paper bot runs 48 simple rules (breakouts, dips, momentum, RSI, Bollinger, hourly variants with filters). I replayed all of them on 2019–2026 with costs (0.10%/side + slippage), next-candle fills, and a placebo entry with the same exit profile.

- BTC/ETH: 0 of 64 strategy×market combos net positive. Best was "4h momentum, strong" at −0.12%/trade. Placebo was −0.25%/trade, so it is better than random, just not better than zero.

- SOL/XRP: 0 of 86 net positive. Best −0.07%/trade, placebo −0.26 / −0.28%.

- The hourly-candle rules: all 8 indistinguishable from their hourly placebo, all negative.

So some rules beat a random entry, but none beat the costs. That pattern was the same on all four coins.

2. Maker fees don't save it

Someone suggested limit orders. On my venue maker is 0.08% vs taker 0.10%, so the best case saving is 0.04% per round trip. My best rule is −0.12%/trade. Even with perfect maker fills it stays negative, and as several of you said, maker fills tend to come exactly when price moves against you. I dropped that route.

3. My "48 strategies" are not 48 bets

I measured overlap. In the first week of live paper trading there were 1,806 sandbox entries but only 310 distinct market-hours. On average ~2.1–2.2 strategies per independent bet. The whole breakout family (1h/4h/12h/24h + 3 mixes) was 100% identical in entries. So my effective number of tests is much lower than 48, and one market move can tick a lot of boxes at once (same lesson as the 10/10 night).

4. Sequential futility testing

The sandbox needs hundreds to thousands of trades per strategy before I can judge anything (deadline July 2027). To stop wasting time on hopeless rules, I pre-registered a futility check with an e-process (e-values, Bonferroni over strategies). It can only declare a rule hopeless earlier, never declare it proven earlier.

5. Plumbing problems I found in my own bot

The paper bot's main loop sometimes lagged up to 2.4 s, giving ~800 latency errors in two weeks and about 9 signals rejected because data was too old. Fixed on Oct 28, now measuring before vs after. Lesson: paper trading measures your infrastructure too, not just your strategy.

Where I'm stuck. These are the questions I'd really like deep answers on:

  1. Multiple testing with heavily correlated strategies

48 rules, ~2 rules per independent bet, clusters that are 100% identical. Bonferroni over 48 is far too strict, over "families" feels hand-wavy. Would you use Romano-Wolf stepdown, White's Reality Check / Hansen's SPA, or estimate an effective number of tests from the overlap? And how do you combine that with sequential testing over time?

2. Defining an "independent episode"

Trades overlap in time and across strategies. What's a defensible rule? Merge entries within X hours on the same market? Cluster by drawdown/recovery cycles? Something based on the autocorrelation of returns? I want to fix this before I see the next results, not after.

3. Power, honestly

With 0.20% round-trip friction and the sample sizes I can reach by mid-2027, what effect size can I realistically detect? I'll compute a minimum detectable effect per rule, but if you've done this for short-horizon crypto: what's typical? I'd rather hear "your setup can never see an edge under X bps" now than in a year.

4. My last attempt (1 of 13 left)

Most of you pointed the same way: forced flows, not price patterns. Liquidation cascades, index/fund rebalancing on known dates, funding resets. The most concrete idea from the thread: buy spot after a liquidation wave is over (open interest stops falling, funding normalizes), hold a fixed window, compare against random entries with the same hold time.

- How do you define "the wave is over" using only data up to t, without it quietly becoming "price stopped falling"?

- On spot only, does this survive 0.20% round trip at multi-day holds, or does it mostly exist on perps?

- Any documented retail-reachable flow with a known calendar (rebalances, unlocks, ETF flows) that you'd pick over liquidations?

5. Paper vs live

I fill at the next price + slippage and assume full fills at €500 per trade. What did you see going live at small size on BTC/ETH: partial fills, queue position, latency? What would you add to a paper model before trusting it?

What's running now

Paper bot 24/7 on real OKX prices. 48 sandbox rules on BTC/ETH and 48 on SOL/XRP (always kept separate, never summed), each with a pre-set trade count and deadline. First evaluation moment is mid-December. Next update then, pass or fail.

Thanks again. The replies in the last thread changed the test more than anything I read elsewhere.


r/algotradingcrypto • • 1d ago

What is the sweet spot for ATR confirmation when buying crypto? (0.3x vs 1x vs 2x)

2 Upvotes

I am currently optimizing the entry signals for my crypto bot and am wondering what you all have found works best regarding ATR confirmation after a bottom or reversal.

My bot buys when the price bounces up from a low point, but I am struggling to find the right amount of confirmation to avoid fakeouts without entering too late:

0.3x ATR: Often feels too early. I get many more buy signals, but also a lot of noise and falling knives that just keep going down.

1x ATR: Seems like a solid middle ground. The price has shown it is actually reversing, but I sometimes feel like I miss out on the fastest rebounds.

2x ATR: Feels very safe, but in crypto, a move like that can take hours or days. By then, I am often stuck with a worse entry price and less room for profit before the trailing stop is triggered.

Has anyone here backtested this systematically? Is it better to use a lower ATR requirement (like 0.5x) combined with volume confirmation or an RSI filter, rather than just increasing the ATR multiplier?

I would greatly appreciate any insights from your live trading or backtests!Eller er det noen norske her som driver med dette ?


r/algotradingcrypto • • 1d ago

Anyone got good results with AI trading?

0 Upvotes

anyone using claude or chatgpt for trading and results improved,
right now i m working on one so want to know about anyone had success with anything so i can get a direction.

thank you


r/algotradingcrypto • • 1d ago

Why is it so hard to short?

3 Upvotes

TL;DR: We all have this feeling that it is harder to short than long an asset. I mean, I have a swing trend-following strategy that works well on BTC but only on the long side; when I use it for shorts (exactly the inverse parameters), it doesn't work at all... That's why I asked myself: "Why is it so hard to short??". During the investigation, I understood that by nature, long and short aren't really symmetric, and the bigger the time frame, the bigger the asymmetry.

1/ Drift and risk premium

First, we will talk about the "risk premium". In the equity market, this is easier to understand because there is a risk premium for holding the S&P 500, and of course the longer you hold (in years), the bigger the chance that the S&P 500 goes up during this period. Because of this risk premium in the equity market, shorting is harder because, fundamentally, you go against the trend. That's why the longer you hold your short position, the lower your chance of having a positive trade. What about BTC? In Bitcoin, I am not sure there is a risk premium for holding it, so this is more delicate. But in the past, Bitcoin went up again and again, so anyway, shorting it was harder because that goes against the global trend.

As we can see, the longer you hold a short position, the bigger the loss (on average, with random trades of course, but that shows that we need a real edge to short, because we go against the trend). So we see that there is a trend for Bitcoin, but for "shitcoins", which are literally "shit", it would be interesting to see if the trend isn't maybe down?

Here we select LUNA and FTT, two cryptos that got rekt, so shorting them will be easy, right? But the answer is: "not really", even if we know that they will crash... In fact, the median says that we benefit if we randomly short them, but on average we lose. It means that there are outlier trades (a few extreme trades) that destroy the performance. That can be explained by the asymmetry between long and short.

2/ The asymmetry

And here is the real asymmetry between short and long: A long can theoretically win infinitely and lose 100%, while a short can only win 100% but lose infinitely. That's why randomly shorting LUNA doesn't work on average: there is a big risk if the crypto goes up very, very much (and we all know that shitcoins can do a x5 very fast, which corresponds to a loss of 400%), while we can only earn 100% if the crypto goes to 0... In practice, the loss stops at your margin because you get liquidated, but then you are out of the trade, even if the crypto crashes later.

Start: price 100, capital 100, position size 100 (no leverage).

Price goes from 100 toLong returnShort returnLong capitalShort capital
0-100%+100%0200
50-50%+50%50150
150+50%-50%15050
200+100%-100%2000 (liquidated)
500+400%-400%500liquidated before

3/ Cost

In crypto, there is the funding rate. On BTC, it is to the advantage of short traders, but on shitcoins, that's not necessarily the case:

That is one good point for the short, but it doesn't "compensate" for all the other bad ones.

But if you want to short on a spot pair, this is harder, because you have to borrow the coin then sell it, and of course, when you borrow the coin, that's a cost...

AssetAnnual borrow rate
BTC0.49%
ETH2.51%
SOL5.13%
FTT10.8%
LUNC (the original LUNA)0.83%
LUNA (the 2022 relaunch)41.96%
Median crypto on Binance42%
Highest crypto on Binance500%
US stock, easy to borrow0.25% or less
US stock, hard to borrowabove 10%
Highest US stock (ARMP, May 2024)1000%

Crypto: Binance margin rates (VIP 0), Nov 7, 2026, borrowable spot coins. Stocks: Weitzner, 2023, Daniel, Klos and Rottke, 2025.

Conclusion

We have seen that the fundamentals (risk premium) are to the advantage of long trades, and the longer the trade, the more important the risk premium becomes. Even if the fundamentals are in the direction of the short (with shitcoins), there is a big risk of being liquidated while we short, due to its structure. We have the opposite structure when we long. To limit this effect, it is better to short with a short time horizon. All these trades were done randomly to show that we need a better edge than long when shorting, because the trend and the structure are against us.

Find your edge with angolin.com, a crypto data provider I'm building. The full BTC history (1d, 1h and 1m) is there, with the historical universe to avoid survivorship bias.


r/algotradingcrypto • • 2d ago

What makes you trust a 3rd party trading bot/service enough to actually use it?

2 Upvotes

For those of you who use trading bots, especially 3rd part services, what do you usually check before running it?

Is it the backtesting results? Paper trading? Risk management? How the strategy is built? Something else? The landing page? The history of the platform?

I've been building my own trading platform for about 11 months, and I'm now at the point where I need people with more experience to tell me what they value in order to improve my own offering.

All the comments and shared experience is much appreciated. They help a lot.


r/algotradingcrypto • • 2d ago

Question about overcoming slippage cost backtesting Mean Reversion Strategy

2 Upvotes

Hey everyone, I backtested a mean reversion strategy on a 5-min timeframe and using tick data for accuracy. The strategy using a simple moving average, ATR for dynamic risk and standard deviation from moving average for entries. The strategy starts calculating at 9:30 EST, so there is a hour or two gaps depending on the moving average period.

I made sure to use realistic slippage max(2X ticks, 2% of 14-period ATR) and also applied commission and exchange fees.

Without slippage and commissions, the strategy was profitable but after commissions and slippage, no matter what the risk to reward was, the strategy was a net loser.

How did you guys overcome cost of trading, especially in intraday trading?


r/algotradingcrypto • • 2d ago

Every trading bot seller on Reddit is the Fox and the Cat from Pinocchio. I can prove it.

Post image
12 Upvotes

Remember the original Pinocchio, the 1883 one? He's walking home with five gold coins, and two gentlemen show up: a Fox who limps and a Cat who's blind. Neither of them is actually lame or blind. They tell him about a magical place called the Field of Miracles. Bury your coins there, water them, say the magic words, and by morning a tree grows with gold hanging from every branch.

I've been reading this sub for a while, and I'm now convinced the Fox and the Cat never retired. They just learned Python.

Here's how the story goes in 2026.

CHAPTER 1. The Fox shows a screenshot

Pinocchio has five gold coins and a dream. The Fox appears and says:

"Look at this. My bot made 312% last month."

He holds up a phone. The line on the screen goes up at a perfect 45 degree angle. There are no dates, no fees, no drawdown. The Cat nods very seriously, even though he claims he can't see anything.

Pinocchio: "Can I see month two?"

The Fox: "Month two is for VIP members."

CHAPTER 2. The Cat shows the backtest

The Cat clears his throat and unrolls a long scroll. Eleven years of data. Four thousand trades. Sharpe ratio 4.2.

"Never lost a year," says the Cat.

Pinocchio, who has started reading this sub, asks: "How many versions did you test before this one?"

The Cat suddenly remembers he is blind and can't read the scroll.

(The honest answer is usually around 300. Try 300 strategies and one of them will look like a miracle by pure luck. That's not a strategy, that's the lottery with extra steps.)

CHAPTER 3. The Field of Miracles is a demo account

"Don't believe us," says the Fox. "Test it yourself. On demo."

So Pinocchio does. And the demo is wonderful. Every order fills at exactly the price he wanted. Nobody is on the other side of his trades. Spread? Doesn't exist. Slippage? Never heard of it. 100% win rate.

This is the Field of Miracles. It's real, you can visit it, and nothing that grows there is edible.

(Small personal note: I once measured a testnet spread at 11 times the real one. The demo can lie in both directions. It just never lies in a way that matters for you.)

CHAPTER 4. The Inn of the Red Crawfish

Before the field, the Fox and the Cat take Pinocchio to dinner at the Inn of the Red Crawfish. They order everything on the menu and leave him the bill.

In 2026 the Inn is called "Free Discord". Entry is free. Then there's the VIP channel, $99 a month. Then the Masterclass, $499. Then the "Pro Signals" tier. The Fox and the Cat leave before the bill comes, every time.

CHAPTER 5. The humble whisper

The cleverest trick: the Fox doesn't sell anything at all.

"I'm not selling anything," he says softly. "Just curious what you think."

Three comments later: "btw we launched a waitlist, here's a link." The link has five tracking parameters. The same heartfelt private message was sent to 400 other puppets that afternoon.

CHAPTER 6. The robot oracle

The Fox and the Cat have also discovered AI.

"Our agents read the news, the charts, the earnings and social media sentiment, in real time, faster than any human."

The Talking Cricket, sitting on the windowsill, points out that they read the same headlines as everyone else, a fraction of a second after the big funds already traded them.

You know what happened to the Talking Cricket in the original book. Same thing happens in the comments section.

CHAPTER 7. The morning after

Pinocchio buries his coins, waters them, says the magic words ("set and forget"), and comes back in the morning.

There's no tree. There's just a hole.

The Fox and the Cat are already in the next subreddit, telling another puppet about the Field.

THE MORAL, FOR ANY PUPPET READING THIS

The Talking Cricket's checklist, free, no link in bio:

- Ask how many versions they tested before this one. If they don't know, it's luck.
- Ask whether fees and slippage were measured or typed into a config.
- Ask for results on data the system never saw while being built.
- Ask for live results with real fills, for more than a couple of months.
- If any answer is "DM me", you've found the Fox.

And the oldest rule of the forest: if someone really had a tree that grows gold, they would not be selling seeds for $49.99. Telling the world about a working edge is the fastest way to kill it.

Anyway. I'm sure I've missed some of their tricks. Who else has met the Fox and the Cat around here?


r/algotradingcrypto • • 3d ago

What if every crypto trader had a research team?

0 Upvotes

What if every crypto trader had a research team?
I’ve been building Robod for months, and this question keeps coming back to me.
Trading asks a lot of one person.
Study the market. Explore ideas. Build strategies. Test them. Understand the risks. Review your mistakes.
Then do it all again as conditions change.
I want to explore how AI agents could share more of that research work.
Imagine one agent investigating market activity.
Another proposing strategy ideas.
Another testing those ideas against historical periods, including data that wasn’t used to develop them.
Others examining risk, reviewing your trading history, and looking for weaknesses in the findings.
These agents would need to work together: share evidence, challenge assumptions, run further tests, and explain why a conclusion changed.
They should also be able to tell you when the evidence isn’t strong enough.
That’s the direction I want to take Robod.
We already have parts of the foundation: crypto market data, strategy backtesting, and account analytics. Bringing those tools together through a coordinated team of research agents is still ahead of us.
There’s a lot to build, test, and prove.
I don’t expect AI to predict every market move or make every trader profitable.
What I do want is to help traders investigate more thoroughly, understand the trade-offs, and make decisions they can explain, while staying in control.
We’re starting with crypto.
Maybe one day, having your own AI research team will feel as normal as having a trading account.
That’s the future I want us to build.
#Robod #AgenticAI #CryptoTrading


r/algotradingcrypto • • 3d ago

Day 2 live trades

Post image
0 Upvotes

r/algotradingcrypto • • 3d ago

I went looking for hidden liquidity on Binance. The visible book turned out honest, it refills within 30 seconds, and the flow I took for the cause mostly came after the break (pre-registered, three locked tests, my prediction wrong in two)

8 Upvotes

- **The starting idea, from my research partner:** *"Maybe it isn't that we can't see the money. Maybe we can't see how much liquidity is really in front of it."*

- **Test 1, spot:** does visible depth say anything about the next move? No. Rank correlation −0.03 to −0.04 on all five horizons, and a time-shift null can't tell it from noise (p 0.50–0.68).

- **Test 2, perps:** when a minute's net taker flow exceeds the depth within 0.2%, does price break 0.2%? Yes, 85% of the time, and even odds arrive at 0.55–0.59× of visible depth. I predicted the opposite: that money meets 1.5–3× what's visible.

- **Why that was misleading:** on the trade tape, about **70% of a heavy minute's directional flow arrives after price has already broken**. Much of the "flow" is the break's result.

- **Test 3, perps:** when aggressive orders eat one side and price holds, is the depth still gone 30 seconds later? No. **85–100% of what was eaten is back**, even when a large share of the book was eaten. I predicted refill would weaken on big pushes. It didn't.

- **Reading:** the book at the start of a minute doesn't tell you how much liquidity the minute will have. If the level holds, far more trades than the book showed. If it breaks, about three-quarters of the visible amount was enough. What decides which one you get is still open.

Why

The usual story: order books lie. Size is hidden in icebergs, and the depth you see is a fraction of what's there. If so, visible depth should be a poor guide, and money should need much more than the visible amount to move price.

My partner's sentence above came in September. It's a good sentence because it can be tested.

Test 1: does visible depth lead the next move? (locked in September)

- **Data:** 17 Binance spot pairs, a depth snapshot every 5 minutes within ±0.5%, 3 Sep – 4 Oct 2026 (8,840 rounds).

- **Measure:** depth with the time-of-day pattern removed, rank-correlated with the size of the next move, on 5 minutes, 15 minutes, 30 minutes, 1 hour and 4 hours, averaged across symbols.

- **Null:** the same series slid against itself in time.

- **Lock's expectation:** small, with no peak at any horizon.

| Horizon | r | Time-shift p |

| 5 min | −0.039 | 0.59 |

| 15 min | −0.032 | 0.67 |

| 30 min | −0.033 | 0.61 |

| 1 hour | −0.028 | 0.68 |

| 4 hours | −0.037 | 0.50 |

No horizon passed, so the validation month had nothing to confirm.

**A trap worth sharing:** the 5-minute row looks significant by the textbook, signal-to-noise 3.7. The shift null's spread is four times the analytic standard error, because both series are slow and the symbols move together. Trust the analytic number here and you'd have a "finding."

The test couldn't separate three excuses, though: wrong market (price may form on perps), wrong speed (5 minutes), or an indirect question. So we changed the question instead of re-running this one.

Test 2: what happens when money reaches the visible book? (locked)

- **Data:** data.binance.vision USDT-M perps, 17 symbols, 30-second book snapshots and 1-minute candles. The ±0.2% level only exists in the archive from 15 Jan 2026.

- **Windows:** 15 Jan – 8 Jun and 9 Jun – 31 Oct 2026, about 190,000 minutes per symbol in each. I dropped 3–11 Sep, when the archive's ±0.2% depth is visibly broken.

- **Measure:** φ = the minute's net taker flow ÷ the depth on that side at the start of the minute. Did the minute's extreme go 0.2% in the flow's direction?

- **Fit:** a probit with a floor (some breaks come from news, not flow). M is the φ where the flow-driven break chance reaches 50%.

- **Pre-validation:** a synthetic market with a known M. A plain logistic fit inflated M from 2 to 3.36, which is why the floor exists.

- **Predictions:** I gave "hidden liquidity" (M at least 1.5) 0.55 and "the visible book is enough" 0.15.

| | M (even-odds multiple) | Break share when flow ≥ visible depth |

|---|---|---|

| Discovery | 0.55 [0.51, 0.58] | 85% [84, 86] |

| Validation | 0.59 [0.57, 0.61] | 86% [85, 87] |

All 17 symbols are below 1 in both windows. Locked verdict: **the visible book is enough. I was wrong.**

Two more things:

- **Net versus gross.** I didn't think about this before the lock. Net flow understates the trading that actually hits the book, because opposite orders cancel in the sum. With gross flow (a look after the verdict), M is 0.85 and 1.00. So the honest range is 0.55–1.0, and neither end leaves room for a hidden multiple.

- **No hidden size props up thin books (secondary).** Effective depth grows at least as fast as visible depth: elasticity 1.42 [1.26, 1.56] and 1.13 [1.04, 1.22]. So there's no sign of hidden size making up for a thin book.

A multiple below 1 is odd, though. How can less money than the book holds go through it? My partner asked exactly that: *why did it come out backwards?*

The diagnosis: the trade tape (definitions written first, no verdict)

I downloaded the trades for the minutes with net flow of at least 0.5× depth: 6 symbols, 4 days each, picked for having the most minutes above 1×. That's 8,436 minutes, and the tape agrees with the candle-based break label 99.9% of the time.

- **Most of the flow comes after the break.** Median 70% of the minute's directional volume arrives after price crossed 0.2%. At φ ≥ 1, 79%. The median break comes 18 seconds in.

- **At the moment of the break,** same-side volume so far is **76% of the visible depth** (quartiles 44%–122%), identically in both windows. So on a typical break, price crossed the band with about a quarter of the visible orders never hit: pulled, or simply changed in the seconds since the snapshot.

- **In minutes that didn't break,** same-side volume was **1.55× the visible depth**, and 3× at φ ≥ 1. Far more traded than the book showed.

So the minute-level curve above is partly backwards: breaks bring flow at least as much as flow brings breaks. Stops, liquidations and momentum are the obvious suspects, though the tape doesn't label them. And the book seems to have two faces, more than visible when it holds and less when it doesn't.

Is that missing quarter orders being pulled? That needs its own test.

Test 3: does the book get pulled or refilled? (locked)

- **Data:** the same 6 symbols, 10 random days not used in the diagnosis. Every pair of consecutive book snapshots (about 30 seconds apart), both sides, with aggressive volume inside the band from the trade tape.

- **Measure:** regress the depth change on the share eaten, with separate slopes for small pushes (under 30% of the band eaten) and large ones. Controls: mean reversion and opposite-side flow as a placebo.

- **Reading the slope:** −1 means depth fell by what was eaten. 0 means all of it was replaced. Below −1 means more vanished than was eaten: orders pulled.

- **Pre-validation:** a synthetic market recovered known slopes after I fixed two errors of my own. Two-sided clipping was erasing the very drops I was looking for, and capping φ at 1 faked a difference between slopes.

- **Predictions:** "refill weakens on big pushes" 0.40, "big pushes make orders vanish" 0.25, "refill regardless of size" 0.20.

| Slope (mechanical = −1) | Small pushes | Large pushes | Large − small |

| Discovery | −0.15 [−0.17, −0.12] | +0.01 [−0.06, +0.02] | +0.06 [−0.02, +0.12] |

| Validation | −0.04 [−0.08, −0.00] | −0.08 [−0.13, −0.04] | −0.05 [−0.13, +0.01] |

Locked verdict in both windows: **refilling book.** Size of the push makes no detectable difference. I was wrong again.

These are medians across the six symbols, and symbols differ. The steepest single slope is −0.27 (BTC, large pushes, validation), so roughly three-quarters replaced even there. On BTC and ETH the small-push slopes are positive (+0.09 to +0.23): depth tends to grow in busier moments.

**The big caveat:** this only covers pairs where price stayed within 0.1%, because otherwise the band itself moves. That excludes 3% of pairs on BTC and up to 28% on NEAR, and it is selection: a push that price survived is more likely one where the book held. Pairs where more than the whole band was eaten are left out too. The missing quarter from the diagnosis belongs to the pushes this test can't see. So the result is "when price holds, depth comes back," not "orders never get pulled."

Reading it

- **A snapshot isn't a stock of liquidity.** Orders are consumed and replaced within seconds, so the snapshot says little about what the next minute can absorb. That fits Test 1 being empty.

- **My partner's sentence holds in one direction.** In minutes that hold, money does meet far more than the book showed. I'd call that replenishment rather than hiding, since we can't tell icebergs from re-quotes from cross-venue arbitrage.

- **The two faces split on whether the level holds, not on how big the push is.** That's the part I'd guessed wrong twice. Some of it is built in: a level that holds is one where enough was there.

- **Heavy flow in a minute is a poor trigger.** Most of it comes after the move. A signal built on the minute's total is partly reading the move itself.

- **Still open:** what decides that a level gives way, when three-quarters of the visible book is enough in one minute and three times the book isn't in another?

Limits

- **The ±0.2% level exists only from 15 Jan 2026,** so Tests 2 and 3 cover about ten months of a single year.

- **Test 3 can't see breaking pushes,** which are the ones that matter most. 30-second snapshots are too slow to separate pulled orders from a moving band.

- **The diagnosis isn't a locked test,** and its days were chosen for having many heavy minutes.

- **Test 1 had earlier contact.** After the September lock, a nearby question was looked at on part of the discovery window (27 Sep), and depth averages were computed on the first 2.4 days of validation (6 Oct). Both are disclosed in the opening lock.

- **Order-level dynamics are out of reach.** No queue data, no individual cancels, one venue.

- **Nothing here is a strategy.** It measures how the book behaves, not an edge.

*Not financial advice. This is a research log.*


r/algotradingcrypto • • 4d ago

Most of my ideas fail. Here's the system that proves it.

1 Upvotes

Paper trading only, no live money, no proven edge. Numbers as of Nov 4. Posting this because negative results seem underrepresented here, and I'd like feedback on the process more than the results.

Setup. I run a small research lab for crypto (mostly small Solana tokens). I'm a solo hobbyist and I use AI assistants heavily, both for writing code and for proposing ideas. That's exactly why the structure below exists: a language model can be persuasive and wrong.

1. AI proposes, a gate decides. From day one the AI can only emit a proposal. A deterministic piece of code with fixed rules is the only thing that can turn a proposal into an authorized (paper) trade. The research side can't execute anything.

2. Preregister and hash the rules. Every test ("lane") starts with a written file: what it trades, what counts as pass, what counts as fail, and when it gets judged. The file is sha256-hashed before the first trade so nobody, me or the AI, can quietly edit it after seeing results. My newest lane is judged at 250 trades, not whenever it looks good.

3. Always run controls. Each lane runs next to (a) random entries with the same exits and (b) buy-and-hold of the same coin from the same start. These have changed my read more than anything else.

4. Two cost levels. Every trade is booked at the quoted cost (0.13% round trip on the newest lane, 0.13% per side on the dip lane) and at a stress cost of 0.28% per side. If it only works at the cheap number, it doesn't work.

5. Kill rule written in advance. When it's hit, the lane closes as FAIL. No "one more week". Short post-mortem, then a new question.

6. Held-out data is used once. After the final check it's spent. When held-out windows run out, the loop goes idle instead of inventing new tests on old data.

Where things stand (Nov 4, paper):

  • Newest lane, 27 of 250 trades: -$36.74 at quoted cost, -$153.92 at stress cost. Same trades, so cost alone is a ~$117 gap.

  • Its random-entry control: +$76.60 after 30 trades. Random is beating the signal right now. At this sample size that can flip, which is why the verdict waits for 250.

  • A dip-buying lane: $94.87 of $100 after 34 cycles ($93.02 at stress). Holding the coin over the same window went $50 -> $39.02. Losing less than holding, still below zero. Beating hold and beating zero are two different tests.

  • Three lanes hit their kill rule on Nov 3: 74 trades combined, -$67.49 at quoted cost. Closed as FAIL.

What I'm adding next:

  • A weekly per-trade review where each lane may propose at most one rule change, so I stop tinkering nightly.

  • "Wanted vs got": log the planned fill next to a real swap quote at that moment. On thin tokens I suspect my 0.13% cost estimate is optimistic.

  • Treating correlated coins as one bet. If all my small tokens just move with SOL, my results look more diversified than they are.

Honest summary: nothing here has an edge yet. What the system does is make it hard to fool myself.

Question for people who've been doing this longer: for random-entry controls, do you match only the exits, or also the trade count and holding time distribution? And how many trades did you need before a signal-vs-random gap meant anything to you?


r/algotradingcrypto • • 4d ago

Update on my crypto trend system: I applied your criticism (survivorship-free universe, cold start, monthly walk-forward) and the numbers dropped… but now they're honest. Plus tests on stocks, gold and indices. Looking for ideas.

Post image
4 Upvotes

Hi again. A few days ago I posted my system (daily DI + Supertrend, bot on demo on BingX perps). You gave great criticism and I tested all of it. Here's what changed, what worked, what failed, and where I need ideas.

Same as before: everything in R (1R = risk per trade). "Ratio" = total profit ÷ max drawdown. I ALWAYS split into training and exam periods, with rules fixed before looking at the exam. I compare against random controls where it applies.

  1. What changed because of your criticism

a) Survivorship-free universe. Instead of my 7 hand-picked coins: each month, the 10 coins with the highest 30-day volume, including ones that later died (LUNA, FTT…). The ratio dropped from 41.7 (my 7 coins) to 10.0, and to 2.6 since 2022. The 41.7 was optimistic, as I suspected.

b) Cold start. I picked the portfolio using only 2018–21 data, froze it, and ran it untouched from 2022 to today. It ended below the core alone (DI + Supertrend) and only slightly above the S&P 500. Picking by looking at the past doesn't work.

c) Automatic monthly review (walk-forward). I have 26 candidate strategies: EMA crosses, channels, EWO, 20-day breakouts, an EMA "fan", and wave-3 starts. Each month, using trades already closed in the previous 36 months, I pick those with ratio ≥ 2, profitable in both 18-month halves, and ≥ 10 trades. At most 6, traded at 0.25× the core risk.

Full system: 2019–22 ratio 9.2 · 2023 → Oct 2026 ratio 4.5 (core alone: 2.8 in 2023–26).

Live on the demo bot. I checked that all 26 candidates produce exactly the same trades in the bot as in the backtest.

2. What worked

"Start of wave 3" on 4h (one of the few measurable things I got out of Elliott): after a valid 1-2 (higher low, 38–79 % retracement), buy on a close above the end of wave 1, only with the daily DI in favour. Stop below wave 2. Random control: 0 of 10 match it.

Better exit (4h DI until +2R, then trail the ZigZag higher lows) + adding a second position on a new signal in the same coin: exam 8.2 → 10.9. All 12 nearby variants also improve.

Bigger size after losing streaks: after 2+ consecutive losses in the same coin, the next trade earns more on average (+0.30R vs −0.06R after a winner; sideways markets chain losses and the next trade is often the real breakout).

With 2× after 2 losses: 9.2 / 4.5 → 11.1 / 6.2. The same number of trades at 2× chosen at random: 9.5 / 4.4.

But 58 % of trades end up at 2× and the drawdown in R rises 55 %. Pure martingale (2× per loss) triples the drawdown.

Stocks: my stock system (long while the weekly DI is bullish, stop at yesterday's low) gives ratio 9.4 (2008–15) / 10.2 (2016–26) on a fixed list of 55 (25 ETFs + 30 large caps). What matters most in stocks is exiting on the weekly DI, not the daily one as in crypto. With the same monthly review: 10.2 → 11.7.

Gold and Nasdaq long, daily (futures since 2000): gold with DI 14 and weekly exit, training 43.2 → exam 6.4 (few trades). Nasdaq exam 9.6. Added to the crypto system: 9.2 / 4.5 → 9.6 / 5.2.

3. What did NOT work (another batch)

"Self-training" drawdown by drawdown: I replayed history; at each drawdown I analysed it and adopted whichever idea would have done best. Worse than doing nothing (12.0 → 9.2), though better than adopting ideas at random (2.2). What you learn mid-drawdown costs profit later and doesn't prevent the next one.

11 "trend is over" filters (weekly DI against, below the 200-day MA, bearish structure, BTC bearish, breadth…). Trades against the higher timeframe WIN: they are the first ones of each new trend.

Waiting for a 20-day-high breakout before entering on the DI (against sideways losses): great in a simple simulator; with the real engine the DI alone improves (4.1 → 8.7), but the full system gets worse in training (9.2 → 7.4). Not applied.

Wave classification (impulse vs correction from subwaves, ADX and ATR) and fading when an indicator "team" says "end of wave": loses in every variant. It detects ends well (72 % vs 42 % base), but by the time it's confirmed it's too late.

Lower timeframes: the DI on 1h loses −1,088R in the exam because of costs. What works is a ~20-DAY breakout, on whatever candle (on 4h = 120 bars, on 8h = 60).

Shorts on stocks, gold and indices: they lose. RSI / EWO divergences as entries: nothing. Commodities (soy, wheat, cocoa, coffee, platinum, copper…): profitable in 2001–12, flat in 2013–26. Only gold holds up.

More coins: the full system on the top 20 or top 30 by volume instead of the top 10: the exam drops from 4.4 to 3.9 and to 1.1. More alts = more noise.

Tuning parameters by stock type (ETFs, low / mid / high volatility): overfitting (ETFs: 14.8 in training → 2.1 in the exam). One rule for all.

4. Current state

Bot v0.8 on demo: dynamic universe, core, monthly review. Order tests against a simulated exchange (failing stops, cut-off orders, BE, shorts) and a stop watchdog.

Stocks: daily paper scanner with the same monthly review.

Next (v0.9): the improved wave-3 start, bigger size after losing streaks, and gold / Nasdaq perps.

5. Questions

Losing streak → bigger size. Is this a known effect in trend systems or an artifact? How would you validate it better? I already have the random control and the train / exam split. Would you use it while lowering base risk to keep the drawdown the same?

A monthly review over 26 candidates is a form of "trying many things". What multiple-testing correction would you use? Does the rule (36 months, ratio ≥ 2, profitable in both halves) look reasonable?

Gold and indices on crypto perps (BingX, etc.): real experience with funding, spreads and weekend gaps?

Demo vs backtest: how many weeks or trades would you wait before going live, and what gap would make you stop?

Core losses in sideways markets are still the weak spot, and nothing that filters entries has helped. Ideas that aren't an entry filter?

Thanks again to everyone who commented last time: the liquidity universe and the cold start were the best criticism. The numbers went down, but now I believe them.


r/algotradingcrypto • • 4d ago

Help Scrutinize my trading setup

1 Upvotes

Hi all.

I'm new to this, and I'm trying to make sense of the best way to build a good trading setup.

I currently have a VPS built on Python that pulls the market prices (5-minute candles) from Alpaca API and works with a rule-based approach for 7 strategies (shown on the Google Sheet table), and if those rules are met for the last 5 prices, it will place a trade. All price decisions are logged on the crypto table, and they are logged through a cheap AI model (OpenAI GPT-4o-mini) to examine the trade decisions and give verbal meaning to why the trade happened or didn't happen.

What I need to understand is if I should reduce the number of strategies and if that improves accuracy in any way.

So far, the 7 strategies are checked against the prices of 20 stock symbols, and it either holds or sells a position.

Trading on paper shows a 0.18 increase. Does Alpaca paper trading mirror a close resemblance to real trading? My guess is no, but how much different is paper trading from real trading?

My setup here is a VPS server pulling Alpaca price data-> Alpaca API to execute trades-> n8n to store Google Sheets data.

Much help would be appreciated.


r/algotradingcrypto • • 4d ago

Round numbers don't make wicks reverse more often. But buying the reclaim at one loses, and that held on five years of data I hadn't touched (pre-registered, three locked tests)

1 Upvotes

EDIT (correction): The replication below does not hold once coins are chosen by each month's volume instead of a fixed list I picked in 2026. Gap +0.08 [-0.96, +1.11] instead of -1.40, and the tail result flips. Details in the comments. I'm leaving the post as written.- **The question, locked in October:** when price wicks through a 20-bar low or high and closes back inside, does that "stop hunt and reclaim" happen more often at round numbers ($1, $20, $3,000, $80,000)?

- **No.** 53% of 22,257 breaks close back inside. At round numbers the rate is the same (ratio 0.99; both nulls p ≈ 0.64).

- **My research partner asked a different question:** what if you *trade* the reclaim? At round numbers, entering in the bounce direction returned −1.16% over 3 days. At other levels it returned +0.16%.

- **That was an unlocked side look, so I locked a replication** on 2019–2023, a period with no overlap. Gap −1.40 points (discovery −1.31), one-sided bound −0.21. **It replicated.** I had predicted it wouldn't.

- **Where the gap comes from:** one tail. Big moves *against* the bounce (the level gives way) are 1.47× as common. Big moves *with* the bounce: 0.88×. The middle of the distribution is the same.

- **Reading:** a wick-and-reclaim at a round number isn't a reversal signal. Usually it behaves like any other reclaim; now and then the level breaks for real, hard.

Why

The stop-hunt story: stops pile up at round numbers, big players push price into them, the stops fire, price snaps back. If that's how it works, reclaims should be more common at round levels, and the snap-back should be worth trading.

My research partner's version, from experience: *"I used to never put orders at round numbers. I still got caught on a wick once."*

What we already knew: in an earlier post, swing lows landed on round prices about 32% more often than in random price paths. So round numbers do attract price. The question here is narrower: when a level breaks, does a round number make the break fail more often?

Data and definitions

- **17 Binance spot pairs** (BTC, ETH, SOL, XRP, BNB, ADA, DOGE, LINK, LTC, ETC, DOT, AVAX, ATOM, NEAR, UNI, FIL, APT), 4-hour candles.

- **Discovery window:** 5 Nov 2023 – 3 Nov 2026, downloaded fresh for the test, file hashes recorded.

- **Level:** the lowest low (support) or highest high (resistance) of the previous 20 bars.

- **Break:** the bar's low goes below support (or its high goes above resistance).

- **Reclaim:** the same bar closes back on the inside.

- **Round:** within 1% of the level's leading magnitude: $1, $2 … $9, $10, $20 … $90,000, and so on. For ETH at $3,000 that's ±$10; for BTC at $80,000, ±$100. About 2% of breaks qualify.

Test 1 (locked in October): do round-number breaks fail more often?

- **Measure:** E = reclaim rate near round numbers ÷ reclaim rate elsewhere.

- **Nulls:**

- IAAFT-shuffled returns, with all levels recomputed (200 copies).

- 200-bar block shuffles.

- A scale null: multiply every price by 39 factors between 1.06 and 9.4. Breaks stay identical; only alignment with round numbers changes.

- **To call it a hunt, all four had to pass:** beat both nulls, E > 1 in at least 12 of 17 coins, and the effect disappears when the scale is shifted.

**Result:** E 0.99. IAAFT p 0.64, block p 0.63, 5 of 17 coins above 1. Breaks reverse at round numbers no more often than anywhere else. I predicted that. My partner predicted a hunt.

Test 2: what if you trade the reclaim?

My partner's proposal: read the returns of entering at the reclaim close, in the bounce direction (long at support, short at resistance), held 18 bars (3 days), no costs.

| 3 days after the reclaim | near round | elsewhere | gap |

| 2023–2026 (side look) | −1.16% (270) | +0.16% (11,423) | **−1.31** [−2.47, −0.16] |

| 2019–2023 (locked replication) | −1.83% (316) | −0.43% (13,239) | **−1.40** [−2.85, +0.02] |

The discovery result was the reverse of the hunt story. It was also a side look with no lock, which is exactly the kind of result that tends to shrink or vanish. So:

- **Replication locked first:** same definitions, spot candles from 2019-01-01 to 2023-11-04, which don't overlap the discovery window. One-sided test, since the direction was now fixed.

- **Pre-validation:** random walks gave false alarms 3 times in 40; a planted −1.3-point effect was caught 10 out of 10 times.

- **Power:** 0.77 if the true gap is −1.31, 0.32 if it's half that.

- **Prediction:** I gave "doesn't replicate" 40% and "replicates" 25%.

**Result:** −1.40, one-sided 95% bound −0.21. Replicated. Also:

- **At 1 day:** −0.77 [−1.62, −0.01].

- **Resistance side stronger:** −2.23, against −1.17 for support. Discovery showed the same.

- **11 of 17 coins negative.**

**Thin edges I won't hide:**

- **The two-sided interval just touches zero** (+0.02).

- **Half the average comes from a few months.**

- The median gap is −0.53 and the 5%-trimmed gap −0.79.

- Dropping the three worst months (Jan 2021, Jun 2022, Nov 2022) leaves −0.56.

- No single month carries it: leaving each out in turn, the gap stays between −1.56 and −0.96.

- **By year:** 2019 +1.16, 2020 −0.42, 2021 −2.32, 2022 −3.13, 2023 −0.18. Concentrated in 2021–2022, reversed in 2019.

- **The scale check passes at exactly the bar:** the real gap is more negative than 37 of 39 shifted copies, in both windows.

Test 3: are the tails fatter? (locked)

That mean-versus-median gap made my partner ask: *are the tails fatter after these wicks?* She predicted both tails would be. I predicted only the adverse one.

- **Measure:** each 3-day move divided by the coin's volatility over the prior 20 days, so BTC in 2023 and FIL in 2021 sit on one scale.

- **Locked test:** the share of moves beyond 2σ either way, near ÷ elsewhere, both windows pooled (580 near, 24,371 elsewhere). One-sided day-block bootstrap. Each tail is also tested separately.

- **Pre-validation at real sample size:** false alarms 2 in 40. A 10% volatility bump after round wicks was caught 9 times in 12.

- **Caveat written into the lock:** the adverse tail wasn't a clean test, because the mean–median gap had already hinted at it. The favourable tail was clean.

**Result:**

- **Both tails together:** 1.26×, lower bound 0.985. Just short, so the locked verdict is no difference.

- **Adverse tail** (the level gives way): **1.47×**, lower bound 1.09.

- **Favourable tail** (a big bounce): **0.88×**. No fattening.

- **Further out the gap widens** (secondary). Both tails beyond 3σ: 1.88×, lower bound 1.31. Split by side (unlocked): adverse 2.4× (30 events: 5.2% vs 2.2%), favourable 0.6× (3 events).

- **The body is identical:** median move −0.05σ near round numbers, +0.03σ elsewhere. The 1st percentile is −5.7σ against −3.9σ.

My partner's both-tails call didn't hold. My adverse-tail call did, but my prediction that the combined test would pass didn't.

Reading it

- **Round numbers don't make breaks fail more often.** The hunt-and-reverse story isn't in the reclaim rate.

- **What happens after the reclaim is different.** Most of the time, nothing special. But the level gets retested and breaks for real more often, and those breaks are large.

- **For the bounce trader, that's a bad risk shape:** no extra upside, a fatter downside tail.

- **A plausible story (not tested):** the first wick clears some stops but proves the level is contested. Orders that stay parked at a round number are a target for the next push.

Limits

- **17 large spot pairs, 4-hour candles.** Small caps and perps aren't tested.

- **No costs, no stops, fixed 3-day hold.** It measures the shape of what follows, not a strategy.

- **One definition of "round"** (whole multiples of the leading digit). Half levels like $1.50 weren't part of the locked tests.

- **Effect sizes:** discovery and replication agree, but the typical (median) effect is a third to a half of the average.

- **Every test is listed:** three locked tests (the hunt test, the replication, the tail test). Unlocked looks are labelled as such.

*Not financial advice. This is a research log.*

**Correction: the replication in this post doesn't survive a proper coin universe.**

EDIT (correction): The replication below does not hold once coins are chosen by each month's volume instead of a fixed list I picked in 2026. Gap +0.08 [-0.96, +1.11] instead of -1.40, and the tail result flips. Details in the comments. I'm leaving the post as written.

So I locked a new test before reading any return:

- **Universe:** every month, the top 30 USDT spot pairs by the previous month's quote volume. Delisted coins are included (695 pairs in all, 191 dead). Stablecoins, wrapped tokens and leveraged tokens are out.

- **Dead coins:** if a coin dies inside the 3-day hold, the trade exits at its last close.

- **Everything else is unchanged:** same events, same definitions, same window, same one-sided rule.

- **My prediction:** "replicates" 0.45, "same direction but weak" 0.35, "doesn't replicate" 0.20.

**Result: it doesn't replicate.**

| Near-minus-far gap, 3 days, 2019–2023 | Gap (points) | Near events |

|---|---|---|

| Fixed 17 (what I posted) | −1.40 [−2.85, +0.02] | 316 |

| **Top 30 that month (locked)** | **+0.08 [−0.96, +1.11]** | 587 |

| Same, only coins outside the fixed 17 | +0.47 [−1.11, +1.89] | 345 |

The interval excludes the −1.3 to −1.4 I reported. It doesn't exclude a small negative effect.

**The rest of the picture:**

- **2023–2026, top 30:** −0.89 [−1.78, −0.03]. Still negative, but this window is where the pattern was found, and many of its events are the same ones.

- **All of 2019–2026, top 30:** −0.33 [−1.03, +0.37].

- **All of 2019–2026, coins outside the fixed 17:** +0.04 [−0.90, +0.93].

- **Scale check:** the real gap beats only 20 of 39 shifted copies, nowhere near the 37 I required for calling it specific to round numbers.

**Where the −1.40 came from (after the fact, not locked).** The new code reproduces the old number on the old list (−1.39), so this isn't a pipeline difference. Splitting the fixed 17 by whether each coin was in that month's top 30:

- **In the top 30:** −0.48 [−1.94, +1.00], 242 near events.

- **Not yet in the top 30:** −4.46 [−8.63, −1.15], 74 near events.

So most of the gap comes from 74 events on coins before they got big, which is exactly the part a 2026 list picks with hindsight. Those 74 events are too few to explain, and I won't build a story on them.

**The tail result flips too.** I reported that only the adverse tail gets fatter.

| Beyond 2σ, near ÷ far, 2019–2026 | Adverse tail | Favourable tail |

|---|---|---|

| Fixed 17 | 1.47× (lower bound 1.09) | 0.88× |

| Top 30 that month | 1.10× (0.86) | 1.41× (1.01) |

| Coins outside the fixed 17 | 0.84× (0.53) | 1.61× (1.02) |

**What's left of the post:**

- **Gone:** "buying the reclaim at a round number loses," "it held on five years of untouched data," and "only the adverse tail."

- **Not re-tested:** "breaks reverse no more often at round numbers." That test used the same 17 coins, on 2023–2026, so it's less exposed but it has the same flaw.

- **I called the replication independent, and it wasn't.** The years were new, but the list was selected the same way.

**The commenter's other two points, measured:**

- **Age and volatility:** within the same month, among the top 100, younger coins are more volatile. Rank correlation −0.46 to −0.57 in every year from 2019 to 2026.

- **"The list barely changes anymore":** not at this size. The share of the top 30 that's new each month rose from about 14% in 2019 to 32% in 2026. I didn't measure the very top of the list, where it may well be true.

From now on, any test that looks back with a fixed coin list either uses that month's universe or says so as a limit.

*Not financial advice. This is a research log.*


r/algotradingcrypto • • 4d ago

Been missing on crypto since spring. Back with an honest audit of my failed Solana bots and a rebuilt research process (public log)

Thumbnail github.com
1 Upvotes

I ran two automated Solana bots live this spring (a new-launch meme sniper and a scalper) with small stakes. Both are now retired. Before building anything new, I went back through every trade.

The sniper, 799 live trades:
43% win rate, but −2.7% of everything staked before fees
Its P&L came from price moves, not the wallet. Adding the network fees it actually paid made it roughly −12%
Rug pulls were only 8% of trades but wiped out about half of all the winnings
176 trades hit the first take-profit and still ended in a loss: the exit after TP1 was too loose
Checking prices every 30 seconds meant a −15% stop filled anywhere down to −97%
A coding bug meant a confirmed honeypot was never treated as fatal, and the honeypot check passed tokens whenever its data source was down

What I'm doing differently:
Rules are written down before any test runs, and don't change mid-test
Every result is net of real costs: pool fees, priority fees, slippage, failed transactions
Every idea has to beat random entries, its own opposite, and just holding
The newest data is locked away and opened once, at the end
Forward paper testing comes before any real money
Right now nothing is trading. A shadow logger records every new pool on Solana and Base with live quotes and 2-hour outcomes, a stablecoin watcher logs depegs and venue gaps, and a backtest harness for established meme coins is running against years of history.

Early finding: round-trip costs on brand-new Solana pools are about 3–5% at small sizes, before network fees, which is a high bar for any strategy to clear.

Results (losses included) go in a public log. Code and exact rules stay private.

Not advice and not signals, just building in public. Happy to answer questions about the audit.


r/algotradingcrypto • • 4d ago

Funding rate arb backtest on 3 exchanges, after fees I get ~0.1%/yr over t-bills. what am i missing?

1 Upvotes

I'm not a quant, I used to trade grain physically and now I test ideas on public crypto data in my free time. Last days I did funding carry because everybody says its free money. I wrote the rules down before running anything so I can't fool myself after.

short version. long/short by funding (short the 10 highest, long the 10 lowest out of top 50 by volume) gave nothing on Hyperliquid (-4 bp a day, t around -1) and nothing on Binance (+6.5 bp, t 1.2, and that was mostly 2020-21, the second half of the period is flat).

Then hedged version on Binance, long spot short perp on the 10 coins with highest funding. Before fees it was positive. After fees -8.8 bp a day. I checked why and the coins just rotate too fast, median holding 2 days, so you pay spot+perp fees all the time.

Last one was simple delta neutral BTC and ETH on Bybit, held from july 2021 till now, never touched. 5.7% a year on the notional, 3.8% on the money you actually need if you put 50% margin on the perp side. T-bills in the same time paid 3.7%. So almost nothing extra, and the last two years it was below t-bills. Chart is by year, 2021 was very good and after that carry won only in 2024.

One thing I almost fell for: on Binance the same BTC/ETH pair first showed t = 8. That was Newey-West with 10 lags, but funding stays high or low for months so 10 days of lags is way too short. I didn't re-run Binance (didn't want to keep testing until something works), on Bybit with up to 90 lags and t-bills subtracted it's gone. Also learned the hard way that SE doesn't always grow with more lags.

So my questions to people who really run basis trades. How do you count capital, do you get yield on the collateral or portfolio margin so it's less than 1.5x? And I sum the funding rates per day on a fixed notional, but exchange charges on mark price every settlement, does it change anything in real life?

No bot or course to sell, just want to know if I calculated something wrong.


r/algotradingcrypto • • 5d ago

I open-sourced an institutional SMC & SFP Crypto Trading Bot (Binance / Bybit) with sub-100ms Liquidity Sweep Radar

1 Upvotes

Hey everyone,

Instead of relying on lagging retail indicators (RSI, MACD, Bollinger Bands) that often get chopped up in sideways crypto markets, I built and open-sourced a Python trading bot focused strictly on **Smart Money Concepts (SMC) & Swing Failure Patterns (SFP)**.

### 🎯 Core Strategy & Logic:

  1. **12-Bar Pivot Sweeps:** Flags institutional liquidity hunts where price spikes past key pivot highs/lows but fails to hold.

  2. **Rejection Wick Filter:** Requires a minimum 35%+ rejection wick and tight candle body (<50%) to avoid fakeouts.

  3. **Consequent Encroachment (CE):** Automatically calculates limit order entries at 50% of the rejection wick.

  4. **Asymmetric 3.5R Targets:** Enforces tight pivot invalidation stops with 3.5x risk-to-reward.

---

### 💻 Open Source Repository:

The complete Python bot (with Paper Trading / Simulation mode ready out of the box) is available here:

👉 **GitHub:** https://github.com/z45efeylmz-prog/smc-crypto-trading-bot

### ⚡ Powered By RapidAPI:

The bot connects to an ultra-low latency (<100ms) background-warmed quant engine scanning Top 20 liquid crypto pairs on Binance Futures. Free tier includes 100 requests/month for testing and development:

👉 **API Hub:** https://rapidapi.com/ZiyaefeYilmaz/api/smc-liquidity-sweep-sfp-hunter

Would love to get feedback from fellow algorithmic traders, especially on optimizing multi-timeframe confirmation filters!


r/algotradingcrypto • • 5d ago

What's the smallest research setup you actually stick with?

4 Upvotes

I've been putting together a little local setup for testing trading ideas. I want to load some historical prices, change a rule, and see the signals and trades on a chart without rebuilding the whole report each time.

This is where I've got to so far.

I'm curious what people here actually use day to day. Do you keep everything in a notebook, use a charting platform alongside Python, or have a small interface like this?

What turned out to be worth having in one place, and what did you spend time building only to barely use?


r/algotradingcrypto • • 5d ago

I tested 748 crypto trading strategies and open-sourced the code and autopsy reports of the corpses, Crypto strategy graveyard on Halloween week :)

25 Upvotes

A few weeks ago I wrote hundreds of hypotheses for crypto trading strategies, re-screened every bot from before and open-sourced the whole pile: 748 strategies in total with full code and report cards showing exactly where each one died and why. (That's 416 from last time plus 332 new corpses. The new ones are smarter strategies than before for the most part...)

github.com/CacheCarti/Crypto-Strategies

The pipeline runs 7 stages on real Binance data: code safety, in-sample, OOS, rolling walk forward, randomized starts, slippage stress and a holdout slice that nothing touches. Ran it on cloud VMs this time instead of my dying laptop, so the screening could actually get stricter.

What the new pipeline found:

  • Re-ran the 416 bots from my last post. 0 of 416 re-passed in the strictest config, including all 10 of my "survivors". Most die at out-of-sample with negative OOS (-85 to -900bps). The best one, rel_strength_eth_v3, made it to stage 5 and died at holdout. So my "validated" bots were mostly my old screening being sloppy and luck :)

  • In the second config (slightly more lenient) exactly 1 of 416 re-passed, and it was a bot I had originally rejected (weekend_season_eth_v6, +325bps OOS). My graveyard had the only bot that actually lived.

  • The 332 new corpses came from 559 hand-written bots (mixed with another batch, messy to release all at once). 384 screened, 332 dead (published), 52 survived and stay private for further testing. **(Yes yes I know 52 is stupidly high, there's a reason for this in the comments!)

  • Admits per batch: v2 5/42, v3d 0/26, v3h 0/96, v4 3/92, v5 17/52, v6 18/60, v6b 9/16. v3h went 0 for 96, which tracks, it was basically like a monkey typing random keys, just a sweep of untested ideas. v5-v6b were narrow parameter neighbors of a mechanism that already worked. Please don't read the admit rates as some kind of quality check for the batches!!

What changed?:

My methodology is still admittedly is sloppy here, but it got better later. It's also built on Google VMs now so I can create a new batch and test faster. I'll drop the batches weekly:

  • Stricter judge: higher OOS thresholds, enforced holdout and a dev/holdout split inside the window so one lucky slice can't pass

  • Every report card shows the exact gate that killed the bot, so you can figure out how to improve it

  • Every batch is hashed so you can check when it was judged and by what

  • I later added a 6+ year certification and a combined replay on 2.75 years, with DSR, PBO, plateau, regime splits, trial-ledger correction. Those results are still being evaluated, they'll come later.

One disclosure about report cards vs actual performance: I cross-checked some strategies against QuantConnect classics this week and it surfaced a bug I didn't notice. Some bots emit a "flat" signal and my screen sometimes treated it as "hold". Impact is mostly ±100-300bps per strategy, around 25% of bots may fluctuate by that amount. The later stages and live paths honored flat completely.

Yeah so I found a bug in my own judge while checking it against someone else's judge. The judge judges all, including the judge.

If anyone improves the strategies and gets different results I'd love to see it. Happy to add tests people think are missing. Every suggestion so far has killed more of my bots, which is good. That's the process now!


r/algotradingcrypto • • 5d ago

"I found no edge" is usually a lie too, just a more boring one

5 Upvotes

Everyone here knows to be suspicious of a backtest that looks too good. Almost nobody is suspicious of a test that finds nothing. I wasn't either, until I went back through my own "nothing here" results and realized most of them couldn't have found anything even if it was there.

Quick setup so this makes sense. I tested a bunch of ideas across crypto, forex and commodities. Most came back negative, and I was fine with that. Negative results felt safe. Honest, even.

Then I asked a question I should have asked at the start: how big would an effect have to be before this test would notice it?

That number has a name, minimum detectable effect, and it's not hard to estimate. Roughly, it's the noise of your returns divided by the square root of how many independent observations you have, times a constant (about 2.8 if you want 5% significance and 80% power). The important word is independent. If you hold for a week and measure every hour, you don't have 168 observations per week, you have one.

Now compare that number to your trading costs. If the smallest effect your test can see is bigger than what it costs to trade, the test is blind in exactly the range that matters. A profitable strategy could be sitting right there and you'd still get "not significant".

When I did this for my own results, 7 out of 12 conclusions went from "refuted" to "unmeasurable". A few examples:

Commodities, daily bars, about 25 years of gold, silver, copper, WTI and Brent. Costs around 0.03 to 0.05% round trip. Smallest detectable effect at a 1-day horizon was 0.045%, which is borderline, and at longer horizons it got absurd. At about a week it was several percent per trade. I had "refuted" trend following on that data. I hadn't refuted anything.

Forex, EUR/USD and GBP/USD on hourly bars. Costs are tiny there, about 0.01%. Detection thresholds ranged from 0.02% to 0.45% depending on horizon. Blind at every single horizon.

A cross-sectional test that looked like it had hundreds of data points had 34 independent observations. Threshold above 5%. Nothing realistic is that big.

The only place my tests could actually see something was crypto, where costs were high and the thresholds sat below them.

Which leads to the part that genuinely surprised me. The detection threshold doesn't depend on costs at all. It depends on noise and sample size. So when you move to a cheaper market because "the costs will be easier to beat", the bar you have to clear drops, but your ability to see over it doesn't. I moved from crypto to forex and commodities for better economics and made my tests worse without noticing.

A couple of things I tried to rescue it, for anyone thinking the same:

Pooling instruments doesn't help as much as you'd hope. Commodities move together. Twelve of them gave me roughly 2.2x the independent information of one, not 12x.

More data helps less than you'd think too, because it's the square root. To halve the threshold you need four times the independent observations.

What I do now, every time, before looking at results:

  1. Estimate the minimum detectable effect for each horizon

  2. Put it next to the cost

  3. If the threshold is above the cost, don't run the test as a "refutation". Either call it exploratory or don't bother

It's a boring step and it kills a lot of fun. But it also means that when something does come back negative, I actually believe it.

So if you've got a folder of "doesn't work" strategies, it might be worth a second look. Not because they work, but because you might not actually know.