"Buy when RSI is oversold and the trend is up."
It sounds like a complete idea. Give it to five people who write trading code and you'll get five different strategies: different candles, different entries, different exits. All five will be "correct". Their backtests won't agree, and none of them will be the strategy you had in mind.
The problem is rarely the idea. It's the gap between the sentence and the rules.
Disclosure: I'm a co-founder of Trend0x, a tool that turns trading ideas written in plain words into rules you can test. The checklist below is what we use when we write those rules. It works the same with any backtester, or with a pen.
Seven questions every rule has to answer
1. Which market, and which candles?
"BTC" is not a market. BTCUSDT spot and BTCUSDT perpetual futures have different prices, fees and funding. Name the pair, spot or futures, and the timeframe: "BTCUSDT spot, 4-hour candles".
2. When is the rule checked?
Do you check the condition while the candle is still forming, or only after it closes? A live candle can cross a line and come back before it closes. A rule checked intrabar can trigger on something that, a minute later, never happened.
Default to closed candles. Then say when the order fills: usually at the open of the next candle.
3. A level, or a cross?
This one changes results more than any other. Two very different rules hide in the same sentence:
- Level: RSI(14) is below 30. True on every candle while RSI stays in the zone.
- Cross: RSI(14) crosses below 30. True on one candle only, the one where it enters the zone.
In code the difference is one line:
import pandas as pd
def rsi_signals(rsi: pd.Series, threshold: float = 30):
level = rsi < threshold # every candle in the zone
cross = (rsi < threshold) & (rsi.shift(1) >= threshold) # only the candle that enters it
return level, cross
A level rule can fire many candles in a row. A cross fires once per visit to the zone. If you hold one position at a time, the first entry may be the same, but re-entries and the trade count won't be. Pick one on purpose and write it down.
4. What exactly is "the trend"?
"Uptrend" needs a definition you can compute:
- price closes above EMA 200 (a level, true for weeks at a time);
- EMA 50 crosses above EMA 200 (an event, a few times a year);
- EMA 50 is above EMA 200 (a level again, different from both).
All three are reasonable. They give very different strategies.
5. AND, OR, and which direction?
"RSI oversold and trend up" means both must be true on the same closed candle. Say so. If the idea also trades shorts, write the short rules separately. Don't let "mirror it for shorts" hide a second strategy you never looked at.
6. How does the trade end?
An entry without an exit is half a rule. Write the stop and the target as numbers:
- the stop: a fixed percentage, or a multiple of ATR (for example, 1.5 × ATR(14) below entry);
- measured from what: the fill price, or the close of the signal candle;
- the target: a percentage, or a multiple of the stop distance ("2R" means twice the distance to the stop);
- anything else that closes the trade: an opposite signal, a time limit, the end of a session.
7. How much, how often, and when not?
- Size: for example, 1 % of the balance per trade.
- How many positions at once, and whether a new signal is ignored while one is open.
- Filters: days of the week and hours. Write the time zone. "Monday to Friday" in UTC and in New York time are not the same days at the edges.
A worked example
Here is the opening sentence after the seven questions:
market: BTCUSDT, spot, 4h candles
checked_on: closed candle; orders fill at the next candle's open
entry_long:
- price closes above EMA(200) # level: the trend filter
- RSI(14) crosses below 35 # cross: one signal per dip
- both on the same closed candle
stop: 1.5 × ATR(14) below the fill price
target: 2R (twice the stop distance)
other_exit: none
size: 1 % of balance; one position at a time; ignore signals while in a trade
filters: none (all days, all hours, UTC)
Every line can be checked by a machine, and every line could have gone another way. That's the point. When the backtest comes back, you know exactly which idea it tested.
A simple test: read it back
When I think a rule is finished, I give it to someone else and ask them to mark the trades on a chart by hand. If their marks differ from mine on even one candle, the rule isn't finished. The usual suspects are "below" (level or cross?), "trend" (which one?) and "stop" (from where?).
It feels slow. It's much faster than tuning a strategy for a week and then finding out it was testing a different idea.
How we use this in Trend0x
When you describe an idea to the assistant in Trend0x, it writes back rules in this form: entry conditions, exits, size and market, each one a line you can read and switch on or off. You review them before any test runs, and nothing trades until you choose to. The checklist above is what we look for in that rule card.
If you build trading tools yourself, I'd recommend the same habit: show the rules back to the user in plain words before anything is tested.
The short version
An idea becomes a strategy only when it answers seven questions: market and candles, when it's checked, level or cross, what "trend" means, how conditions combine, how the trade ends, and how much and when. Write the answers down before you open the backtester.
Backtests and paper trading are simulations on data that is already known. They are not forecasts, and real fills can differ. This post is not financial advice, and trading can lose money.
Which part of turning ideas into rules trips you up most often? I'd like to hear it in the comments.
Thanks for reading ❤️
Top comments (0)