⚠️ Risk warning: CFDs and leveraged forex are complex instruments with a high risk of losing money rapidly. Most retail accounts lose money. This content is education only, not investment advice or a recommendation.
A setup is a trade idea written as rules that another person could follow and get the same trades. "Buy strong pullbacks" is not a setup. "On H4, when price is above a rising EMA 20, buy the first candle that closes back above the previous candle’s high after touching the EMA, with the stop below the pullback low" is. Rules are what make an idea testable.
The five parts of a setup
- Context: the market, the timeframe and the trend condition (for example price above a rising EMA 20, or higher highs and higher lows on the timeframe above).
- Area: where the trade may happen (a moving average, a flipped level, a demand zone).
- Trigger: the exact event that opens the trade, judged on closed candles.
- Stop: where the idea is wrong, usually just beyond the pullback low or high.
- Exit: a target in R (multiples of the risk), a trailing rule or a time limit, decided in advance.
Backtesting without fooling yourself
- Write the rules first, then go through the chart from left to right. Use the bar replay tool in TradingView or the strategy tester in MT5 so you cannot see the future candles.
- Log every trade the rules give you, including the ugly ones, in R: a loss at the stop is −1R, a win at a 2R target is +2R.
- Collect enough trades. A handful of trades says almost nothing; luck dominates small samples. Test across different conditions: trends, ranges and volatile news periods.
- Do not change the rules mid-test. If you want to change a rule, start a new test, and check it on a period you did not use to design it (see overfitting).
- Include costs: spread, commission and swap. A setup that only works before costs does not work.
Common mistakes
- Skipping trades in the test that "you would not have taken". In real time you would not have known.
- Looking ahead: deciding an entry with candles that had not closed yet.
- Judging the setup on one good month instead of a long, varied sample.
This lesson is educational. A backtest describes how rules behaved on past data; it does not predict future results.
🛠️ Practice task
Use a real chart. This is for practice, not for placing a trade.
- Write a setup in five lines: context, area, trigger, stop and exit. Keep it on gold H4 or EUR/USD H1.
- Open the chart in TradingView, go back at least six months and start bar replay. You can check the live gold price on the Invvex gold page.
- Step forward one candle at a time. Log every trade the rules give you: date, entry, stop, exit and result in R.
- Do not change any rule during the test. Write ideas for changes in a separate list.
- At the end, write down the number of trades, the total in R and the largest run of losses. Then ask: is this enough trades to mean anything?
🎯 Mark this chart
Study the drawing, pick the letter, then check. This exercise does not count toward your progress; the quiz below does.
✍️ Quick quiz
Check what you learned. Your answers stay in this browser.