You have a brilliant idea: "Buy when RSI crosses above 30." You test it and... it doesn't work. You add a moving average filter. It improves slightly. You add another. And another. You end up with 15 conditions and a perfect backtest that falls apart in live trading.
The problem wasn't the idea. It was the structure.
A trading strategy isn't just an entry setup. It's a complete system with 6 interdependent components. Ignoring any of them is like building a car without brakes: it might start, but the ending is guaranteed.
If you're coming from our algorithmic trading guide, you already understand the ecosystem. With the right algorithmic trading tools and reliable market data, now you'll learn how to build strategies with professional structure.
Build your strategy with professional structure
Our Algo Strategy Builder includes all components ready to customize in TradingView.
Explore Builder →The 6 Components of Every Strategy
Before diving deep, here's the complete map:
| # | Component | Question It Answers |
|---|---|---|
| 1 | Setup | What market context should I trade in? |
| 2 | Trigger | What's the exact entry signal? |
| 3 | Entry | How do I execute the order? |
| 4 | Stop Loss | Where do I invalidate the idea? |
| 5 | Take Profit | When do I collect profits? |
| 6 | Position Sizing | How much capital do I risk? |
The 90% Mistake
Most traders spend 90% of their time on points 1 and 2 (setup and trigger). Professionals know that points 4, 5, and 6 (stop, profit, sizing) determine whether you survive long-term.
Setup: The Market Context
The setup defines the market conditions in which your strategy should operate. It's not the entry signal, but the preliminary filter that says "now it makes sense to look for trades."
Example: "I only look for longs when price is above the 200-period moving average."
The setup does NOT tell you when to enter. It tells you when to start looking for entries.
Setup vs Trigger: The Fatal Confusion
| Aspect | Setup | Trigger |
|---|---|---|
| What it is | Market conditions/context | Precise and specific event |
| When | Develops over time | Happens in an instant |
| Role | Says a trade may be coming | Says act now |
| Example | Price > MA200, ADX > 25 | RSI crosses above 30 |
| Without it | False entries (no context) | Don't know when to act |
Many traders confuse these concepts. "Buy when RSI crosses 30" is not a complete strategy. In what context? In an uptrend, downtrend, or range? RSI crossing 30 in a strong downtrend is a trap, not an opportunity.
Types of Setups
📈 Trend Setup
- Price above/below moving averages
- ADX > 25 (directional)
- Higher highs/lows pattern
↔️ Range Setup
- ADX < 20 (sideways)
- Price oscillating between levels
- Tight Bollinger Bands
💥 Volatility Setup
- ATR expanding
- ATR contracting (pre-breakout)
- VIX at extremes
🔄 Mean Reversion Setup
- RSI at extremes (<20 or >80)
- Price far from mean (2+ ATR)
- Divergences in oscillators
🚀 Breakout Setup
- Prior consolidation (tight range)
- Volume decreasing before break
- Price near key resistance/support
📊 Momentum Setup
- Sustained positive/negative ROC
- Price making new highs/lows
- Volume confirming direction
Regime Filters
A common mistake is creating a strategy that works in trends and applying it always. Markets constantly change regimes.
Simple but Effective Filter
- MA50 > MA200 → Bullish regime → Longs only
- MA50 < MA200 → Bearish regime → Shorts only or stay out
- MA50 ≈ MA200 (difference < 1%) → Range → Mean reversion strategies
Trigger: The Entry Signal
The trigger is the specific signal that fires the entry once the setup is active. It's the "now" of your strategy.
Active Setup + Trigger = Entry
Price-Based Triggers
- Level breakout: Price breaks N-bar high
- Pullback to support: Price touches zone and bounces
- Candlestick patterns: Engulfing, hammer, star
- Gap: Open significantly different from previous close
Indicator-Based Triggers
- Moving average crossover: Fast MA crosses slow MA
- Oscillators: RSI exits oversold, MACD crosses signal
- Momentum: Positive ROC, price vs N-bars ago
Combining Conditions
Robust strategies often combine multiple triggers:
Setup: Price > MA200 AND ADX > 25
Trigger: RSI < 30 AND price touches lower Bollinger Band
Entry: At bar close if both conditions are met Beware of Complexity
More conditions don't mean a better strategy. Each added condition reduces the number of trades and increases the risk of overfitting.
Entry: How and When to Enter
Entry Order Types
| Type | Advantage | Disadvantage | Use When |
|---|---|---|---|
| Market | Guaranteed execution | Slippage | Bar close signals |
| Limit | Exact price | May not execute | Pullbacks, reversions |
| Stop | Enters only on breakout | Slippage on gaps | Breakouts, level breaks |
Warning: Limit Orders in Backtesting
Many platforms have execution issues with limit orders in backtesting. The typical problem: the backtest assumes your order executes when price "touches" your level, but in reality you need price to cross through that level to guarantee the fill. This can artificially inflate results. Always verify how your platform handles limit orders.
The Slippage Problem
Slippage is the difference between expected price and actual execution price. In backtesting, always assume some slippage:
- Liquid markets (ES, EUR/USD): 0.5-1 tick
- Less liquid markets: 1-3 ticks
- High volatility: 2-5 ticks or more
Rule: If your strategy stops being profitable with 2 ticks of slippage per trade, it probably doesn't have real edge.
Intrabar Simulation: Critical Tool
A serious backtesting problem is not knowing what happened first within a bar. If both stop loss and take profit are touched on the same candle, which executed first?
To solve this, it's essential to use intrabar simulation tools that reconstruct price movement within each candle:
| Platform | Tool | Configuration |
|---|---|---|
| TradingView | Bar Magnifier | Use lower timeframe to simulate |
| TradeStation | Look-Inside-Bar (LIB) | Tick or minute based on chart |
| MultiCharts | Bar Magnifier | By tick, second, minute or day |
| NinjaTrader | Intrabar Granularity | Via Secondary Bar Series |
| AmiBroker | TimeFrame Functions | Manual implementation |
Golden Rule
If your strategy operates on 1-hour timeframes or higher, always enable intrabar simulation. Without it, your results can be significantly distorted, especially in strategies with tight stops and targets.
Stop Loss: Your Life Insurance
Stop loss is the most important component after position sizing. It defines the point where you admit you were wrong and close the position.
Types of Stop Loss
1. Fixed Stop (in points or %)
Example: 20 pip stop, 2% stop. Simple but ignores volatility. A 20 pip stop in calm EUR/USD is different from 20 pips in volatile GBP/JPY.
2. ATR-Based Stop (Recommended)
Example: Stop at 2 × ATR(14). Automatically adapts to volatility. The ATR was created by J. Welles Wilder Jr. (also creator of RSI and ADX) and is the foundation of stops in most professional systems. Curtis Faith's Turtle Traders used ATR multipliers of 2x-4x.
3. Technical Stop
Below support, recent high/low. Makes logical sense: if price reaches there, the idea is invalidated. Requires adjusting position sizing accordingly.
Where NOT to Place Your Stop
- Exactly at round numbers: Everyone puts stops there → stop hunting
- Exactly at the previous low: Too obvious
- So tight that normal volatility triggers it: You lose due to noise, not being wrong
Golden rule: Your stop should be where, if price reaches it, your trading thesis no longer makes sense.
Trailing Stop and Break Even
Trailing Stop
Moves in favor of your position. Protects accumulated gains. Types: fixed, ATR-based, at highs/lows.
Break Even (BE)
Move stop to entry point with certain profit. Warning: Moving to BE too early significantly reduces Profit Factor.
Take Profit: When to Collect Profits
Types of Take Profit
There are two main philosophies for defining where to take profits:
Fixed Take Profit
Defined before entering and doesn't change during the trade. Common types:
🎯 R:R Ratio Based
TP distance = X times the SL distance. Example: if stop is 20 pips, TP at 60 pips (3:1). Simple and consistent.
📊 ATR Based
TP at N × ATR from entry price. Automatically adapts to current volatility.
📍 Technical Level
At prior resistance/support, recent high/low (H/L), or Fibonacci level. Has market logic.
🔢 Round Number or Pivot
At psychological levels (1.3000, 50.00) or Pivot Points (R1, R2, S1, S2). Areas where price often reacts.
Dynamic Take Profit
Changes based on market conditions while the trade is open:
📈 Trailing Stop
Stop moves in your favor protecting gains. Can be fixed (X pips), ATR-based, or at N-bar highs/lows.
📉 Moving Average Cross
Exit when price crosses below MA20 or MA50. Allows capturing long trends while they last.
📊 VWAP
Exit when price crosses back through VWAP in opposite direction. Useful intraday to detect control change.
⚡ Indicator Signal
RSI enters overbought (>70), MACD crosses down, or your chosen oscillator gives opposite signal.
Risk/Reward Ratio and Breakeven Win Rate
The Risk/Reward Ratio (R:R) measures the relationship between what you risk (distance to stop loss) and what you expect to gain (distance to take profit):
Formula:
Risk/Reward = Distance to Take Profit / Distance to Stop Loss
An R:R of 2:1 means the potential profit is double the risk. But R:R cannot be analyzed in isolation: you need to know the minimum win rate to reach breakeven:
Breakeven Formula:
Minimum breakeven Win Rate = 1 / (1 + R:R)
| R:R Ratio | Minimum Win Rate |
|---|---|
| 1:1 | 50% |
| 1.5:1 | 40% |
| 2:1 | 33% |
| 3:1 | 25% |
| 4:1 | 20% |
This means that an R:R of 2:1 requires only a 33% win rate to break even, while a 1:1 ratio requires 50%. Trend-following strategies typically have high R:R (3:1+) with low win rates (30-40%), while mean reversion strategies have low R:R (1:1) with high win rates (60-70%).
Partial Exits
A common technique is closing the position in tranches:
- 50% at 1:1 R:R (lock in something)
- 25% at 2:1
- Remaining 25% with trailing stop (let it run)
Trade-off: Partial exits reduce variance but can also reduce expected return if the strategy has a good win rate. Test both approaches with your specific strategy.
Does your strategy have positive expectancy?
Validate your components with advanced statistical analysis, Monte Carlo, and Walk Forward.
Analyze my strategy →Position Sizing: The Ignored Secret
Why It's More Important Than the Setup
Two traders with the same strategy can have completely different results just due to position sizing:
| Trader | Risk per Trade | DD in Losing Streak | Result |
|---|---|---|---|
| A | 1% of capital | 10-15% | Keeps trading |
| B | 10% of capital | 50-60% | Account blown |
The best setup in the world won't help if poor sizing destroys your account during a losing streak.
Van Tharp, author of Trade Your Way to Financial Freedom, demonstrated that setup and entry account for less than 10% of a system's success. The remaining 90% depends on position sizing and psychology. In an experiment with 100 traders using exactly the same 50 trades, final results varied enormously: the only difference was how much each person risked per trade. Perry Kaufman, in his reference work Trading Systems and Methods, reaches similar conclusions: money management is the differentiating factor between long-term winning and losing systems.
Expectancy: The Metric That Validates Your Edge
Before deciding how much to risk, you need to know if your strategy has real edge. Expectancy (expected value) tells you:
Expectancy (Expected Value) Formula:
Expectancy = (Win% × Avg Win) - (Loss% × Avg Loss)
Example
- Win rate: 60%
- Average win: $100
- Average loss: $50
Expectancy = (0.6 × $100) - (0.4 × $50) = $40 per trade
A positive expectancy confirms your system has edge. Now you can size positions with confidence. For a complete analysis of this and other metrics, see our trading metrics guide.
Fixed Fractional (% Fixed Risk)
The most widely used method and recommended for beginners:
Fórmula:
Position Size = (Capital × % Risk) / Distance to Stop Loss
Example
- Capital: $50,000
- Risk per trade: 1%
- Distance to stop: $2.00 per share
Position = ($50,000 × 0.01) / $2.00 = 250 shares
Recommended risk: 0.5% - 2% per trade. Never more than 2% for strategies not extensively tested.
Other Position Sizing Methods
Besides Fixed Fractional, there are other popular methods:
💵 Fixed Dollar Risk
Always risk the same $ amount (e.g., $500 per trade). Simple but doesn't scale with account growth.
📦 Fixed Contract/Lot
Always same number of contracts (e.g., 2 lots). Very simple but actual risk varies with volatility.
📊 Volatility-Based (ATR)
Smaller positions in volatile markets, larger in calm ones. Formula: (Capital × % Risk) / (ATR × Multiplier)
🎲 Kelly Criterion
"Optimal" sizing based on your historical edge. Warning: Extremely aggressive. Use Half-Kelly or Quarter-Kelly in practice. Poor sizing amplifies drawdown.
📐 Optimal F
Created by Ralph Vince, similar to Kelly but optimized for geometric growth. Requires extensive history and iron discipline.
📈 Fixed Ratio
Developed by Ryan Jones in The Trading Game. Increase size when you accumulate X $ in profits (delta). Allows more conservative scaling than Fixed Fractional.
Kelly Criterion: The Optimal Sizing Formula
Developed by John Kelly Jr. at Bell Labs in 1956, this formula calculates the optimal percentage of capital to risk in order to maximize long-term growth:
Kelly Criterion Formula:
Kelly % = W - [(1-W) / R] W = Win Rate R = Avg Win / Avg Loss (win/loss ratio)
Full Kelly Is Extremely Aggressive
Standard practice is to use only 25-50% of the calculated value (Half-Kelly or Quarter-Kelly). Full Kelly produces drawdowns that most traders cannot psychologically endure. Combining Kelly with strict drawdown control is essential.
Position Sizing Methods Compared
| Method | Complexity | Advantage | Risk |
|---|---|---|---|
| Fixed Fractional (% fixed) | Low | Simple, scales with account | Slow growth |
| Volatility-Based (ATR) | Medium | Adapts to volatility | Requires reliable ATR |
| Kelly Criterion | High | Theoretical optimal growth | Extremely aggressive |
| Half/Quarter Kelly | High | Reduces Kelly volatility | Requires extensive historical data |
| Optimal F | High | Maximizes geometric growth | Potentially enormous drawdowns |
| Fixed Ratio | Medium | Conservative scaling | Slower than Kelly |
Recommendation for Beginners
If you're starting out, use Fixed Fractional at 1%. It's the most balanced method between growth and protection. More sophisticated methods (Kelly, Optimal F) require extensive history and can be dangerous if applied incorrectly.
Checklist: Is Your Strategy Complete?
Before coding or backtesting, answer these questions:
Setup:
☐ What market context does it operate in?
☐ Is there a regime filter?
Trigger:
☐ What's the exact signal?
☐ Is it defined without ambiguity?
Entry:
☐ Market, limit, or stop order?
☐ At what point in the bar?
Stop Loss:
☐ Where exactly?
☐ Is it fixed or dynamic?
Take Profit:
☐ How do you define the exit?
☐ Fixed target, signal, or trailing?
Position Sizing:
☐ What % of capital do you risk?
☐ How do you calculate size?
If you can't answer any of these precisely, your strategy isn't complete. Once all 6 components are defined, the next step is to create your strategy step by step and then validate the strategy with backtesting, walk-forward analysis, and Monte Carlo simulation to ensure that backtesting problems aren't distorting your results.
Summary
A trading strategy isn't just an entry setup. It's a complete system with 6 components working together. Most traders fail not because of bad setups, but by ignoring the other components. A mediocre strategy with good position sizing survives. A "perfect" strategy with bad sizing blows accounts. Once all 6 components are defined, validate your system with trading metrics and advanced risk-adjusted metrics.
Continue your learning
Frequently Asked Questions
Position sizing is more important for survival in the long term. The best setup in the world won't help if poor sizing destroys your account during a losing streak. Recommendation: never risk more than 1-2% per trade.
Your stop should be where, if price reaches it, your trading thesis no longer makes sense. Options: ATR-based (2x ATR), technical (below support), or fixed. Avoid exact round numbers and stops that are too tight.
Standard recommendation: 0.5% to 2% of capital per trade. Never more than 2% for strategies not extensively tested. Professionals typically use 0.5-1%.
The R:R compares what you risk vs what you expect to gain. There's no universal minimum: trend strategies use 3:1 with 30-40% win rate, mean reversion strategies use 1:1 with 60-70% win rate. What matters is positive expectancy.
The setup defines favorable context (e.g., price above MA200). The trigger is the specific entry signal (e.g., RSI crosses 30). Active setup + Trigger = Entry. Without setup, the trigger can be a trap.
Expectancy measures how much you expect to win per trade on average. It's calculated as: Expectancy = (Win% × Avg Win) - (Loss% × Avg Loss). Example: with 60% win rate, average win of $100 and average loss of $50: (0.6 × $100) - (0.4 × $50) = $40 per trade. If positive, your strategy has edge.
A trailing stop is a dynamic stop loss that moves in favor of your position as price advances, protecting accumulated gains. It can be fixed (X pips behind price), ATR-based (2× ATR behind), or at N-bar highs/lows. It's ideal for trend-following strategies where you want to capture long moves without capping upside potential. The Turtle Traders used ATR trailing stops with 2x-4x multipliers.
A strategy has edge if its expectancy is positive: (Win% × Avg Win) - (Loss% × Avg Loss) > 0. Validate with backtesting, walk-forward analysis, and Monte Carlo simulation to confirm the edge is real and not overfitting.
From Theory to Practice
Build strategies with professional structure and validate them with advanced statistical analysis.