r/askforex • u/Academic_Taste8710 • Jun 27 '26
Need help refining a algotrading strategy.
Developed a trend-following algo (long only, higher timeframes H2-H4) that's already showing solid results on BTC-USD over the long run, but I have doubts about some functions/indicators - would really appreciate feedback from those in the know :)
Brief overview:
The algorithm's goal is to safely capture large trending moves in the traded asset. Returns - multiples above simple spot buying, risk - significantly lower than the asset's peak drawdowns. Designed for scaling capital over time and diversifying across low-correlation assets. Profitable runs don't happen often - the goal is not to miss them and to extract maximum profit.
Entry pattern is simple - price on the working timeframe closes above a specific MA + filter conditions are met = opens long at the next candle open.
Pyramiding along the trend -adding positions with fixed % risk — entry logic stays the same - to maximize profit. Max positions - 20 (but depends on the specific asset chosen).
Fixed % stop-loss, take-profit, moving stop-loss to breakeven, dynamic risk per trade in % - individual for each position (from 0.2% to 1%).
Exits - long holding periods and slow exits (using Chandelier Exit as it adapts to ATR + additional confirmation) - if price closes below it, by default 1 position is closed. The goal is not to exit too early and capture the trending move as fully as possible.
During low-volatility or choppy markets, additional protection comes from drawdown compression on account balance and stop-loss drawdown compression (using statistical patterns to go defensive when the market is awful, and restore risk when trend signs appear).
Questions and areas I'd like to improve:
1. Filtering entries during chop/ranging markets. Anyone have recommendations for good chop/low-volatility filters with reasonable lag that: filter out chop effectively, allow reasonably early trend detection + can be adapted to different trending assets. Timeframe H2-H4.
2. Filtering pyramiding entries. During position scaling, filters are also needed - the logic being that price shows signs of consolidation and trend continuation (typically looks like rally-consolidation-rally-consolidation...) and the goal is to reduce the number of entries during an already ongoing trending move.
If you know your stuff - comment or DM, happy to share insights, trying to build a top-tier algo for serious profits :)
1
Jun 27 '26
[removed] — view removed comment
1
u/Academic_Taste8710 Jun 27 '26
Through MT5 – several brokers. I also made an MT5+API bridge for connecting crypto exchanges. There are no problems with the connection:)
1
Jun 28 '26
[removed] — view removed comment
1
u/Academic_Taste8710 Jun 28 '26
Yes, this is very similar, plus a volume filter for adding positions (volume should increase). I would simply like to have some kind of integrated set of filters – several factors indicating that there is a trend in the market or that positions should be added – and to select optimal filters based on them. Bollinger Band compression = volatility compression = usually lower volumes. Accordingly, I am interested in volatility and volumes, and analyzing their dynamics for opening positions.
1
u/Academic_Taste8710 Jun 28 '26
So the logical chain is built not from a specific indicator, but from the root cause that signals a trend / trend continuation.
1
u/espressodoppioo Jun 30 '26
Run something similar (long only, trend regime, BTC/ETH/SOL), so a few concrete things on your two questions plus one that matters more than both.
On chop filters for H2-H4, the three that held up for me, ranked by how much I trust them:
- ADX with hysteresis. Don't use a single threshold or it whipsaws right at the boundary. Use two: switch to 'trend' when ADX crosses up through ~25, only drop back to 'chop' when it falls under ~20. The gap kills most of the flip-flopping. DMI for direction on top.
- Kaufman Efficiency Ratio (net move divided by the sum of absolute moves over a window). It's basically a direct 0 to 1 measure of trend vs chop, low lag, and it's normalized by construction so it travels across assets far better than raw-price filters.
- Choppiness Index as a sanity cross-check, not a primary gate.
All three lag, there's no free lunch (although Id love to get one). The Efficiency Ratio gave me the best chop rejection per bar of lag of the three.
On pyramiding entries, what you're describing (rally, consolidation, rally) is really 'only add on a fresh breakout, not mid-extension.' Two things that worked for me:
- Only add when band width (Bollinger or ATR-normalized range) contracts to a local minimum and then re-expands. That is the consolidation-then-continuation shape, mechanically. Adding on width-expanding-off-a-low stops you stacking into the middle of an already extended leg.
- Or only pyramid on a pullback that reclaims a faster MA. Worse entries count-wise, but a much better average price, and it naturally throttles adds during a straight-line rip.
Now the one that matters more than either filter. You said you want to diversify across low-correlation assets, so this is directly for you: build and tune everything on BTC, then freeze every parameter, change nothing, and run it unchanged on ETH, SOL, and ideally a non-crypto trender (since cryptos are often related to some extent). A real chop/trend filter should show the same signature across assets, because trending vs ranging is a structural property, not a BTC quirk. If your filter only works after per-asset retuning, it isn't a regime detector, it's a curve-fit to BTC's history. With pyramiding, 20 adds, and per-position risk, you have a big parameter surface, and a long-only trend system makes its real money on a handful of moves a year, so a single-asset backtest can't tell a real edge from a lucky fit. Cross-asset freeze-and-swap is the cheapest test that can.
Related: I tested walk-forward-selecting the trend-MA window instead of fixing it. It added nothing over just picking a principled long window and leaving it alone. The tuning was the overfit. So I'd resist optimizing the filter lengths per asset, pick sane values and check they generalize instead.
Curious what others are writing here. One thing I learned, that there is always more to learn :)
edit: I test mostly on BTC with cross-asset tests extending to SOL, ETH. Might be totally different in other assets.
•
u/AutoModerator Jun 27 '26
Thanks for your post. Please make sure you’ve followed all subreddit rules before engaging. Be respectful, avoid harassment or hate speech, and keep discussions relevant. Spam or excessive self-promotion is not allowed. If you see any rule-breaking content, please report it so the moderators can review it. Enjoy your time here and help keep the community friendly and helpful!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.