Feature Engineering for Trading Signals:
Custom Indicators That Find Edge

Every trader has the same raw data. Counting how often the RSI fires, how recently, and against what else — that’s where the asymmetry lives. A practical guide to building custom signals that carry information competitors don’t have.

By David Bergstrom··10 min read

What Is Feature Engineering?

Feature engineering is manipulation of your dataset to improve predictive or machine-learning models. Trading indicators are themselves a form of feature engineering, since they’re transformations of OHLCV price data. But there are many other ways to extract useful information, and most traders never reach for them.

This post walks through how to use feature engineering to build trading signals that describe the market environment in ways competitors aren’t describing it — which is where uncorrelated edge actually lives.

Why It Matters for Trading

If every trader has the same data — and they roughly do — then creativity in how you transform it is the difference maker. Using raw indicators alone misses context. Transforming raw data into features adds context, and context is what separates “the RSI is below 30” from “the RSI has been below 30 for four of the last five sessions while VIX is rising.”

Creating new features helps differentiate between two similar but meaningfully different market environments. Trading systems and machine learning algorithms are not good at inferring what hasn’t been explicitly given to them. The model is only as good as what you can feed it. The better you convey the market environment, the better chance your systems have at long-term success.

“Volume divided by the price change three days ago, yeah, we’d include that.” — Jim Simons, on Renaissance’s signal philosophy

Simons wasn’t talking about a clever indicator. He was talking about feature engineering — comparing data values across time with math operators, looking for asymmetry. That mindset is the whole game.

Simple Feature Engineering Techniques

You don’t need machine learning to do this. Most of the highest-value feature engineering uses simple operations on OHLCV data. Here are the building blocks.

Lag

Lagging price data, indicator values, or events can be more useful than the raw signal. The market may take time to digest an event — by lagging your trading signal, you can capture the delayed reaction instead of the noisy initial one. The 2-RSI crosses below 15, but the real edge may live two or three days later, not the day after. Build Alpha’s Delayed Test handles this systematically.

Math Operators

Comparing data values with math functions is the simplest and most overlooked technique. Volume divided by the price change three days ago. Today’s range over the 20-day average range. RSI minus its own 5-day mean. These transformations cost nothing to compute and often reveal asymmetries the raw values hide.

Summing

The sum of RSI values over the last five days may carry more information than today’s RSI. Sustained levels matter differently than spike levels. Summing is how you tell your system the difference.

Counting

How often does an event occur? If the daily low has been below the previous low four times in the last five sessions, that’s a different regime than the same event happening once. Counting is one of the most powerful transformations available and it’s almost trivial to build.

Averaging

The moving average is a simple way to smooth noisy price data. It’s also useful for dealing with sporadic missing values, though that’s rare in OHLCV time series. Smoothing helps systems stay even-keeled and not whipped by single-bar noise.

Scaling and Standardizing

The NYSE Tick value ranges from -1000 to +1000. RSI ranges from 0 to 100. Machine-learning models may incorrectly weight a feature based on the magnitude of its scale rather than its predictive value. Scaling normalizes ranges so the model compares apples to apples. Standardizing — expressing values in units of standard deviation — does the same for features with different underlying distributions.

Last True

How many bars ago was a signal last true? If a two- or three-standard-deviation down day happened recently, the regime is different than if it hasn’t happened in a year. The recency of an event is its own feature.

Sequence Match

Was the signal true four bars in a row? True, false, true, true? The sequence of recent outcomes carries information that the most recent value alone doesn’t. There are 16 possible four-bar binary sequences and they don’t all mean the same thing.

Most Recent

Given two signals, which was true most recently? This sounds trivial. It isn’t. Build Alpha can take any two signals and return which was most recently true, and the impact on strategy performance can be significant.

Signal Correlation

Monitor the correlation between two signals across one or more lookback windows. How does your system perform when these two signals appear together vs. when they conflict? Behaved markets and disorderly markets show up in correlation structure before they show up in price.

Weighted Relationship

Apply weights to two signals and look at the relationship. One signal may carry more information than another — give it more weight. Is the weighted sum above some threshold? Below? This is how you convert two noisy signals into one cleaner composite.

Advanced Patterns Worth Building

The simple techniques above are the vocabulary. Below are five complete patterns that traders consistently overlook — each one is a different way of asking the same underlying question: what’s actually going on in this market right now?

01
Signal Frequency

How often is the signal firing relative to the lookback? A signal that’s true 30% of the time in the last 50 bars describes a fundamentally different market than the same signal at 5%. Frequency turns a binary event into a regime indicator.

count(signal, N) / N

Use it for: Identifying when a setup is over-firing (likely crowded) vs. under-firing (likely fresh). Pair with a price-action filter and you’ve got regime gating.

02
Signal Freshness

Is the signal firing more often recently than it has historically? Freshness compares a long-window count against a short-window count and lights up when the short window is meaningfully higher. New regimes show up here first.

count(signal, 250) < count(signal, 50) * 1.1

Use it for: Catching regime shifts before the equity curve confirms them. Useful as an entry gate on mean-reversion strategies that fail in trends.

03
Signal Contradiction

Signal A is true and Signal B is false. The asymmetry is the feature. A bullish setup that fires while a bearish confirming signal is silent often outperforms either one alone, because the contradiction filters out the obvious cases everyone else is trading.

signalA AND NOT signalB

Use it for: Filtering out crowded trades. If both signals fire, the move is already priced. If only one fires, you may be early.

04
Delay + Condition

The signal fired yesterday and something else is true today. Markets digest events. The reaction is often a day or two after the trigger, not the same bar. Combining a lag with a same-bar confirmation captures the digestion phase.

signal[1] AND close[0] > close[1]

Use it for: Waiting for confirmation that the market has accepted the signal before you commit. Reduces whipsaws on signals that fire intra-bar.

05
Sweetspot

The signal has fired enough times to confirm a regime, but not so often that the trade is exhausted. Above the lower bound, below the upper bound. This is the Goldilocks version of frequency — neither too cold nor too hot.

count(signal, N) > 5 AND count(signal, N) < 30

Use it for: Avoiding the worst of both ends. Too few fires = the regime hasn’t established. Too many = you’re late and the move is over.

The Mental Model

Every one of these patterns is asking a different question about the same underlying signal. The signal is the noun. The transformation is the verb. Most traders only ever ask “is it true right now?” Feature engineering is what happens when you start asking “how often, how recently, against what, and in what state of the regime?”

Build Custom Signals With No Code

Build Alpha supports 7,000+ built-in signals across 17 categories — price action, technical indicators, volume, volatility, seasonality, market breadth, sentiment, yields, spreads, economic data, COT data, news, option flows, intermarket, multi-timeframe, fundamentals, and weather. The custom signal editor lets you build any of the patterns above (and many more) through a graphical interface, with no code required.

The custom signals you create get passed to the Build Alpha strategy engine alongside the built-in library. The genetic algorithm treats them as first-class building blocks. Whatever you build, Build Alpha can validate and export to TradeStation EasyLanguage, MultiCharts PowerLanguage, NinjaTrader C#, MetaTrader 4 and 5, TradingView Pine Script, IBKR Python, and ProRealTime.

Example: Building a Count Signal

Recreating the “lower lows in the last 5 days” count from the original research:

  1. Open the editor. File → Custom Signal Editor (or press F4).
  2. Add a new signal. Hit Add, name it, and select Comparative type.
  3. Choose the Count function. Select Count F from the function list, hit the pencil to edit, and configure the underlying event (e.g. Low[0] < Low[1]).
  4. Set the comparison. Set the operator to >= and the value to 4 — meaning the count must be at least 4 over the 5-day window.
Build Alpha custom signal editor showing the no-code interface for building feature-engineered indicators with point-and-click functions
The custom signal editor. Build any of the 5 advanced patterns above without writing code
Build Alpha Count F function configuration showing the comparative operator and value threshold for a custom counting signal
Count F config: comparing the count to a threshold

The configuration pane on the left is doing the work. The Count F function wraps the underlying event (Low[0] < Low[1]), the lookback window sits to its right, and the comparative operator and threshold sit below. That single panel can build every pattern in §4.

# Resulting signal definition (read as: “lower lows happened 4+ times in last 5 bars”)
Count(Low[0] < Low[1], 5) >= 4

That’s it. The signal is now available to the strategy engine alongside the 7,000+ built-in ones. Want to test the “at least 2 of the last 3 days” version, then a 50-day rolling percentage of that count? You can nest a Count F inside a Count F. The original article on this technique covers more nested patterns:

# Percentage of last 50 days where 2+ of the prior 3 days had a lower low
Count(Count(Low[0] < Low[1], 3) >= 2, 50) / 50 > 0.6

This is the same feature pattern that lit up as a bear-market warning into 2008 and 2022 — the percentage of recent days with sustained lower-low pressure climbs into rising-stress regimes.

50-day rolling percentage of bars with sustained lower lows on the SP500 — values climbing into 2008 and 2022 bear-market regimes
50-day rolling percentage of bars where 2+ of the prior 3 days closed lower — climbs into rising-stress regimes like 2008 and 2022, falls during the 2010–2021 bull run
Nested Count F configuration in Build Alpha custom signal editor — a count function inside a count function for rolling-window regime detection
A Count F inside a Count F. Same point-and-click interface, just nested — the 50-day rolling percentage above is built with this single configuration

Prompt to Signal

Now you can type any signal idea in plain English and any connected AI can convert the concept into Build Alpha’s backend. This means the signal will be selectable, testable, optimizable, and exportable to any platform Build Alpha supports!

Automated Feature Engineering

You don’t have to build every custom signal by hand. In the Additional Settings menu, enable Machine Generated Rules and specify how many signals Build Alpha should create automatically. The engine will take your selected signals and parameter ranges and generate unique custom features — correlation pairs, last-true counts, sequence matches, weighted combinations, sweetspots, contradictions — and feed them into the strategy search.

Build Alpha Machine Generated Rules settings panel — controls for automatically generating custom feature-engineered signals from existing signal pool and parameters
Machine Generated Rules in Additional Settings — set the count, hit Start, and Build Alpha generates the custom signals automatically

What Machine Generated Rules Builds

Pairwise correlations between any two signals over multiple lookbacks. Counts of how often each signal has fired. Sequence checks (TFTF, TTFT, FFTT, etc.). Most-recent comparisons between signal pairs. Weighted sums with auto-tuned weights. Sweetspot bands. All generated, all validated, all available to the genetic algorithm in one click.

This is the rapid-prototyping mode. Instead of hand-building five custom signals and seeing which ones the strategy engine likes, you generate hundreds and let the genetic algorithm pick. The validation pipeline — noise testing, vs random benchmarking, walk-forward analysis — still applies, so curve-fitting from over-generation gets filtered out the same way it does for built-in signals.

LLM-Generated Signals

The newest frontier: connect an LLM (Claude, GPT, Gemini, Grok) as your strategy research orchestrator and the model can write new signal definitions mid-session and hand them to the genetic algorithm. If the LLM decides that a custom volatility-adjusted breadth metric would help in the current market regime, it writes the signal, Build Alpha validates it, and the strategy engine starts evolving systems that use it.

Build Alpha simulation planner showing Claude authoring new entry and exit signals for a COT, VIX term, and vol-normalized momentum strategy
Claude authoring new entry and exit signals mid-session inside Build Alpha’s simulation planner

This is the same idea as the Machine Generated Rules feature, taken further. Instead of pattern-based generation, the model proposes features based on what it’s reading in the AutoTune output. The validation pipeline still applies — every LLM-generated signal goes through the same robustness gates as built-in ones.

The Honest Caveat

More features doesn’t mean better strategies. The risk with both automated and LLM-driven feature engineering is that you generate so many candidates that some pass robustness testing by chance. Build Alpha’s noise tests, walk-forward, and vs random benchmarks exist precisely to catch this. Generation is cheap. Validation is the expensive part — and the part that actually matters.

Final Thoughts

Feature engineering is where the creative edge in systematic trading still lives. Everyone has the same RSI. Almost no one is asking how many times the RSI fired in the last 50 bars, whether that’s high relative to the last 250, and whether a contradictory signal is silent. Those questions are cheap to build, cheap to test, and produce features that competitors aren’t using.

Build Alpha gives you three ways to do it: build custom signals by hand with the no-code editor, generate them automatically with Machine Generated Rules, or hand the steering wheel to an LLM. Whichever path you pick, the validation pipeline catches the false positives. The features that survive are the ones worth trading.

Build Alpha desktop interface showing custom signal editor, genetic algorithm engine, and validation pipeline for feature engineering workflow
Build Alpha. Custom signal editor, 7,000+ built-in signals, automated feature engineering, and LLM-driven signal creation — all in one no-code workflow
David Bergstrom Build Alpha founder and quantitative trading strategist

David Bergstrom

Founder, Build Alpha

A decade-plus in professional trading as a market maker and quantitative strategy developer at a high-frequency trading firm with a CME seat. Consulting for hedge funds, CTAs, family offices, and RIAs. Self-taught C++, C#, and Python programmer specializing in data science, machine learning, and trading strategy development.

Frequently Asked Questions

What is feature engineering in trading?

Feature engineering is the process of transforming raw market data or existing indicators into new signals that carry more information than the originals. Counting how often an event occurs, lagging an indicator, comparing two signals, or building a sweetspot range are all examples. The goal is to give your strategy engine context the raw data doesn’t provide.

Why does feature engineering matter for systematic trading?

Every trader has access to the same RSI, MACD, and price data. If you’re searching the same signal space as everyone else, you’re competing for the same edge. Feature engineering lets you describe market conditions in ways your competitors aren’t, which is where uncorrelated returns come from.

Do I need to code to build custom signals?

No. Build Alpha’s custom signal editor is point-and-click — you can build counting, frequency, contradiction, sweetspot, and dozens of other patterns through a graphical interface. Python is supported if you want it, but isn’t required.

How many signal categories does Build Alpha support?

Build Alpha ships with 7,000+ built-in signals across 17 categories: price action, technical indicators, volume, volatility, seasonality, market breadth, sentiment, yields, spreads, economic data, COT data, news, option flows, intermarket, multi-timeframe, fundamentals, and weather. Custom signals you create through feature engineering add on top of these.

What’s the difference between feature engineering and signal optimization?

Optimization tunes parameters within an existing signal (the lookback on an RSI, the threshold on a Bollinger Band). Feature engineering creates a fundamentally new signal — counting how many times the RSI crossed below 30 in the last 5 days is a different signal, not a different parameterization of the existing one. More on this distinction.

Can the LLM orchestrator create new signals?

Yes. Build Alpha’s LLM orchestrator can write signal definitions mid-session and feed them into the genetic algorithm. The model proposes the feature; Build Alpha validates whether it carries information. This effectively automates the feature engineering process while keeping the validation pipeline in place.

Ready to BUILD ALPHA?

Build custom signals, validate them rigorously, and export to every platform you trade.

No coding needed

Stop Wasting Time
Coding, Testing, Coding, Testing…

Build Alpha’s Genetic Algorithm uses your inputs to create 1000s of trading strategies in seconds

View Demo
Recent Posts
Get updates & ideas
Learn more about BA & get exclusive insights