I’m fairly new to algotrading, have been in the trading space for quite a while now. I’ve created an expert advisor for GOLD. I’ll show in the pictures below the statistics of my backtest (2 years) and forward test (2 years). The 4 year backtest is around the same.
I’ll be most likely using this strategy on prop firms as it looks very steady with strong margins and low drawdown.
It’s a very easy, not complicated strategy which I used trading manually aswell.
Please tell me if there are numbers you’d be concerned about. Appreciate every opinion on this as it would help me a lot in my journey
I've developed a bot that uses Options data from Thetadata to come up with possible reversal signals. Today it absolutely nailed it on QQQ! But I'm not sure how consistent it will be. Has anyone had success with strictly using OI/Gamma/Put-Call/etc for entries and exits over the long term?
I mean thats the end goal isnt it? If your algo is truly successful, you should be sitting on a bed of steadily growing cash. If not, whats your story?
I’m currently working with a developer on a orderflow strategy but earlier this year I created this strat that performed decent but has alot of room for improvement
The screenshot attached is trading only 6MNQ for full size positions and 3MNQ half
The main issue is the take profit targets worked better when i manually intervened and also it had no trailing stop loss (some trades would go for over 60 points but get stopped at break even )
Ways i think it get be improved
Implement a trailing stop loss logic Add some orderflow to it (vwap and volume profile levels) And figure out a better way for the targets & take profit as the bot will scale out of position
I want to share the stats of my first automated strategy on a serious live trading account and give a bit of background on how I got here. I have been working on this strategy in 2024, and my backtest results were incredibly promising. As always, I am a skeptic when it comes to backtest results, so I wanted to put it on a live account to see if the live performance could live up to anywhere near the promising backtest results.
As always, I start the live forward test on a live account at IC Markets with a $1,000 deposit and scale up if I see that the performance aligns with the backtest data. A few details:
-It's a breakout type strategy on EURUSD, GBPUSD, USDJPY, XAUUSD, and BTCUSD (CFD contracts Metatrader 4) -All trades have a fixed Stoploss, a potential risk-to-reward of 1:2 on average, and a trailing stoploss. -The screenshot is from live FXblue account tracking software
-The backtest ran from 2015-2024 with the exception of BTCUSD which only ran from 2020-2024 (lack of data) -Tested on Dukascopy Tick data with spreads and commissions set to exactly mimic the IC Markets live trading environment -The backtests had a combined profit factor of 1.43 over the nearly 10-year period -I have NOT optimized any of the settings. All parameters are rounded up to the most logical value. eg, I don't use period 57 EMA if that's giving me the best result in the backtest, I would rather take period 50 if that shows good results also (even if less good than 57). I hate to curve-fit. -Every month I check if the live performance aligns with the backtest over that same period. If it aligns (same number of trades, same equity curve shape with some margin for errors) I add more capital to the account and will continue to do so over a 12-month total allocation plan until fully allocated.
I wanted to share this with you for some inspiration, and hopefully, there is something of value in the added notes for you. My question to you is, do you think these results are good enough and promising for a long-term horizon?
Mod here. I'd like to make a call for equity curves of your favorite systems.
I'll go first: This post has the EC for an EOD system I've been screwing around with lately. This is a 100% out of sample, walkforward backtest of a monthy dynamic portfolio system that trades only stocks and TBill ETFs, with zero optimizable parameters. The red graph is SPY for the same period. Over the 25yr backtest, the system did 23/32 (CAGR/maxDD), with a maxDD on 4/14/2000.
Not perfect, but I like its smoothness and the way is sailed through 2008 and 2022. There is of course the usual survivorship bias inherent in most of these backtests, but the system was not optimized. Feel free to critique, praise, or totally shit on it as you see fit.
I'd really like to shift the focus of this sub to posts that get into the nuts and bolts of system building and encourage others to post what they are working on, systems they're particularly proud of, or even spectacular failures that didn't meet expectations.
Nobody is going to give away their secret sauce, of course. But it sure would be fun to see what others are working, on and offer critiques and encouragement.
Anyone else on board with this? If so, please contribute and show us what you've got!
15-year FX/bank-treasury IT guy here, so I have "some" experience in trading SDLC.
Running on company laptop with SSH connection to main Claude Code client on WSL2.
Post not created with AI.
8 rule-based forex/gold bots, running live on demo accounts, with a public dashboard and screenshots:
Where the strategies came from
- 200+ strategies collected from Twitter/X and trading forums, with source code in MetaTrader 4, MetaTrader 5, cTrader and TradingView Pine.
- Each one was ported and backtested on up to 6 years of tick and minute data, then screened hard. Most failed; the site's About page lists what we rejected and why.
- The core "6/6 agreement" family is built on Ata Sabancı's open-source TradingView indicator Smart Trader, Episode 06, Isotropic Trend Lines. Credit to him.
The AI setup
- Me: domain knowledge, risk limits, and the final call on anything that touches an account.
- Claude Code (Opus 5.5): orchestrator and reviewer. It writes the test plans, splits work into parallel lanes, reviews every diff, and mutation-tests the tests: it breaks the code on purpose to check that a test fails.
- DeepSeek via Command Code / OpenCode: the cheap "mundane coder" for bulk porting and backtest plumbing. It runs in a sandbox with no credentials and gets no trust: Claude reviews everything it writes.
- Opus 5.5 (high effort): the "expert coder" for the hard parts, such as the cTrader execution engine, position reconciliation and restart safety.
The Deflated Sharpe Ratio explained simply: why testing 100 strategies can turn a 1.5 Sharpe into a coin flip
TLDR: The Deflated Sharpe Ratio takes your backtest Sharpe and corrects it for how many strategy variations you tested before keeping the best one. The more combinations you try, the more luck inflates your winner, so the DSR lowers your real odds. It turns a Sharpe number into a probability: the chance your edge is real and not luck.
What is the Deflated Sharpe Ratio?
The Deflated Sharpe Ratio is a corrected Sharpe ratio that accounts for how many times you tried before you found a good result. The first time I ran a parameter sweep, I found a backtest with a 2.5 Sharpe and felt like a genius. Then I ran the DSR on it and learned my genius strategy had close to a coin flip chance of being real.
A normal Sharpe ratio measures return per unit of risk and quietly assumes you tested one strategy. The DSR drops that assumption. It asks the question that actually matters: out of all the variations you tried, is your best one genuinely good, or is it just the luckiest result from a lot of attempts?
Instead of handing you a ratio, it hands you a probability. A DSR of 0.95 means a 95 percent chance your edge is real.
Why does a normal Sharpe ratio lie when you test many strategies?
Because the moment you test many variations and keep the best, the best one is partly luck, and the plain Sharpe has no idea that happened.
Say you test one strategy and it posts a 1.5 Sharpe. That is one honest result. Now say you test 200 versions, tweaking the moving average, the stop, the session, and you keep the single best. That winner did not just beat the market. It beat 199 siblings, and some of that winning is skill while some is just the luckiest draw in a big sample.
The plain Sharpe reports the winner as if it were your only attempt. It can't see the 199 you threw away. So it overstates how good the strategy is, and the more you tested, the bigger the lie.
Why do more combinations lower your Deflated Sharpe?
This is the part that confuses people, so here is the simplest version I know.
Picture a coin flipping contest. One person flips ten coins and gets eight heads. Mildly impressive, maybe a bit of luck. Now put a thousand people in the contest, all flipping ten coins each. Someone will flip ten heads out of ten. Are they a coin flipping genius? Of course not. With a thousand tries, a perfect run was basically guaranteed by luck alone.
Your parameter combinations are the contestants. Every variation you test is another person flipping coins. Test one combination and a strong Sharpe means something. Test a thousand and the best Sharpe in the pile is exactly what pure luck produces, because you gave luck a thousand chances to look like skill.
The DSR knows how many contestants you entered. It works out the Sharpe you would expect from the luckiest of your N tries, then checks whether your result beats that luck benchmark. More combinations push the benchmark higher, so your result has to clear a taller bar to prove it is real.
Here is the same 1.5 Sharpe run through the DSR, changing only how many combinations I tested before keeping the best:
Combinations tested
DSR, the chance your edge is real
1
99%
5
86%
20
60%
50
43%
100
32%
500
14%
1000
9%
Same strategy, same Sharpe, every single row. The only thing that changed is how many times I tried before keeping the winner.
Test one combination and a 1.5 Sharpe is almost certainly real. Test 1000 and the same 1.5 Sharpe is a coin flip.
What number does the DSR actually give you?
A probability, not a ratio, and that is the whole point. The output sits between 0 and 1, and it reads as the chance your true Sharpe is above zero once luck is stripped out.
My cutoff is 0.95. If the DSR says there is less than a 95% chance the edge is real, I do not trade it, no matter how pretty the equity curve looks. A 1.5 Sharpe that comes back at 43% is not a strategy. It is a maybe, and a maybe doesn't get capital.
What is the best protocol if your first config is already profitable?
Treat it as the most valuable result you will ever get, and protect it by not searching further. A profitable first try is clean precisely because you did not go hunting, so there is no selection luck to correct, and that makes it the strongest kind of result in trading.
Write down that this was config number 1 before you touch anything, because the moment you start tweaking you lose the right to claim it. Run the DSR at a trial count of 1 anyway, since even one result can be noise from a short sample, and confirm it clears your bar. Check the sample is big enough too, because a profitable first try on 60 trades is luck, not an edge.
Then be honest about your stopping rule. If this config had failed, how many more would you have tried? If the answer is a lot, your real trial count is that planned hunt, not 1, so rerun the DSR at that number. If it survives all of this, validate it on out of sample data rather than more combinations, then size small and trade it. Do not optimize a clean winner into an overfit one.
A profitable first config is clean precisely because you did not search. Protect it by not searching now.
When should you actually use the DSR?
Any time you picked a winner out of many tries. That covers more situations than people admit.
Parameter optimization is the obvious one. So is any machine learning model, which secretly tests huge numbers of combinations during training. So is the everyday habit of running ten backtests and trading the best looking one. If you searched, selected, or optimized in any way, you ran multiple trials, and the DSR is how you correct for it before risking money.
What do you need to compute it?
Four inputs: your reported Sharpe, the number of variations you tested, and the skew and kurtosis of your returns, plus the length of your sample. Open source code exists, so you do not need to derive anything.
The hardest input is honesty about the trial count. People remember the 5 backtests they saved and forget the 80 they deleted. If you lowball the number of combinations, the DSR flatters you, and you are back to fooling yourself. Count every variation you actually tried, including the dead ones.
What the DSR does not fix
It is a correction, not a crystal ball. The DSR tells you whether your result survived the luck of testing many combinations. It says nothing about whether your edge keeps working after costs, after slippage, or after the market regime changes. A high DSR on a strategy that dies the moment fees touch it is still a dead strategy.
It also depends entirely on an honest trial count. Feed it a lie about how many combinations you tested and the output is meaningless. Garbage in, garbage out.
Bottom line
The Deflated Sharpe Ratio corrects your Sharpe for how many strategy variations you tried before keeping the best. More combinations means more chances for luck to fake skill, which raises the bar your result has to clear and lowers the probability your edge is real. The same 1.5 Sharpe can read as 99% real after one test and 9% real after a thousand. Use it before trusting any optimized backtest, and be brutally honest about how many combinations you actually ran.
This is for traders and researchers who optimize, search, or select among backtests. The correction applies to any strategy, any market, and any model trained on price data.
Ran a proprietary intraday breakout system across all 11 SPDR sector ETFs on 15min bars. 584 trades over 6 months. Not sharing signal logic since I'm trading it live but wanted to share some findings that surprised me.
53.7% WR, 2.28 PF, 10/11 ETFs profitable. Both long and short contributed almost equally which was unexpected because on daily bars the shorts were a total disaster. Same exact system, completely different behavior on a different timeframe. If you're only testing on one timeframe you're potentially missing the one where your system actually works.
Most interesting finding was the holding period distribution. Under 1hr holds had a 30% WR and dragged everything down. 5+ hour holds hit 91% WR and generated most of the P/L. All the edge is in the trades that run. The chop kills you on quick exits. Still trying to figure out if there's a way to filter the short holds without lookahead bias.
Also modeled 1DTE ATM options on every signal since the system catches low-vol periods before moves. Black-Scholes said +31% return on premium. Pulled real chains on live signals and the math completely fell apart. Winners barely move a decaying 1DTE contract but losers torch 70-90% of premium. System relies on small frequent wins with tight stops which is perfect for shares and terrible for short dated options. Glad I figured that out on paper and not with real money.
Transaction costs: $0.02/side slippage leaves 68% of gross intact. Livable but not fat.
Running it paper on a server now scanning all 11 sectors every 60s with real chain pulls. 30 days before real capital. Separate system running on a different asset class same core principles.
saving the API pulls as well because even though the long options plan fell apart I can mess around with the chain data at a later date without having to spend 1000 - 5000 for data
I’m not here to victory-lap (I’m still not “done”), but I am here because I’ve learned a ton the hard way. The biggest shift isn’t that I found a magic indicator, it’s that I finally started treating this like an engineering + measurement problem.
The biggest change: I moved my backtesting into MT5 Strategy Tester (and it was a project by itself)
I used to rely heavily on local backtesting. It was fast, flexible, and… honestly too easy to fool myself with.
Over the last months I moved the strategy into MT5 Strategy Tester so I could test execution in a much more realistic environment, and I’m not exaggerating when I say getting the bridge + daemon + unified logging stable took a long time. Not because it’s “hard to click buttons,” but because the moment you go from local bars to Strategy Tester you start fighting real-world details:
bar/tick timing differences
candle boundaries and “which bar am I actually on?”
duplicate rows / repeated signals if your bar processing is even slightly wrong
file/IPC coordination (requests/responses/acks)
and the big one: parity, proving that what you think you tested is what you’d actually trade
That setup pain was worth it because it forced me to stop trusting anything I couldn’t validate end-to-end.
What changed since my last post
I stopped trusting results until I could prove parity. The Strategy Tester migration exposed things local tests hid: timing assumptions, bar alignment errors, and logging duplication that can quietly corrupt stats.
I rebuilt the model around “tradability,” not just direction. I moved toward cost-aware labeling / decisions (not predicting up/down on every bar), so the model has to “earn” a trade by showing there’s enough move to realistically clear costs.
I confronted spread leakage instead of pretending it wasn’t there. Spread is insanely predictive in-sample, which is exactly why it can become a trap. I had to learn when “a great feature” is actually “a proxy that won’t hold up.”
I started removing non-stationary shortcuts. I’ve been aggressively filtering features that can behave like regime-specific shortcuts, even when they look amazing in backtests.
The hardest lessons (a.k.a. the errors that humbled me)
Logging bugs can invalidate months of conclusions. I hit failures like duplicated rows / repeated signals, and once I saw that, it was a gut punch: if the log stream isn’t trustworthy, your metrics aren’t trustworthy, and your “model improvements” might just be noise.
My safety gates were sometimes just fear in code form. I kept tightening filters and then wondering why I missed clean moves. The fix wasn’t removing risk controls, it was building explicit skip reasons so I could tune intentionally.
Tail risk is not a rounding error. Break-even logic, partials, and tail giveback taught me the only truth: you can be “right” a lot and still lose if exits/risk are incoherent.
Obsession is real. This became daily: tweak → run → stare at logs → tweak again. The only way I made progress was forcing repeatable experiments and stopping multi-change chaos.
What I’m running now (high-level)
5-min base timeframe with multi-timeframe context
cost-aware labeling and decision making instead of boolean
multi-horizon forecasting with sequence modeling
engineered features focused on regime + volatility + MAE/MFE
VPS/remote setup running the script
The part I’m most proud of: building a real data backbone
I’ve turned the EA into a data-collection machine. Every lifecycle event gets logged consistently (opens, partials, TP/SL events, trailing, etc.) and I’m building my own dataset from it.
The goal: stop guessing. Use logs to answer questions like:
which gates cause starvation vs manage risk
what regimes produce tail losses
where costs/spread/slippage kill EV
which “good-looking” features don’t hold up live
Questions for the community
For those who’ve built real systems: what’s your best method to keep parity between live execution, tester execution, and offline evaluation?
How do you personally decide when a filter is “risk management” vs “model starvation”?
Any advice on systematically analyzing tail risk from detailed logs beyond basic MAE/MFE?
I’m still grinding, but now it feels like the work is compounding instead of resetting every week.
One of the hardest problems in systematic trading is not finding strategies that make money in a backtest.
It is figuring out whether they did anything special at all.
If you test enough ideas, some of them will look good purely by chance. That is not a flaw in your research process. It is a property of randomness. The problem starts when we mistake those lucky outcomes for real edge.
Monte Carlo (MC) returns are one of the few tools that help address this directly. But only if they are used correctly.
This article explains how I use Monte Carlo returns matched to a strategy’s trade count to answer a very specific question:
Is this strategy meaningfully better than what random participation in the same market would have produced, given the same number of trades?
That last clause matters more than most people realize.
The Core Problem: Strategy Returns Without Context
Suppose a strategy produces:
+0.12 normalized return per trade
Over 300 trades
With a smooth equity curve
Is that good?
The honest answer is: it depends.
It depends on:
The distribution of returns in the underlying market
The volatility regime
The number of trades taken
The degree of path dependence
How much randomness alone could have achieved
Without a baseline, strategy returns are just numbers.
Monte Carlo returns provide that baseline, but only when they are constructed in a way that respects sample size.
Why “Random Returns” Are Often Done Wrong
Most MC implementations I see fall into one of these traps:
Comparing a strategy to random trades with a different number of trades
Comparing to random returns aggregated over the full dataset
Using non-deterministic MC that changes every run
Using unrealistic return assumptions such as Gaussian noise or shuffled bars
That is where the pick method comes in.
What the Pick Method Actually Does
At a high level, the pick method answers this:
If I randomly selected the same number of return observations as my strategy trades, many times, what does the distribution of outcomes look like?
Instead of simulating trades with their own logic, we:
Take the actual historical return stream of the market
Randomly pick N returns from it
Aggregate them using the same statistic the strategy is judged on
Repeat this thousands of times
Measure where the strategy sits relative to that distribution
This gives us a fair baseline.
If a strategy trades 312 times, we compare it to random samples of 312 market returns. Not more. Not fewer.
That alignment is critical.
Why Sample Size Is the Entire Game
A strategy that trades 50 times can look spectacular.
A strategy that trades 1,000 times rarely does.
That is not because the first strategy is better. It is because variance dominates small samples.
Monte Carlo benchmarking with matched sample size does two things simultaneously:
It controls for luck
It reveals whether performance improves faster than randomness as sample size increases
This is why MC results should be computed across a wide range of pick sizes, not just one.
In my implementation, this is exactly what happens:
Picks range from 2 to 2000
Each pick size gets its own MC baseline
Strategy performance is compared to the corresponding pick level
That turns MC from a single reference number into a curve, which is far more informative.
Deterministic Monte Carlo: An Underrated Requirement
Most people do not think about this, but it matters enormously.
If your Monte Carlo baseline changes every time you run it, your research is unstable.
Non-deterministic MC introduces noise into the benchmark itself. That makes it hard to know whether:
A strategy changed
Or the benchmark moved
Your deterministic approach fixes this by:
Using a fixed root seed
Deriving child random generators using hashed keys
Ensuring the same inputs always produce the same MC outputs
This has several benefits:
Results are reproducible
Research decisions are consistent
Changes in conclusions reflect changes in strategies, not random drift
MC results can be cached and reused safely
This is especially important when MC returns are used as filters in a large research pipeline.
What Is Actually Being Sampled
In your setup, Monte Carlo draws from:
The in-sample normalized returns of the underlying market
After removing NaNs
Using the same return definition used by strategies
That is important.
You are not sampling synthetic noise. You are sampling real market outcomes, just without strategy timing.
This answers a very specific question:
If I had participated in this market randomly, with no signal, but the same number of opportunities, what would I expect?
That is the right null hypothesis.
Mean vs Sum vs Element Quantile
Your MC function allows multiple statistics. Each answers a slightly different question.
Mean
Computes the average return per trade
Directly comparable to strategy mean return
Stable and intuitive
Scales cleanly across sample sizes
This is the most appropriate comparison when your strategy metric is average normalized return per trade.
Sum
Emphasizes total outcome
More sensitive to trade count
Useful when comparing total PnL distributions
Element quantile
Looks inside each sample
Focuses on tail behavior
Useful in specific cases, but harder to interpret
Using mean keeps the comparison clean and avoids conflating edge with frequency.
Building the MC Return Surface
Rather than producing a single MC number, your implementation builds a surface:
Rows equal pick size multiplied by quantile
Columns equal return definitions
Cells equal MC benchmark values
This lets you answer questions like:
What does the median random outcome look like at 200 trades?
What about the 80th percentile?
How fast does random performance improve with sample size?
Where does my strategy sit relative to these curves?
This is much richer than a pass or fail test.
Why Quantiles Matter
Comparing a strategy to the median MC outcome answers:
Is this better than random, on average?
Comparing to higher quantiles answers:
Is this better than good randomness?
For example:
Beating the 50th percentile means better than average luck
Beating the 75th percentile means better than most random outcomes
Beating the 90th percentile means very unlikely to be luck
This is far more informative than a binary p-value.
How This Changes Strategy Evaluation
Once MC returns are available, strategy evaluation changes fundamentally.
Instead of asking: Is the mean return positive?
You ask: Where does this strategy sit relative to random baselines with the same trade count?
That reframes performance as relative skill, not absolute outcome.
A strategy with modest returns but far above MC baselines is often more interesting than a high-return strategy barely above random.
Using MC Returns as a Filter
In a large signal-mining framework, MC returns become a gate, not a report.
For example:
Reject any signal whose mean return does not exceed the MC median at its trade count
Or require it to beat the MC 60th or 70th percentile
Or require separation that grows with sample size
This filters out strategies that only look good because they got lucky early.
That is exactly what you want when mining thousands of candidates.
Why This Is Better Than Shuffling Trades
Trade shuffling is common, but it often answers the wrong question.
Monte Carlo picking tests whether selection mattered.
For signal evaluation, selection is usually the more relevant concern.
You are asking: Did the signal meaningfully select better returns than chance?
Not: Did the order of trades help?
Both are valid questions, but MC picking directly addresses edge discovery.
A Concrete Example
Imagine:
A strategy trades 400 times
Mean normalized return equals 0.08
Monte Carlo results show:
MC median at 400 trades equals 0.02
MC 75th percentile equals 0.05
MC 90th percentile equals 0.09
This tells you something important:
The strategy beats most random outcomes
But it is not exceptional relative to the best random cases
The edge may be real, but thin
It deserves caution, not celebration
Without MC returns, that nuance is invisible.
Why This Matters for Capital Allocation
Capital allocators do not care whether a strategy made money once.
They care whether:
The process extracts information
The edge exceeds what randomness could plausibly explain
The advantage grows with sample size
The result is reproducible
MC returns aligned to trade count speak directly to that.
They show:
How much of performance is skill versus chance
Whether the strategy earns its returns
How confident one should be in scaling it
The Bigger Picture: MC as Part of a System
Monte Carlo returns do not replace:
Out-of-sample testing
Walk-forward analysis
Regime slicing
Correlation filtering
They complement them.
MC answers the question: Is this signal better than random participation, given the same opportunity set?
That is a foundational test. If a strategy cannot pass it, nothing else matters.
Final Thoughts
Monte Carlo returns are not about prediction.
They are about humility.
They force you to confront the uncomfortable truth that:
Many strategies look good because they were lucky
Sample size matters more than cleverness
Real edges should separate from randomness consistently
By using deterministic MC returns matched to strategy trade counts via the pick method, you turn randomness into a measurable benchmark rather than a hidden confounder.
I'm a math/CS grad and (currently unemployed) software engineer. I've been browsing the Reddit trading spaces for a few weeks now and I'm surprised by how few people I see talking about using machine learning. Is anyone out there? I'm not looking for advice or trying to sell you anything, just trying to make friends with people who get what I do.
So here's another EOD strategy I just finished coding up. This one uses an ensemble of component strategies and a fixed 60/40 stock/bond exposure with dynamic bond ETF selection. Performance-wise it did 33/20 (CAGR/maxDD) over a 25 year backtest. The strategy was GA optimized and ran 552K sims over an hour. The backtest was in-sample as this is a work in progress and just a first proof of concept run. But I'm encouraged by the smoothness of the EC and how it held up over multiple market regimes and black swans. It will be interesting to see how it performs when stress tested.
Why is it that my backtest looks like Warren Buffett coded it, but the live algo trades like it’s on a Starbucks loyalty program? 🤷♂️ Meanwhile, Redditors in r/investing are bragging about holding SPY. Is this the universe telling us to buy an index fund and move on? 🙃
I am not looking to copy nor think it is easy but think looking at coding styles and logic by more experienced algorithmic traders can help speed up my learning curve. As a self-study guy, it is just through trials-errors, a very time-consuming process.
I read many books but books can only go so far. Obviously GitHub can be a learning resource but many repos there are "half-assed" rather than a complete system. So anywhere besides GitHub can I find sample codes at learn from?
I recently developed a quantitative intraday strategy for the Nasdaq (tested and executed on the Micro E-mini contract MNQZ6 via MultiCharts). The model was deployed on a $25,000 account base, focusing strictly on risk management, drawdown control, and edge execution.
I run a systematic 5-minute opening-range breakout on NQ with one confirmation filter (not sharing the filter). One trade a day, entry usually 09:40 to 09:55, stop at the far side of the range, 2R target, flat at the close if neither hits. Everything below is tick-true research fills with 0.75 pts friction, split into discovery / validation / sealed windows, one look each
(DOLLARS AND AMOUNTS IN IMAGE ARE SINCE 2025)
What a trade looks like
- Median stop: ~80 pts. Median hold: a couple of hours.
- Exits: 50% stopped, 25% hit 2R, 25% flat at the bell.
- 46% of trades reach +1R at some point. 42% get stopped without ever reaching +1R. Median time to +1R when it happens: about 40 minutes.
What I've already tested and what happened (all three windows, tick-true)
- Break-even at +0.75R / +1R: worse. It scratches trades that later win.
- Time stops (60 / 90 / 120 min, flat at 13:00 / 14:00 / 15:00): worse, cuts winners.
- Partial at +1R with runner to 2R / to the bell: no gain.
- Profit locks (+0.5R after +1R, +1R after +1.5R), keep-50/60/75%-of-peak trails, 9-EMA trail: no gain, some worse.
- Target 1R / 1.5R / 3R / hold to close: 1R clearly worse, 3R and bell about equal to 2R.
- Tighter initial stops (OR mid, the broken level, under the breakout candle with a buffer, hard point caps): all worse. The retest hits them.
- Second entries after a stop, re-entries, opposite-side trades: negative.
Nothing beat plain 2R with the wide stop across all three windows. The only thing that helped was sizing up in high realized-volatility regimes.
What I'm asking for
Ideas that act on the losers, not the winners. Something that can tell, inside the first 30 to 60 minutes of the trade, that this one is going nowhere, without also cutting the ones that reach +1R later. Or ideas I haven't listed.
Specific rules only: what you observe, when, and what you do. I have full tick data 2021 to 2026 and will test anything concrete tick-true and post the result back here, including the ones that fail.
Things that won't help me: "trail your stop", "take partials", "use a time stop". I've tested those in every form I could think of.
-
If a suggestion comes back that's concrete, send it to me and I'll run it under the same protocol.
LLMs can write your algo, they may find hard to put down a working CONFIG instantly.
you have to do it, therefore having a trading knowledge is needed. no need to be a SWE
AIs such as CLAUDE or CHAT GPT have almost no code input by humans, they write themselves, an algo that send an order to a broker with SL and TP is a ridicoulsy simple task that they can manage to build with almost no effort but finding the EDGE is where you with your knowledge comes in.
Backtesting an algo can be pricy, if you want the best of the best, you need a good pc and raw unadjusted data, can be few thousands dollars.
If you want something that works you have to give it the tools. yahoo or tradingview data is good to start with but not where you want to be at some point.
Jumping into algotrading without knowledge on trading and capital to invest in the algo is NOT a waste of time, still a good idea so you can get some education about the topic, but you probably won't make the bot you wish.
It can be demorilizing if alot of work and efforts in the task and results are not showing but you have to understand that a working algotrading is life-changing and it won't be built in few weeks using stick and rocks.
I’ve been using Claude + Manus for swing trading lately and one thing surprised me. it’s not good at “picking winners,” but it’s weirdly good at picking up when the story around a stock is starting to shift.
Like I had Claude go through earnings calls (this quarter vs last quarter) and Manus tracking how the stock actually reacted + analyst revisions + options positioning.
One thing it kept picking up that I wouldn’t have noticed:
sometimes a stock rips after “meh” earnings not because the numbers were good, but because management just sounds slightly less panicked than before… while positioning is already heavily short.
It’s subtle stuff like that.
Also noticed analyst upgrades usually come after the move, not before it. Which sounds obvious but seeing it repeated across names kind of changes how you treat them.
Feels less like “AI trading” and more like having something constantly sanity-check whether the narrative you think is happening is actually the one the market is reacting to.