Building your entry and exit rules.
Entry and exit rules are precise when two people reading them would take the same trade at the same price. Each rule names a timeframe, a price type, a number and an order type. A complete set covers the filter, trigger, entry, stop, target, position size and a time limit, plus what to do in awkward cases.

Hand your written rules to a friend and ask them to trade them for a week without asking you a single question.
If you both end up with the same trades at the same prices, the rules are finished. If not, part of the system still lives in your head.
The previous lesson described what a trading system contains. This one shows how to write its entry and exit rules so that nothing is left to mood or memory.
What makes a trading rule precise enough?
Take the rule "buy the breakout". On the 1-hour chart of EUR/USD, the highest high of the last 10 candles is 1.08400, and price pushes through it.
Trader A buys the moment price trades above the high and gets 1.08410. Trader B waits for the candle to close above the high, then buys at the next open and gets 1.08460.
Both followed the rule, and their entries are 5 pips apart. The rule left two questions open: does a touch count or only a close, and what order comes next?
A precise rule answers every question a person could ask while following it: which chart and timeframe, which price, which number, which order type and when the rule stops applying.
One quick check is to imagine turning the rule into code for a trading platform. If a programmer would have to ask you what you meant, two traders will read it differently too.
The parts a complete rule set needs
A full set of entry and exit rules answers six questions in a fixed order. Any one you leave out gets answered on the spot, usually while price is moving.
- A filter decides whether you look for trades at all, for example only when price is above a moving average.
- A trigger is the exact event that starts a trade, such as a candle closing above a level.
- The entry order says how you get in: a market order at the next open, or a pending order at a set price.
- The stop loss marks the price where the trade idea is wrong, written as a level or a distance in pips.
- The target says how a winning trade ends, as a fixed distance, a trailing stop or an opposite signal.
- Position size says how much you trade, usually set so that hitting the stop costs a fixed share of the account.
The example used through this lesson fills the six slots like this:
A seventh slot is easy to forget. A time exit closes a trade that has reached neither its stop nor its target after a set number of candles, so a position cannot drift for days.
How do you turn a vague rule into an exact one?
First drafts often lean on words such as near, slows or a little. Each of those words hides a choice, so replace it with a number, a price type or a timeframe.
| Vague | Precise |
|---|---|
| Trade with the trend | Only buy when the last closed 1-hour candle is above the 50-period SMA |
| Buy the breakout | Buy at market at the next open after a 1-hour close above the highest high of the previous 10 candles |
| Stop below the swing | Stop 2 pips below the low of the signal candle |
| Take profit when it slows | Target at twice the stop distance |
| Risk a little | Risk 1% of balance, lot size rounded down to the nearest 0.01 lot |
| Get out if it stalls | Close at market after 24 candles if neither stop nor target is hit |
Every rule in the right column can be checked on a chart after the fact. That matters for testing, because a rule you cannot check on old charts cannot be backtested.
A worked example on EUR/USD
Here is the rule set applied to one trade, with round illustrative prices and a $5,000 account. The rules are a teaching example only, and this lesson makes no claim that they are profitable.
- Check the filter: the last closed 1-hour candle is above the 50-period simple moving average, so you look for a trigger.
- Check the trigger: the highest high of the previous 10 candles is 1.08400. The next candle opens at 1.08360 and closes at 1.08450, above that high. This is the signal candle, and its low is 1.08280.
- Enter: a market buy at the open of the next candle fills at 1.08460.
- Set the stop 2 pips below the signal low: 1.08280 minus 0.00020 = 1.08260. The distance is 1.08460 minus 1.08260 = 0.00200, which is 20 pips.
- Set the target at twice the stop distance, 40 pips: 1.08460 plus 0.00400 = 1.08860.
- Size the trade: 1% of $5,000 is $50. One standard lot of EUR/USD moves $10 per pip, so 20 pips cost $200 per lot, and $50 ÷ $200 = 0.25 lot.
At 0.25 lot each pip is worth $2.50. A stop at 1.08260 loses 20 × $2.50 = $50, and a target at 1.08860 gains 40 × $2.50 = $100.
Commission and swap, where they apply, reduce the gain and add to the loss.
In the chart, price reaches 1.08860 on the fifth candle after the signal, so the target closes the trade. Anyone reading these rules would have taken exactly this trade.
For pairs where a pip is not worth $10 per lot, the position size lesson and the lot size calculator do the same sum.
Rules for the awkward cases
Many arguments with yourself happen in situations the rules never mentioned. Write one line for each before it comes up.
- A second signal arrives while a trade is open. Decide in advance whether you ignore it or add to the position, for example one trade per pair at a time.
- A big scheduled release is close. A line such as no new entries 30 minutes before a high-impact event on the economic calendar removes the guesswork.
- The lot size comes out uneven. With a 23-pip stop, $50 ÷ $230 = 0.217 lot. Rounding down to 0.21 lot keeps the risk at 23 × $2.10 = $48.30, under the $50 limit.
- Price gaps past your stop. A stop order fills at the next available price, so the loss can be larger than planned. This is slippage, and your rules should allow for it.
- On old candle data, the stop and the target both sit inside one candle. You cannot see which came first, so decide to count it as a loss, the cautious reading.
Where precise rules still fall short
Precision makes a rule testable. It tells you nothing about whether the rule makes money, and a perfectly clear rule can lose steadily.
Breakout rules have a known weak spot: price can push through a level and then fall back inside, the pattern covered in false breakouts. The stop in the example exists because some breakouts will fail that way.
It is tempting to add a condition after every losing trade. Each extra filter makes the rules fit past charts more closely, which makes them more likely to describe old noise than future behaviour.
Before you trust any rule set, check it against past data, the subject of how to backtest a strategy. A backtest only means something when the rules are exact enough to apply without judgement.
Questions
What is the difference between a filter and a trigger?
A filter decides whether you look for trades at all, such as price above a moving average. A trigger is the single event that opens a trade once the filter is passed.
Should exit rules be as exact as entry rules?
Yes. The stop, the target and any time limit should be written before the trade opens, because deciding an exit while a trade is open invites changing it.
How many rules should a trading system have?
There is no fixed number. You need enough to answer every question from filter to position size, and each extra condition should have a reason you can state before you look at results.
Can I still use judgement with written rules?
You can, but then your results include your judgement, and a backtest of the written rules no longer describes what you trade. If you want room for judgement, write down exactly where it applies, such as a list of reasons to skip a signal.
Keep learning
Chapter 3What is a trading system?A trading system is a written set of rules that decides which market you trade, when you enter, when you exit and how much you risk on each trade. Following the same rules every time makes your decisions consistent and lets you measure results, though no system wins every trade or guarantees a profit.
Chapter 3How to backtest a strategy.Backtesting means applying fixed entry and exit rules to past price data, one candle at a time, and recording every trade the rules would have taken, including costs. The result shows how the rules behaved in the past, with their win rate and worst drawdown. It cannot prove future profits, and errors like look-ahead bias inflate it.
Chapter 3Forward testing on a demo account.Forward testing means running a trading system on live prices as they arrive, usually on a demo account, before you risk real money. It checks whether backtest results survive real spreads, slippage, missed signals and your own discipline. Use the same rules, account size and lot sizing you plan to use live, and record every trade.