Why "Tuning" Your Profitable Bot Matters More Than Finding It

Most of the automated trading discussion I see focuses entirely on finding a profitable idea. Way less gets said about what happens after you find one, the tuning process that decides whether that bot survives contact with live markets or blows up in the first volatility spike that doesn’t look like your backtest.

A few things I’ve learned building and running NinjaScript strategies overnight:

1. Fewer parameters, more survival. If your strategy has 10+ optimizable inputs, you probably don’t have an edge, you have a curve fit. I cap my strategies at 4 parameters. If I can’t explain in one sentence why each parameter exists, it gets cut.

2. ATR-based stops, not fixed-dollar stops. Volatility regimes change. A stop that made sense in a quiet session will get run over in a fast one. Sizing risk off ATR means the strategy adapts on its own instead of you having to babysit it.

3. Walk-forward, not just backtest. A strategy that only gets validated on the same data it was built on is basically guaranteed to look great and trade terribly. Run it through NinjaTrader’s Strategy Analyzer walk-forward before you even think about Sim, let alone live.

4. Hard time exits. If your edge lives in a specific session window, exit at the window’s end, no exceptions, no discretion. The moment you let yourself override the bot “just this once,” you’ve stopped running a system and started gambling with extra steps.

Attaching one of my free strategies below, NSQ Overnight Breakout, as a concrete example of what a 4-parameters-only, ATR-based, hard-time-exit bot looks like in practice. It trades the low-liquidity overnight range on NQ/MNQ (00:00 to 02:30 ET range build, 02:30 to 04:00 ET breakout window, forced flat by 04:00 ET). Happy to share the full backtest writeup if anyone wants it, just ask below.

Curious what parameter-count discipline (or lack of it) has cost other people here, would love to hear how you all approach the tuning side once you’ve got something that shows promise in testing.

1 Like

I actually have a different perspective on this. I don’t think having more information is the problem. I think the real issue is how the developer uses that information. There’s nothing inherently wrong with having more indicators, filters, or data sources if each one contributes something meaningful. The problem starts when they’re redundant, poorly integrated, or added just to improve a backtest.

To me, it’s similar to building a car. More sensors don’t make the car worse they make it more capable, provided the software knows how to interpret them correctly. Trading systems are no different. A well designed system that combines multiple independent sources of information can be more robust than a simple one. The challenge isn’t the number of parameters; it’s the developer’s ability to understand how those pieces work together and avoid overfitting.

So I wouldn’t blame the instruments themselves. I’d blame the architecture behind them. A good developer can build a complex system that generalizes well, while a poor developer can overfit even a strategy with only a couple of parameters., it’s like when someone says I’m over trading, there is no such thing as over trading when you have a great system, however I might be wrong ,

1 Like

“Attaching one of my free strategies below, NSQ Overnight Breakout”

Did you attach thr strategy or did I miss it?

This is my personal opinion:

1. Fewer parameters, more survival.

I have more parameters, if I reduce the number, my performance goes down and my drawdown goes up. So fewer is not always better.

2. ATR-based stops, not fixed-dollar stops.

I don’t use ATR based stops and also no fixed-dollar stops. I use fix stops that are optimized on back test performance. I never pay attention to ATR, as past confirmed me that ATR is irrelevant for me. It depends of how good your entries and exits are, and if your signals are generated in high volatility periods or not.

3. Walk-forward, not just backtest.

I only do/did backtesting. The real trading is, to me, the forward testing. Back test is based on real data, so that should be good enough for future trading.

A perfect example of a successful hedge fund that has done extensive backtesting is Renaissance Technologies. Their unique mathematical models and extensive backtesting have made them extremely successful.

4. Hard time exits.

Time is to me irrelevant. Entries and exits are always based on strength of the trend. So price is irrelevant. Value/evolution of the indicator measuring the strength of the trend is defining the entries and exits, no matter where the price is.

One day I will be as good as Renaissance Technologies, till then I will keep on dreaming, so far my scores are good enough

To become as good as Renaissance Technologies, you will have to change your mindset. If so far your scores are good enough, you have not enough ambition to ever get even close to them. You should consider your scores as not good enough. If not you will keep on dreaming.

1 Like

I agree with that. A very performing system can never be simple.

What you need is very strong analytical skills to “read” the total picture that your indicators/parameters show you. If you miss these skills, you will get overwhelmed or confused by the indicators/parameters, and you will not see clearly what the picture is.

Strong analytical skills show you the correlation between the different indicators/parameters, and how they interfere with each other.

1 Like