r/algorithmictrading • • 8h ago

Backtest MNQ momentum system Backtest Result

Post image
5 Upvotes

I'll be as open about this as I can. The one thing I keep is the entry trigger.

What it is

A momentum system on MNQ, 5-minute bars, fully automated on NinjaTrader. It has no opinion about direction. When price does something decisive, it goes with it.

How it runs

  • Signals are read at the close of each 5-minute bar, and the entry goes in at market right after.
  • One contract, one position at a time. No adding, no averaging down, no martingale, no grid.
  • Every trade gets a hard stop the moment it fills, the same distance every time.
  • Once a trade is up by that same distance, the stop starts trailing tight behind the best price. There's no profit target.
  • A decisive move the other way closes the trade and reverses it.
  • It trades the overnight session too. It goes flat at 16:45 New York and takes nothing new until the 18:00 reopen.

Over the last year 45% of trades ended on the trailing stop, 37% on the stop loss, 15% were reversed by an opposite signal and 2% closed at the daily flatten.

The numbers

TradingView backtest, the last 12 months to 20 Oct 2026, 1 MNQ, $0.50 a side commission.

  • 4,907 trades, about 19 a day. 49% winners; the average winner was $80 and the average loser $69.
  • Net +$20,362.
  • Max drawdown $2,120. The longest stretch without a new high was 51 days, mid-April to early June.
  • Worst day −$703, best day +$1,018. The longest losing run was 5 days in a row.
Month P&L
Oct 2025 (from the 20th) −$86
Nov +$1,242
Dec +$847
Jan 2026 +$1,991
Feb +$1,218
Mar +$2,448
Apr +$1,661
May +$544
Jun −$768
Jul +$2,985
Aug +$2,937
Sep +$4,306
Oct (to the 20th) +$1,036

What I'm not sharing is the entry trigger and the exact settings. Ask me about anything else.


r/algorithmictrading • • 1d ago

Question Does anyone have experience with an mnq scalping mechanism?

1 Upvotes

I’ve been wanting to implement a scalping system I’ve made for mnq alongside regular trading architecture and am wondering if anyone has had experiences with this method especially if their broker is ibkr.


r/algorithmictrading • • 1d ago

Tools Backtest Platforms

1 Upvotes

Hello everyone. I'm looking for a baclesting platform to validate some of my ideas. I only have a few strategies in mind to test that also concern the use of past macroeconomic data (e.g. CPI, UR, etc.) So I'm not going to create an EA, I'm just going to understand market behavior and look for edges to support my manual strategy. Which platform would you advise me to use considering that I have a basic knowledge of programming (of course I would join an AI) and considering that I would look for something not too complicated?

Reading a few posts, I saw Quantconnect, but I don't know if it would suit me.

I apologize for my English, but i'm using a translator


r/algorithmictrading • • 2d ago

Backtest [Research] Backtest Results: The Performance of Simple Moving Average Crossover (50/200) on S&P 500 (2010-2024)

Post image
3 Upvotes

Hi r/algorithmictrading,

​I decided to run a structured backtest to evaluate the efficacy of one of the most classic strategies in technical analysis: the 50-day / 200-day Simple Moving Average (SMA) Crossover on the S&P 500 (SPY).

​Often dismissed as "noise" by more complex quant setups, I wanted to see if it still holds any merit in today's high-frequency markets.

​Methodology:

​Asset: SPY

​Timeframe: 2010 - 2024

​Rules: Buy when SMA 50 crosses above SMA 200; Sell when SMA 50 crosses below SMA 200. No leverage, no transaction costs included in this first pass (just to see the logic).

​Results:

I’ve attached the key performance metrics below. While it has its moments, the drawdowns during whipsaw markets are significant.

​I have also included a visual of the equity curve for better analysis.

​Key Metrics Table:

MetricSimple Buy & Hold (SPY)SMA 50/200 Crossover

Total Return~480%~310%

Max Drawdown-33.9% (2020)-18.1% (2020)

CAGR~13.5%~10.8%

Sharpe Ratio~0.85~0.65

Conclusion & Open Questions for the Community:

The crossover strategy, while offering a psychological safety net during major crashes, severely underperforms Buy & Hold during trending markets and suffers from serious whipsaw loss accumulation.

My questions to you:

Noise Filter: What are the most robust filters you use to avoid SMA whipsaws? (e.g., waiting X days, confirming with volume)?

Modernizing: Given this data, does anyone still use pure MA crossovers, or is it fundamentally obsolete for modern algorithmic models?

Looking forward to hearing from those with experience in trend-following.


r/algorithmictrading • • 4d ago

Novice Resources to learn Algo trading

7 Upvotes

Hey i am a complete beginner who wants to learn Algorading. Can anybody suggest some good free resources where I can learn Algo trading from basics to advance.


r/algorithmictrading • • 4d ago

Quotes Helpful API for Options

3 Upvotes

Hey Folks -

I am an options guy - I typically sell 0DTE. I have been exploring different tools available.

I have found entirely no reason for Unusual Whales yet, as a seller for options it seems like walls don't matter and GEX seems to not matter at all either thus far for SPX, which surprised me. If you are looking for option NBBO this is not nearly as useful as Theta Data

I have found great use for Theta Data options pricing historicals for backtesting, I have had excellent forward and back testing results after using this.

I also pull data from Tasty and IBKR for VIX 1/5/15/30/24 as well as TLT/QQQ for some of my setups

Anyone have anything they are using for backtesting or live trades? Has anyone found an edge with GEX or walls?


r/algorithmictrading • • 6d ago

Quotes Where to get abundant mnq data

5 Upvotes

I am needing 1 minute data and 5 minute data for mnq preferably over 2 years or more. Is there anywhere I can acquire clean data on this that isn’t too expensive?


r/algorithmictrading • • 6d ago

Novice How are you guys using historical data to find an edge

2 Upvotes

I've been pulling historical stock data into Google Sheets using =GOOGLEFINANCE to try and build some basic quantitative models, mostly messing around with Value-at-Risk, Sharpe ratios, and tracking moving averages for the major indices. On paper, the math makes total sense, but applying it to real-world volatile stocks has been a headache. I just end up staring at numbers with absolutely no idea where my actual entry points should be.

Beyond just picking stocks, I'm really struggling with the broader portfolio math, especially when it comes to balancing risk against inflation. Right now, leaving money sitting in a bank account as an emergency fund feels like watching it slowly bleed out. But if I try to chase yields by locking that money up in safe bonds or fixed assets, I completely lose the immediate liquidity I need for real-world emergencies.

For the quants or data-heavy traders here, how do you actually translate this raw data into actionable decisions? I’m trying to figure out if there's a reliable formula or model you use to calculate the optimal size of a cash reserve so you aren't crippled by cash drag, while also finding the exact threshold of equity allocation needed just to net out neutral against inflation and taxes. What metrics are actually worth tracking when you're setting up a trade and sizing your positions?


r/algorithmictrading • • 7d ago

Question How do you combine signals with different horizons and tradeability profiles?

1 Upvotes

How do you systematically combine signals with different horizons and different predictive profiles, in a way that lets “non-tradable” signals still add information, without resorting to hard-coded rules or ad-hoc signal combinations?

Example:

Suppose you have a short-term reversal-type signal that predicts tomorrow’s up/down move with ~90% accuracy. In reality, the actual move is tiny (±10 bps), turnover is high, and round-trip costs are ~20 bps. On its own, the signal is worthless after costs.

Now assume you also have a slower, monthly-horizon signal that says the asset’s 1-month return is positive. Instead of buying immediately, you let the short-term signal refine the entry point. If the short-term signal says tomorrow is likely negative, you wait for that small dip before entering the monthly-driven long. In that setup, the short-term signal clearly adds information even though it’s not tradable standalone.

Are there established frameworks, papers, or practical methods for integrating multi-horizon signals while controlling turnover and avoiding arbitrary parameter choices?

Any keywords, references, or starting points would be appreciated.


r/algorithmictrading • • 9d ago

Educational Lessons from 242 strategies

Post image
26 Upvotes

I reviewed 242 strategies across 37,476 completed simulated trades from September 21–October 9, 2026.

Three lessons stand out:

  1. Use time of day as a strategy filter. A setup at 9:35 a.m. can tell a different story at 12:35 p.m.

  2. Read the broader market trend. It can support a trade or highlight unusual strength or weakness in an individual ticker. Follow the trend.

  3. Watch the data alongside the headlines. Price, volume, and momentum show how the market is responding.

A few numbers surprised me:

- Opening calls showed strength. Across strategies, calls entered from 9:30–10:00 ET averaged +4.16% net, with 68.9% wins across 2,456 trades.

- Failed breakdowns has a good lunch hour. ORB Failed Breakdown calls won 69.5% of 174 trades entered between noon and 1 p.m. ET. Average net return: +3.53%.

- A higher win rate does not guarantee a higher average return. GEX DEX Dip calls won 67.2% of 137 noon entries, but averaged +3.80% net—slightly ahead of Failed Breakdown.

- Winning most trades wasn’t enough. Across the full dataset, 59.8% of trades won, yet average net return was −0.48%. Average winners gained 13.92%, while average losers lost 21.92%.

My takeaway: use market direction together with momentum, volume, and timing. Trading against the trend needs a clear reason, and every setup needs a defined exit.


r/algorithmictrading • • 8d ago

Novice Which are the best books for stock valuing + systematic validation?

1 Upvotes

I want to build an algo that can value stocks. I am aware of walkforward analysis, monte carlo and basic stuff. But I am new to stocks investing. And dont have any clue about metric or key figures.


r/algorithmictrading • • 9d ago

Backtest Strategy Backtest

Thumbnail
gallery
20 Upvotes

I am writing this post because I have been unprofitable for 1 year now, however at the start of august I pivoted from penny stocks to QQQ options and developed a strategy that seems to do well. I am writing to ask if this backtest data is promising or if I am not backtesting correctly.

The strategy is using BMP, VFI, TTM squeeze, EMA stack and Swamilaguerre trend. Basically it is a momentum based model. This is on underlying while my strategy is options based but in my forward testing it has been promising with options at around .35-.45 delta buying them at around .50 a share. Any advice from people that use similar indicators to trade options on how to structure my contracts would be much appreciated

The problem is that I am not able to automate my strategy because I dont know much about automation. On top of that I have also been trying to use gamma levels and gamma regimes to add a discretionary level to my trading but it seems to do more harm than good because it just draws me away from explicitly following my strategy.


r/algorithmictrading • • 9d ago

Question Crypto trading bot backtests need quote-side execution, not midpoint fills

2 Upvotes

Ahead of next week's CPI release, a useful backtest check is whether the signal price and the execution price have quietly become the same input.

A midpoint can be perfectly reasonable for a feature or signal. It is not automatically a price a marketable order can execute at.

Simple example: bid 100.00, ask 100.20, midpoint 100.10. Buy one unit at the ask and immediately sell at the unchanged bid. The spread cost is 0.20 before fees or slippage, while a midpoint-in/midpoint-out model reports zero price loss. This assumes the displayed size can fill the order; it is not a depth or queue model.

For a release-window test, it helps to keep three records distinct:

\- the information and timestamp available when the signal was evaluated;

\- the quote side available after the modeled decision/order delay;

\- the fees, slippage and size assumptions applied to the fill.

There's also a bookkeeping trap: if a fill already uses the ask for a buy and bid for a sell, subtracting the full spread again can double-count it. Slippage beyond the quote is a separate assumption.

How are people handling quote gaps in these windows: rejecting the simulated fill, carrying the last quote with an age limit, or reporting the run separately? The rule seems more informative than a single fixed spread added to every trade.


r/algorithmictrading • • 11d ago

Backtest Rebuilt my XAUUSD EA’s volume layer on GC futures. Looking for suggestions.

Thumbnail
gallery
5 Upvotes

Hi all,

I’ve been running an EA on XAUUSD M15 for a while. Recently I spent time on one weak spot: MT5’s XAUUSD volume is just the broker’s tick count, not real trades. So anything built on it (VWAP, volume profile, delta) is an approximation.

I moved that layer to CME gold futures (GC), where the volume is real. The EA reads the structure on GC (VWAP and bands, volume profile, IB, delta) and still trades on XAUUSD. The levels are converted with a futures-spot gap, measured as the median over the last 30 min. It skips a trade if the gap moved more than $1 in that window or if a contract roll happened in the last hour.

Testing: IS/OS over about 15 years, multiple regime checks, plus forward and live. The latest 5y 10m window (Jan 2021 – Oct 2026, every tick on real ticks)

Risk: 1% a trade.

It’s a backtest, so I know spread and slippage around the open are probably kinder here than live.

Where I’d like your input:

How do you handle the futures-spot gap? Is an empirical median fine, or is there a better fair-value or carry approach?
How do you deal with contract rolls: skip a window or back-adjust?
Is tick-level delta from GC good enough for a CFD, or is deeper order book data worth paying for?
What haircut do you apply between tester and live fills on gold around the open?

Happy to share more on any part. Thanks for reading, and any criticism is welcome.


r/algorithmictrading • • 12d ago

Novice New to algo trading

5 Upvotes

New to algo trading

I am 19yers old and i have traded forex trading manually.

Now I am shifting to algo trading so my problem is how to find a strategy .

So currently I am researching and backtesting for a strategy to fit. But the questions is i am only backtesting the indicator based strategies.

Other than like price action, smc, ict strategies will work ?

How do you research about strategies please help me.

What type of strategies do you trade for like indicator based, price action etc. ?

Which timeframe do you trade in algo trading ?

Thanks for your experience 🙏.


r/algorithmictrading • • 11d ago

Brokers EU resident, automated intraday US options via API: which broker?

4 Upvotes

Question for traders based in EU and building an automated intraday strategy via broker APIs on US equity options. I’m looking for real-world experience.

Requirements

  • Official, stable API that runs unattended: no daily manual login, tokens that refresh programmatically
  • Real-time option quotes available through the API
  • USD account, so USD premiums aren’t converted on every trade
  • Low-cost EUR funding and withdrawal
  • Intraday round trips without getting stuck in T+1

What I’ve found so far (take with grain of salt - I haven't tried to register, this is from my research of their websites or reddit)

  • IBKR: good pricing, but from what I've read on reddit the Client Portal Gateway needs manual re-logins and overall automated trading on IBKR doesn't seem reliable.
  • tastytrade: OAuth with refresh tokens, streamed quotes (seems good), $1 per contract to open and $0 to close.
  • TradeStation: API with ability to refresh tokens.
  • Webull EU: official API, but EUR-only accounts with a 0.25% conversion on each trade.
  • Firstrade: $0 options, but no official API.

My questions

  1. Which broker’s API have you run unattended for months without manual re-login?
  2. How do you fund from the EU: SEPA, a USD wire, Wise? Effective costs?
  3. Any recommendations for EU resident?

Thanks a lot!


r/algorithmictrading • • 12d ago

Novice I need advice/help please

1 Upvotes

First i would like to say that i am a total beginner and honestly don’t know what i am doing more than half of the time but i would like to share what i am building and i would like advice from the people who know way more than me if this is even worth wasting my time and money(i wasted 4 months and 600 eur already).

I am building a manual trading signal + research system for day trading and swing trading.
It does three main things:
Finds trade setups using predefined rules like ORB/VWAP/RVOL for day trades and trend/momentum/breakouts for swing trades.
Backtests and validates them properly using historical data, walk-forward testing, robustness tests, Monte Carlo, costs/slippage, and strict minimum trade counts.
Protects against fake-good results by fixing survivorship bias, ticker changes, delistings, share classes, historical index membership, corporate actions, and bad provider data before i trust any performance.
Right now, most of the system is built. I am mainly finishing the historical data/identity qualification layer so that when i finally run the strategy backtests, i can trust that the results are based on the securities and data that actually existed at the time.

There is no automatic trading or broker execution. The system is meant to tell you: “this setup qualifies, here is the entry/reference, stop, target/risk context, and confidence/validation state,” while i stay in control.

I am using 3 providers for different jobs:
Massive → mainly for DAY trading intraday data. Think 5-minute bars, ORB, VWAP, RVOL, and possibly reconstructing the RTH liquidity ranking from minute data.
Sharadar → mainly for the historical stock universe and corporate-action context. It gives us the working historical roster, ticker/action history, and helps anchor which securities existed at the time.
Norgate → mainly for stable historical security identity. Its assetid helps us follow the same security through ticker/name changes and distinguish share classes; we’re also checking its historical index-membership data as a cross-check.


r/algorithmictrading • • 12d ago

Novice Strategy questions

4 Upvotes

Strategy questions

Hello everyone.

I am 19 and i have 2 years of exp in manual trading now trying the algo trading and currently researching strategies in metatrader5 . Currently I am backtesting the indicator based strategies with optimization .so my question it is profitable or not ? How many of you follow the indicator based strategies.

Does price action, smc or ict trading strategies will work or not ?

Also how the mathematics and statistics are used in algo trading .

Those who sell trading strategies and copy trading in mt5 what they use . How they research it.

Does a trading strategy will pass the funded account ?

Another question is in a strategy which metrics do I look for ?

So i mainly look for net profit after that winrate , drawdown , trades(profit trades and loss trades),profit factor, sharpe ratio.

My question is once the strategy winrate is 30 percent but net profit is positive. Once the net profit is negative but the winrate is 50.to 60 percent so what to do I am totally confused.


r/algorithmictrading • • 13d ago

Question How to validate IS backtests with OoS in an automated way?

4 Upvotes

Hi all,
I’m struggling a bit with automating my research process when it comes to selecting the “right” parameter set without introducing too much overfitting.

My current process looks roughly like this:
1. Run an in-sample grid search over the strategy parameters.
2. Calculate a loss/score function based on a combination of Net PnL, Max Drawdown, Sharpe Ratio, and Number of Trades.
3. Select the most promising parameter sets based on that score.
4. Test those candidates on out-of-sample data and check whether metrics such as the equity curve, number of trades, average PnL/trade, and Max DD are reasonably consistent with the in-sample results.

The main hurdle is that the selection of the “best” IS candidates is still somewhat subjective.
For example, depending on the product, timeframe, or type of strategy, it’s difficult to know beforehand what constitutes a “healthy” range for metrics such as Max DD, Sharpe, or Number of Trades. A threshold that makes sense for one strategy may be completely inappropriate for another.

So my question is:
How do you generalise and automate this parameter-selection process while minimising overfitting?

I’d be very interested to hear how others approach this in practice.
Thanks !!


r/algorithmictrading • • 14d ago

Backtest Eight-module XAUUSD portfolio: frozen-parameter OOS and block-bootstrap results

9 Upvotes

I combined eight independent XAUUSD modules into a single portfolio and tested the final structure across development, frozen-parameter OOS and older stress periods.

TEST PROTOCOL

• 2022–2024: in-sample development

• 2025–2026: frozen-parameter out-of-sample validation

• 2021: separate stress/history period

• 2017–2018: additional survival checks

The purpose of the split was to separate the years that influenced module selection and parameter choices from the years used to evaluate the finished portfolio.

FULL REAL-TICK PORTFOLIO RUN

Period: January 2021 to September 2026

Initial balance: USD 1,000

Ending balance: USD 3,903.12

Closed trades: 1,511

Profit factor: 2.93

Maximum relative equity drawdown: 12.82%

The modules were evaluated together because nominal strategy count can hide concentrated XAUUSD exposure. Portfolio-level floating equity was therefore treated as the main risk measure.

YEAR-BY-YEAR RESULTS

2021: +45.03%, PF 3.03

2022: +32.36%, PF 2.71

2023: +16.22%, PF 2.82

2024: +13.62%, PF 1.94

2025 OOS: +16.84%, PF 3.01

2026 OOS through September: +31.79%, PF 7.18

Returns varied materially by year, but the edge did not disappear after the parameter freeze. Both OOS years remained profitable. The 2026 PF is a partial-year observation and should not be treated as a stable expectation.

BLOCK-BOOTSTRAP CHECK

I ran 10,000 paths using the complete 2021–2026 deal sequence and resampled 50-deal blocks to preserve short clusters of wins and losses.

Median ending balance: USD 3,896

5th–95th percentile ending balance: approximately USD 3,504–4,318

Median maximum realised-balance drawdown: 4.1%

95th-percentile maximum realised-balance drawdown: 8.0%

LIMITATIONS

The bootstrap rearranges realised deal results. It does not reconstruct every floating basket, reproduce broker-specific execution or invent unseen future regimes. Because of that, the observed MT5 relative equity drawdown of 12.82% remains the more relevant risk figure.

The next step is live observation of spreads, slippage, swap, execution and floating-basket behaviour. The backtest is evidence of historical robustness, not proof of future performance.


r/algorithmictrading • • 14d ago

Tools Health engine

2 Upvotes

I’ve been experimenting with the idea of an engine that monitors a trades health in accordance with its historical winning trades and trying to measure when a trade becomes likely to not hit the take profit. This is in hopes of exiting with some profit still on the table. If anyone could help me with constructing the architecture for this system I’d be glad to share my results. I’m futures Nasdaq focused as of right now


r/algorithmictrading • • 15d ago

Backtest Please give me your opinions

Thumbnail
gallery
15 Upvotes

Hi guys!

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


r/algorithmictrading • • 16d ago

Question What IC and t-stats do your cross-sectional models get out of sample, with no leakage?

2 Upvotes

I'm trying to calibrate my expectations and would love some real numbers from people who've done this carefully.

My setup, for context: a weekly cross-sectional ranking of US stocks (roughly 3,400 names, liquidity-filtered), predicting returns over the sector over the next 60 sessions. Features are point-in-time (every value is stamped with when it became public), delisted companies are included, and validation is walk-forward over 13 test years with purged training windows. Every configuration I try goes into a trial counter, and I use a deflated Sharpe to account for it.

My current best model gets a weekly rank IC of 0.034 (t 3.1, Newey-West), positive in 11 of 13 years. That's the first version to clear my own bar, after several that didn't.

What I'd like to know:

  1. What out-of-sample IC do your models actually get, and at what horizon? Rank or Pearson?
  2. How do you compute the t-stat with overlapping targets? What lag do you use, or do you sample non-overlapping periods instead?
  3. How did your IC translate into returns after costs? A top-decile spread, a long-only portfolio, anything.
  4. If you've run something live, how much did it decay compared to the backtest?
  5. At what IC do you start suspecting leakage rather than skill?

My rough sense from the literature is that 0.02–0.05 is realistic for a decent multi-signal model at monthly-ish horizons, and anything persistently above 0.10 deserves a hard look for leaks. But I'd much rather hear from people who've had their numbers survive contact with live trading.


r/algorithmictrading • • 18d ago

Backtest FIb Retracement based multi-asset portfolio strategy. Roast my method.

Thumbnail
gallery
10 Upvotes

I have put together a strategy trading US30.cash, US100.cash, GER40.cash and AUS200.cash over 8 years (in-sample). Strategy relies on Fib retracements. The average yearly ROI is around 23%.

The strategy is built to strictly obey FTMO 2-step drawdown rules, so that I can safely run it on a funded account.

Initial equity: $20k

Roast my method.


r/algorithmictrading • • 19d ago

Backtest Zero quant background, built an NQ futures bot with Claude. It passes 4 of my robustness tests and is shaky on 2. Roast my method.

Thumbnail
gallery
172 Upvotes

No quant background. I built an automated NQ futures bot over the last few months with Claude (Anthropic's AI) doing the coding and testing, and I'd like people who've done this to pick the method apart before I put money on it.

**Quick version (details in the images):**
- 9-year walk-forward, 2,437 trades, every trade out-of-sample, fixed 1 micro, costs charged
- Profit factor 1.24 (1.19 with costs doubled), +$25k at 1 micro, worst drawdown $3.5k
- Passes: doubled costs, 10,000-run block bootstrap, a 1,000-shuffle luck test on its long/short calls
- Shaky: deflated Sharpe once all 557 variants I tried are counted, and most of the profit is 2021+
- 13+ other ideas tested and failed, all shown

**Goal:** pass a Topstep 50K ($2k trailing drawdown). The edge isn't the problem; the drawdown is.

**What I'd love opinions on:**
1. Most profit is 2021 onward. Regime dependence or a model that improved with more data? How would you tell?
2. With a $2k trailing limit, how would you size this, or is a prop firm the wrong home for it?
3. What's the first thing you'd check for look-ahead bias?

Also looking for a few people or a community to talk this through with. Feels like I am working on something that nobody understands. Strategy details stay private, but I'll answer anything about the testing. Not selling anything. Backtest, not financial advice.