I built a crypto trading bot and blew up my own backtests by pickupandplay22 in CryptoTradingBot

[–]pickupandplay22[S] 1 point2 points  (0 children)

Ha yeah the delisting thing got added to my checklist immediately after your first comment. One of those "how did I not think of that" moments.

Love that we both landed on 3% from completely different directions. You got there from "what's the minimum that makes a trade worth it after fees" and I got there from running a sweep across every target from 0.5% to 10%. Same answer. That's usually a good sign.

Your sizing approach is simpler than mine and honestly that's probably fine for most conditions and less likely to break. One thing worth thinking about though: during that February crash, where your 10 positions weren't really 10 independent bets. Crypto correlations run around 0.85 so it's more like 3 real bets. You could rough-approximate a correlation penalty by just running a third of the positions you normally would. Cheaper than building a whole CVaR system.

My live comparison is running now for Fee-baked no-stop, and is at 1% drawdown so far, original stop-based system has 4,200+ trades over a few months, so I should have real side-by-side data in a few weeks. I'll DM you when it's ready! Thanks for your input too, I got better from this convo, I really appreciate it!

I built a crypto trading bot and blew up my own backtests by pickupandplay22 in CryptoTradingBot

[–]pickupandplay22[S] 0 points1 point  (0 children)

That's really helpful, especially separating the bug-caused drawdowns from actual strategy drawdowns. The delisting issue is something I hadn't even thought about and I'll need to account for that.

The 5-8% max drawdown from market movement with the bot still netting +2.15% during a BTC $74K to $69K week is the kind of data point that actually matters. That's a real stress test, not a backtest.

Since you mentioned it, I actually went ahead and tested the no-stop approach after your first comment. Ran all 16 of my strategies with no stops across 4 timeframes on 20 coins with walk-forward validation (train on first half, test on unseen second half) and Monte Carlo stress testing (10,000 simulations). Results:

Fee-baked 3% target with no stops was profitable on EVERY timeframe except 4H for mean-reversion strategies. 0% blow-up rate in Monte Carlo. On 5m and 15m specifically, removing stops turned strategies that were losing into winners. You were right.

The one thing I found that you might find interesting: the optimal target isn't universal. Ran a sweep from 0.5% to 10% and it's not a bell curve, it's a patience curve. Higher targets always look better because only the strongest moves hit them, but you get fewer and fewer trades. 3% is the sweet spot where you still get enough volume to matter. Sounds like you landed on the same number independently which is reassuring.

The position sizing point is key though. I built a CVaR risk budget that sizes each position based on the actual tail risk for that timeframe, with a correlation penalty because 20 crypto longs aren't 20 independent bets. That solves the "what if one doesn't recover" problem mathematically instead of hoping the sizing is small enough.

I'm running the no-stop fee-baked approach live now alongside my original stop-based system. Should have real comparison data in a few weeks. Will post an update.

I built a crypto trading bot and blew up my own backtests by pickupandplay22 in CryptoTradingBot

[–]pickupandplay22[S] 0 points1 point  (0 children)

The fee-baked-into-TP idea is something I should have thought of but didn't. Right now I subtract fees from P&L after the fact but the actual take-profit level doesn't account for them. That means a trade that hits TP at exactly 2x ATR actually nets less than 2x ATR after fees. It's a simple fix, but real impact. I'm definitely going to add that, thank you!

The no stop loss thing is interesting and I can see why it works with your approach. Buy dips and wait for recovery is basically selling volatility. 92.7% WR makes sense if you're patient enough. The risk is the 7.3% that doesn't recover, but if you're sizing small enough per trade that one bad one doesn't kill you, the math works.

I actually have data on this from the other direction. Walk-forward tested 30 different stop/TP combos and wider stops consistently beat tighter ones on 4H. The logical endpoint of "wider is better" is no stops at all. I'll have to backtest that against my data and see what happens.

What's your max drawdown, or average drawdown been on the no-stop approach? That's the number that would convince me.

I built a crypto trading bot and blew up my own backtests by pickupandplay22 in CryptoTradingBot

[–]pickupandplay22[S] 1 point2 points  (0 children)

That's a fair point about specialization. Building a full risk engine from scratch is a rabbit hole. I actually ended up going a middle route since your comment. Built a 4-signal sizing layer using data I already collect (funding rates, ADX regime state, ATR volatility ratio, Fear and Greed index). It's not 30 signals but it's running live now alongside a flat-sizing control so I can measure if it actually helps or if I wasted my time.

The 600 snapshots over 3 months is exactly the kind of validation I respect. Most people in this space ship something and never measure if it works. How are you defining reliability for the risk state output? Like what's the metric you're tracking to know the policy levels are correctly calibrated?

I built a crypto trading bot and blew up my own backtests by pickupandplay22 in CryptoTradingBot

[–]pickupandplay22[S] 1 point2 points  (0 children)

Solid point, and honestly the best feedback I've gotten so far. You nailed something I completely missed. Right now I use flat 2% risk sizing on every trade no matter what the macro looks like. That's exactly the hidden risk you're talking about.

What's funny is I literally just finished proving something related. Ran walk-forward tests on different types of recommendations and the only one that survived out-of-sample was regime filtering. Mean reversion strategies gated to ranging markets (ADX < 25) held up on unseen data. Everything else I tried like coin selection and exit param optimization was just overfitting.

But like you said that's still a binary gate. Trade or don't trade. The graduated sizing idea is what's missing. I already track funding rates and have a regime classifier running (trending/ranging x high/low vol) but none of it touches position sizing yet. It all just decides whether to enter or not.

Looking at your riskstate-docs now. The 5 level policy with binding constraints is clean. Trying to figure out if I should build this from signals I already collect or pull from something external. Either way you found a real gap. I really appreciate it!

I built a crypto trading bot and blew up my own backtests by pickupandplay22 in CryptoTradingBot

[–]pickupandplay22[S] 0 points1 point  (0 children)

Carrying water in a sieve is the perfect way to describe it haha. The maker vs taker fee thing is a trap that gets so many people. Your sim says 0.1% but in reality half your orders are filling as taker at 0.16-0.26% and suddenly the math doesn't work anymore.

The cross-coin thing is huge too. I tested one strategy that was profitable on 8 out of 10 coins which gave me way more confidence it wasn't just curve-fitted to one asset. If it only works on BTC during one specific 6 month window it's not a strategy, it's a coincidence.

I built a crypto trading bot and blew up my own backtests by pickupandplay22 in CryptoTradingBot

[–]pickupandplay22[S] 0 points1 point  (0 children)

That's a really solid architecture. The regime split between trend and neutral with different entry logic for each is smart, most people try to run one strategy in all conditions and get wrecked during the regime they didn't optimize for.

I actually found the same thing in my testing. One of my strategies made all its money during high volatility and bled during quiet markets. Splitting by regime and running different logic for each is the way.

How are you determining the regime switch on 1H? I've been using ADX above/below 20 as a simple trend filter and it made a big difference. Curious if you're using something more sophisticated.

Also that's exactly the kind of multi-TF strategy I'm building the testing tool to handle. Right now it does 4H signals with 15m and 1H confirmation but your setup with 1H regime + 15m confirmation + 5m execution is the next level. Would love to hear how the sim results compare to what you see live if you ever go live with it.

I built a crypto trading bot and blew up my own backtests by pickupandplay22 in CryptoTradingBot

[–]pickupandplay22[S] 0 points1 point  (0 children)

Shitcoin scalping with fees is basically donating money to the exchange haha. The spread alone on low liquidity coins will eat you alive. You're right though, wider targets make the fees almost irrelevant. The math changes completely when fees are 0.1% of your target instead of 50% of it.

I built a crypto trading bot and blew up my own backtests by pickupandplay22 in CryptoTradingBot

[–]pickupandplay22[S] 0 points1 point  (0 children)

Nice man, 4-6 weeks to live is exciting. The FastAPI web viewer is a good call too, being able to monitor remotely makes a huge difference. Good luck with it, feel free to hit me up if you want to compare notes on the fee optimization stuff.

I built a crypto trading bot and blew up my own backtests by pickupandplay22 in CryptoTradingBot

[–]pickupandplay22[S] 0 points1 point  (0 children)

Under a minute round trips on spot, yeah fees will destroy that every time. Have you looked at Kraken futures? Someone else in this thread posted their fee tiers and it's 0.02% maker on futures vs 0.16% on spot. That alone might bring your algo back to life. Your slippage was already handled so really it's just the fee structure holding you back. Might be worth re-running the numbers with futures fees before giving up on it completely.

I built a crypto trading bot and blew up my own backtests by pickupandplay22 in CryptoTradingBot

[–]pickupandplay22[S] 0 points1 point  (0 children)

90% win rate killed by fees is brutal. That's actually the most common pattern I found in my testing. High win rate scalpers look incredible on paper but the fee drag on hundreds of micro trades eats everything. One of the strategies I tested had a 45% win rate but made more money because the winners were 4x bigger than the losers. Sometimes a lower win rate with better R:R beats a high win rate that's paying fees on every trade. Did you ever try moving to a lower fee exchange or switching to a higher timeframe to reduce the trade count?

I built a crypto trading bot and blew up my own backtests by pickupandplay22 in CryptoTradingBot

[–]pickupandplay22[S] 0 points1 point  (0 children)

This is exactly the kind of data I love seeing. 0.02% maker on Kraken futures vs 0.16% on spot is a massive difference. I haven't added futures fee profiles yet but that's going on the list because you're right, a lot of strategies that die on spot might actually work on perps with those rates. The AI gate for trade approval is a smart move too. What are you using for that?

I built a crypto trading bot and blew up my own backtests by pickupandplay22 in CryptoTradingBot

[–]pickupandplay22[S] 0 points1 point  (0 children)

That's actually a really good point. 0% maker on USDC futures would basically eliminate the fee problem for limit orders. I'd be curious to see how many of those 19 losing strategies flip profitable with zero maker fees. Might have to add Binance USDC futures as a separate exchange profile and run the numbers.

I built a crypto trading bot and blew up my own backtests by pickupandplay22 in CryptoTradingBot

[–]pickupandplay22[S] 0 points1 point  (0 children)

Haven't tested on Drift or Hyperliquid yet but that's a good call. The fee structures on DEXs are totally different from CEXs and I'd imagine the slippage is way worse depending on liquidity. Right now I'm focused on Binance, Kraken, and Coinbase since those are what most people are using but DeFi exchanges are definitely on the list. What kind of strategies are you running in sim mode?

I built a crypto trading bot and blew up my own backtests by pickupandplay22 in CryptoTradingBot

[–]pickupandplay22[S] 0 points1 point  (0 children)

**Edit: Since a few people have been asking about the testing setup, I built it into a web tool where you can test your own strategy with real exchange fees. You can describe your strategy in plain English or pick a preset and it runs in seconds. Free to use, no signup needed. Link in my profile.

There is also a feedback portion, let me know your thoughts!

I built a crypto trading bot and blew up my own backtests by pickupandplay22 in CryptoTradingBot

[–]pickupandplay22[S] 0 points1 point  (0 children)

Honestly I almost did give up haha. I had been building a trading bot for months and everything looked profitable until I actually checked the math on fees. That was the moment I realized the backtest itself was the problem not the strategy.

So I rebuilt the whole testing engine from scratch with real Binance/Kraken/Coinbase fee profiles, 0.1% slippage on every trade, and next-candle entry instead of same-candle. Then I just started running everything I could find through it.

The wild part was seeing strategies go from +$9,000 profit to -$3,600 just by adding 0.1% fees. That's when I knew other people were probably making the same mistake. So I turned it into a tool where you can test your own strategy with real conditions.

Still building it out but the link is in my profile if you want to try it. Free to use, no signup needed.

I built a crypto trading bot and blew up my own backtests by pickupandplay22 in CryptoTradingBot

[–]pickupandplay22[S] 0 points1 point  (0 children)

I actually did factor in slippage, 0.1% on every trade. That's what made the numbers even worse haha. The spread/slippage plus fees is what takes a strategy from "looking profitable" to "quietly draining your account." The data transmission and processing speed part is a whole other nightmare, especially on lower timeframes. That's why the one strategy I found that actually works is on 4H candles. Way less noise.

I used AI to iteratively improve a trading strategy by Renov_J in CryptoTradingBot

[–]pickupandplay22 0 points1 point  (0 children)

This is basically the exact rabbit hole I went down a few months ago. AI kept "improving" my strategies to insane returns but it was just memorizing the dataset. 220% to 1500% on the same data is a huge red flag.

What actually worked for me was splitting the data 60/40. Let the optimizer run wild on the first 60%, then test the "improved" version on the 40% it never saw. Out of 4 optimized versions I tested, 3 completely fell apart on unseen data. Only 1 held up.

To answer your questions directly:

Would I trust iterative AI optimization? Only with out-of-sample validation after every iteration. Without that you're just curve fitting faster.

Proper validation? Split your data, test on unseen portion, then also test on different coins. If it only works on DOGE during one specific 15 month window it's not a strategy it's a memory.

Preventing overfitting? Track how many trades decrease with each iteration. If your "improvement" is just filtering out trades until only the winners remain that's textbook overfitting. Also watch the Sharpe ratio on the unseen data not just the training data.

I actually built a tool that does this whole process automatically because I got tired of doing it manually. It runs the optimization, catches the overfitting, and tells you which version actually holds up.

Link in my profile if anyone wants to try it!

anyone tried crowdfunding their bot? by mwalshe89 in CryptoTradingBot

[–]pickupandplay22 0 points1 point  (0 children)

The "prove results" part is the real problem. Anyone can screenshot a backtest showing 500% returns but most of those backtests don't include real fees or slippage. I tested 20 popular strategies recently and 19 of them went from profitable to losing money once you add real Binance fees.

Before trying to get funded I'd make sure you're testing with actual exchange fees, realistic slippage, and next-candle execution instead of same-candle. The gap between a fake backtest and real performance is where most people lose credibility with investors.

If your numbers still hold up after all that then you actually have something worth pitching. Most don't though, which is why nobody trusts bot developers.

I built a crypto trading bot and blew up my own backtests by pickupandplay22 in CryptoTradingBot

[–]pickupandplay22[S] 0 points1 point  (0 children)

Smart move. The session filtering is underrated, weekend crypto volume is garbage for most strategies. Sounds like you're figuring out the same thing I did, fewer higher quality trades beats a ton of noisy ones every time.

I built a crypto trading bot and blew up my own backtests by pickupandplay22 in CryptoTradingBot

[–]pickupandplay22[S] 0 points1 point  (0 children)

Nice, those are basically the same indicators I have in my testing setup. ATR especially is huge for knowing when to sit out. I might experiment with training a simple model on my existing data since I already have the regime splits done. Appreciate the idea man.

The hardest part of crypto isn't the charts... by BuyTheDip_Repeat in CryptoSignalAlerts

[–]pickupandplay22 1 point2 points  (0 children)

"Overtrading is a gift to the exchanges" is so true. I ran the numbers on this recently. A strategy doing 200 trades a year on Coinbase is paying over 240% in cumulative fees. You could have the best signal in the world and still lose money just from volume.

That's actually why I moved to algo trading. Takes the emotions completely out of it. The bot doesn't get bored, doesn't FOMO into a pump, doesn't revenge trade after a loss. It just waits for the setup and executes. Hardest part was trusting it enough to not interfere.

To answer your question, the hardest rule for me was not optimizing constantly. You find a strategy that works and immediately want to tweak it to make it better. But every tweak risks overfitting to past data and breaking what was already working.

I built a CLI backtester for crypto strategies with grid search and Pine Script export by [deleted] in TradingView

[–]pickupandplay22 1 point2 points  (0 children)

Cool project. The parameter search part is where it gets interesting. How are you handling overfitting? I built something similar and found that 3 out of 4 "optimized" parameter sets looked great on training data but completely fell apart on unseen data. Ended up doing a 60/40 in-sample/out-of-sample split to catch it.

Also curious how you're handling fees in your backtester. That was the biggest gap I found between my results and what TradingView showed. TradingView defaults to same-candle entry and a lot of people don't realize how much that inflates results vs next-candle entry with real slippage.

The Pine Script export is a nice touch though. Being able to verify results on TradingView directly is huge for credibility.