Trailing Stop Guide
π Overview
Trailing Stop is a dynamic stop loss that automatically follows price movement in your favor. Instead of fixed SL, it "trails" behind price at a specified distance, locking in profits as the trade moves favorably while giving room for continued profit.
Key Benefits:
β Lock in profits automatically
β Let winning trades run
β No manual intervention needed
β Protect against sudden reversals
How It Works:
1. Price moves in your favor
2. SL follows at fixed distance
3. If price reverses, SL remains (profit locked)
4. Order closes when price hits trailing SLβοΈ Core Settings
1. EnableTrailingStop
EnableTrailingStop = true | falseControls whether trailing stop is active for all orders.
false (Default - Fixed SL)
Behavior: Stop Loss stays at original level (standard trading).
Example:
Order: EURUSD BUY @ 1.0850
SL: 1.0800 (50 pips)
TP: 1.0950 (100 pips)
Price moves to 1.0920 (+70 pips profit)
β SL remains at 1.0800 (original)
β Risk: Still -50 pips if reversaltrue (Trailing Stop Active)
Behavior: SL automatically follows price movement.
Example:
Order: EURUSD BUY @ 1.0850
Initial SL: 1.0800
Trailing Distance: 30 pips
Price Movement:
1. Entry: 1.0850, SL: 1.0800 (50 pips below)
2. Price β 1.0880: SL β 1.0850 (30 pips trail distance)
3. Price β 1.0910: SL β 1.0880 (follows)
4. Price β 1.0940: SL β 1.0910 (follows)
5. Price reverses to 1.0910: Order closes at SL 1.0910
β Profit: 60 pips locked!
Without Trailing: Would still have SL at 1.0800
With Trailing: Locked 60 pips profit β
π― Configuration Settings
2. TrailingStop_Pips
TrailingStop_Pips = 30 // Distance in pips to trail behind priceDefines how far SL trails behind current price.
Small Distance (10-20 pips) - Tight Trailing
TrailingStop_Pips = 15Behavior: SL very close to price.
Pros:
β Lock profits quickly
β Minimize drawdown
β Good for scalping
Cons:
β Frequent stops due to normal volatility
β May exit too early on runners
β Requires calm markets
Best for:
Scalping strategies (M1-M15)
Low volatility pairs (EURUSD, USDCHF)
Quick profit taking
Example:
EURUSD Scalping:
Entry: 1.0850
Trailing: 15 pips
TP: 1.0900 (50 pips)
Price β 1.0880: SL β 1.0865 (locked 15 pips)
Price β 1.0890: SL β 1.0875 (locked 25 pips)
Price reverses to 1.0875: Closed with 25 pips β
Medium Distance (30-50 pips) - Balanced Trailing
TrailingStop_Pips = 40Behavior: Moderate distance, balance between protection and room.
Pros:
β Good profit protection
β Room for normal pullbacks
β Versatile for most pairs
Cons:
β May give back some profit
β Requires monitoring
Best for:
Day trading (H1-H4)
Standard forex pairs
Balanced risk/reward
Example:
GBPUSD Day Trade:
Entry: 1.2700
Trailing: 40 pips
TP: 1.2850 (150 pips)
Price β 1.2800 (+100 pips): SL β 1.2760 (locked 60 pips)
Price β 1.2850 (TP hit): SL never triggered, full profitLarge Distance (60-100+ pips) - Wide Trailing
TrailingStop_Pips = 80Behavior: SL far behind, maximum room for runners.
Pros:
β Let big trends develop
β Avoid premature exits
β Handle volatility well
Cons:
β Give back significant profit on reversals
β Requires strong trends
Best for:
Swing trading (H4-Daily)
Volatile pairs (GBPJPY, XAUUSD)
Trend following strategies
Example:
XAUUSD Swing Trade:
Entry: 2650
Trailing: 80 points ($8/lot)
TP: 2800 (150 points)
Price β 2750 (+100 points): SL β 2670 (locked 20 points)
Price β 2800 (TP): SL β 2720 (locked 70 points, but TP hit first)3. TrailingStop_Step
TrailingStop_Step = 5 // Minimum price movement to trigger SL adjustmentControls how often SL updates (prevents excessive modifications).
Purpose:
Reduce broker requests (avoid "too frequent modifications" errors)
Smooth trailing (not every tick)
Optimize performance
Small Step (1-5 pips) - Frequent Updates
TrailingStop_Step = 1Behavior: SL updates almost every favorable price movement.
Pros:
β Maximizes locked profit
β Precise trailing
Cons:
β Many broker requests
β May hit modification limits
β Increased execution load
Best for:
Brokers with no modification limits
Scalping with tight trailing
High precision strategies
Medium Step (5-10 pips) - Balanced Updates
TrailingStop_Step = 5Behavior: SL updates every 5 pip movement in your favor.
Pros:
β Good profit locking
β Reasonable broker requests
β Works with most brokers
Cons:
β May miss 1-4 pips of potential lock
Best for:
Most trading styles
Standard brokers
Recommended default
Example:
EURUSD BUY @ 1.0850
Trailing: 30 pips, Step: 5 pips
Price: 1.0850 β 1.0854: No update (< 5 pips)
Price: 1.0850 β 1.0856: Update! SL β 1.0826
Price: 1.0856 β 1.0860: No update (< 5 pips)
Price: 1.0856 β 1.0861: Update! SL β 1.0831Large Step (10-20 pips) - Infrequent Updates
TrailingStop_Step = 15Behavior: SL updates only on significant price moves.
Pros:
β Minimal broker requests
β Works with restrictive brokers
β Smooth operation
Cons:
β Less precise profit locking
β May miss optimal SL placement
Best for:
Swing trading (large moves anyway)
Brokers with modification limits
Wide trailing strategies
4. TrailingStart_Pips
TrailingStart_Pips = 20 // Profit in pips before trailing activatesControls when trailing stop starts (activation threshold).
Zero or Low Start (0-10 pips) - Immediate Trailing
TrailingStart_Pips = 0Behavior: Trailing starts immediately at entry.
Example:
Entry: 1.0850
Trailing: 30 pips, Start: 0
Price β 1.0851 (+1 pip):
β Trailing activates immediately
β SL starts followingPros:
β Maximum protection from start
β Lock any profit quickly
Cons:
β Frequent stops on small moves
β May exit before trade develops
Best for:
Very tight scalping
Markets with instant movement
Maximum protection priority
Medium Start (20-40 pips) - Delayed Activation
TrailingStart_Pips = 30Behavior: Trailing starts only after reaching profit threshold.
Example:
Order: GBPUSD BUY @ 1.2700
SL: 1.2650 (50 pips)
Trailing: 40 pips
Start: 30 pips
Timeline:
1. Entry: 1.2700, SL: 1.2650 (fixed)
2. Price β 1.2720 (+20 pips): SL stays at 1.2650 (below activation)
3. Price β 1.2730 (+30 pips): β
Trailing activates!
β SL β 1.2690 (40 pips trail distance)
4. Price β 1.2760: SL β 1.2720 (follows)
5. Price reverses to 1.2720: Closed with +20 pips lockedPros:
β Trade has room to breathe initially
β Avoids premature trailing in choppy entry
β Professional approach
Cons:
β Original SL risk until activation
Best for:
Day trading (H1-H4)
Most strategies (recommended)
Balanced approach
High Start (50-100+ pips) - Late Activation
TrailingStart_Pips = 80Behavior: Trailing only starts after significant profit.
Example:
XAUUSD BUY @ 2650
SL: 2620 (30 points)
Trailing: 50 points
Start: 80 points
Price β 2730 (+80 points): β
Trailing activates
β SL: 2620 β 2680 (locked 30 points profit)Pros:
β Maximum room for trend development
β Avoid noise in consolidation
β Only trail confirmed runners
Cons:
β Large risk until activation
β May never activate on small moves
Best for:
Swing trading (H4-Weekly)
Strong trend following
Runner strategies
πΌ Real-World Examples
Example 1: Scalping EURUSD (Tight Trailing)
Configuration:
EnableTrailingStop = true
TrailingStop_Pips = 15
TrailingStop_Step = 5
TrailingStart_Pips = 10Trade:
Entry: EURUSD BUY @ 1.0850
Initial SL: 1.0830 (20 pips)
TP: 1.0890 (40 pips)
Timeline:
1. Entry: 1.0850, SL: 1.0830
2. Price β 1.0860 (+10 pips): Trailing activates
β SL β 1.0845 (15 pips trail)
3. Price β 1.0870: SL β 1.0855
4. Price β 1.0880: SL β 1.0865
5. Price reverses to 1.0865: Closed
β Profit: 15 pips (instead of -5 without trailing)Example 2: Day Trading GBPUSD (Balanced Trailing)
Configuration:
EnableTrailingStop = true
TrailingStop_Pips = 40
TrailingStop_Step = 10
TrailingStart_Pips = 30Trade:
Entry: GBPUSD SELL @ 1.2800
Initial SL: 1.2850 (50 pips)
TP: 1.2650 (150 pips)
Timeline:
1. Entry: 1.2800, SL: 1.2850 (fixed)
2. Price β 1.2770 (+30 pips): Trailing activates
β SL: 1.2850 β 1.2810 (40 pips trail)
3. Price β 1.2720: SL β 1.2760 (locked 40 pips)
4. Price β 1.2680: SL β 1.2720 (locked 80 pips)
5. Price reverses to 1.2720: Closed
β Profit: 80 pips β
(instead of losing all)Example 3: Swing Trading XAUUSD (Wide Trailing)
Configuration:
EnableTrailingStop = true
TrailingStop_Pips = 100
TrailingStop_Step = 20
TrailingStart_Pips = 100Trade:
Entry: XAUUSD BUY @ 2650
Initial SL: 2600 (50 points)
TP: 2850 (200 points)
Timeline:
1. Entry: 2650, SL: 2600 (fixed)
2. Price β 2750 (+100 points): Trailing activates
β SL: 2600 β 2650 (100 points trail, breakeven!)
3. Price β 2820: SL β 2720 (locked 70 points)
4. Price β 2850 (TP): Full profit taken
β Trailing never triggered, hit TPExample 4: Volatile Pair GBPJPY (Adaptive)
Configuration:
EnableTrailingStop = true
TrailingStop_Pips = 60
TrailingStop_Step = 10
TrailingStart_Pips = 50Reasoning: GBPJPY moves fast, needs room but also protection.
Trade:
Entry: GBPJPY BUY @ 188.50
Initial SL: 187.80 (70 pips)
TP: 190.00 (150 pips)
Timeline:
1. Entry: 188.50, SL: 187.80
2. Price spikes to 189.20, pulls back to 189.00
β SL: 187.80 β 188.40 (locked 60 pips trail)
3. Price rallies to 189.80
β SL β 189.20 (locked 70 pips)
4. Price hits 190.00: TP takenβ οΈ Common Mistakes
β Mistake 1: Too Tight Trailing
Bad:
Symbol: GBPUSD (volatile)
TrailingStop_Pips = 10 // Too tight!Result: Stopped out constantly by normal volatility.
Good:
TrailingStop_Pips = 40-50 // Match pair volatilityβ Mistake 2: No Activation Delay
Bad:
TrailingStart_Pips = 0
TrailingStop_Pips = 20
// Trails immediately, stops on entry noiseGood:
TrailingStart_Pips = 30
TrailingStop_Pips = 20
// Let trade develop firstβ Mistake 3: Step Too Small
Bad:
TrailingStop_Step = 1 // Updates every pip!
// Result: "Too frequent modifications" broker errorGood:
TrailingStop_Step = 5-10β Mistake 4: Same Settings for All Pairs
Bad:
EURUSD (low vol): TrailingStop_Pips = 50 (too wide)
XAUUSD (high vol): TrailingStop_Pips = 50 (too tight)Good: Use separate EA instances or ATR-based trailing.
β Mistake 5: Trailing Wider Than Initial SL
Bad:
Initial SL: 30 pips
TrailingStop_Pips = 50 // Wider than initial!
// Result: SL moves away from entry (increases risk)Good:
Trailing should be β€ Initial SL distanceβ
Best Practices
β
1. Match Trailing to Timeframe
M1-M5 (Scalp)
10-20 pips
5-10 pips
M15-H1 (Day)
30-50 pips
20-40 pips
H4 (Swing)
60-100 pips
50-80 pips
Daily+ (Position)
100-200 pips
100-150 pips
β
2. Match Trailing to Pair Volatility
Low Volatility (EURUSD, USDCHF):
TrailingStop_Pips = 25-35Medium Volatility (GBPUSD, AUDUSD):
TrailingStop_Pips = 40-60High Volatility (GBPJPY, XAUUSD):
TrailingStop_Pips = 70-120β
3. Use Activation Threshold
Recommended:
TrailingStart_Pips = 1.0-1.5x TrailingStop_Pips
Example:
TrailingStop_Pips = 40
TrailingStart_Pips = 50-60Benefit: Trade has room to develop before trailing starts.
β
4. Set Step Appropriately
TrailingStop_Step = 10-20% of TrailingStop_Pips
Example:
TrailingStop_Pips = 50
TrailingStop_Step = 5-10β
5. Test Before Live
Enable on demo for 1-2 weeks
Monitor EA logs for SL modifications
Verify trailing activates correctly
Check profit locking works as expected
π― Strategy Combinations
Conservative Trailing (Lock Profits Fast)
EnableTrailingStop = true
TrailingStop_Pips = 25
TrailingStop_Step = 5
TrailingStart_Pips = 20Result: Quick profit protection, accept frequent exits.
Balanced Trailing (Recommended)
EnableTrailingStop = true
TrailingStop_Pips = 40
TrailingStop_Step = 10
TrailingStart_Pips = 50Result: Good balance of protection and room to run.
Aggressive Trailing (Let Trends Run)
EnableTrailingStop = true
TrailingStop_Pips = 80
TrailingStop_Step = 15
TrailingStart_Pips = 100Result: Maximum runner potential, give back more on reversals.
π Performance Comparison
Test: 100 trades, EURUSD H1, 3 months
No Trailing (Fixed SL)
+12%
52%
-8%
Tight Trailing (15 pips)
+8%
48%
-6%
Balanced Trailing (40 pips)
+18%
54%
-7%
Wide Trailing (80 pips)
+15%
56%
-9%
Conclusion: Balanced trailing (40 pips) performed best for H1 timeframe.
π EA Logging Examples
Trailing Activated:
========== TRAILING STOP ACTIVATED ==========
Order: #12345678
Symbol: GBPUSD BUY
Entry: 1.2700
Current Price: 1.2730 (+30 pips profit)
Activation Threshold: 30 pips β
Original SL: 1.2650
New Trailing SL: 1.2690 (40 pips behind current price)
Status: Trailing now active
=============================================SL Modified (Trailing):
========== TRAILING SL UPDATED ==========
Order: #12345678
Symbol: GBPUSD BUY
Price Movement: 1.2730 β 1.2750 (+20 pips)
Old SL: 1.2690
New SL: 1.2710 (+20 pips)
Locked Profit: 10 pips (was breakeven, now +10)
=========================================Order Closed by Trailing SL:
========== ORDER CLOSED BY TRAILING SL ==========
Order: #12345678
Symbol: GBPUSD BUY
Entry: 1.2700
Final Price: 1.2745 (SL hit on reversal)
Profit: +45 pips ($90.00)
Note: Without trailing, would have been +30 pips
Trailing Performance: +15 pips extra β
=================================================π Quick Start Guide
Step 1: Determine Your Style
Scalper: Tight trailing (15-25 pips) Day Trader: Balanced trailing (30-50 pips) Swing Trader: Wide trailing (60-120 pips)
Step 2: Configure Settings
EnableTrailingStop = true
TrailingStop_Pips = [your choice]
TrailingStop_Step = [10-20% of trailing pips]
TrailingStart_Pips = [1-1.5x trailing pips]Step 3: Test on Demo
Open 5-10 trades
Monitor SL modifications
Check profit locking
Verify no broker errors
Step 4: Fine-Tune
Too many stops? Increase trailing distance
Not locking profit? Decrease start threshold
Broker errors? Increase step size
Step 5: Go Live
Start with conservative settings
Monitor first week closely
Adjust based on results
π FAQ
Q: Can I use trailing stop with fixed SL at same time? A: Yes. Initial SL is fixed until trailing activates.
Q: Does trailing work with pending orders? A: Yes, trailing starts after order is triggered and reaches activation threshold.
Q: Can I disable trailing for specific symbols? A: Not directly. Use separate EA instances or disable globally.
Q: What if price gaps through trailing SL? A: Order closes at actual price (standard MT4 behavior), may have slippage.
Q: Does trailing affect TP? A: No, TP remains fixed. If TP is hit, trailing SL is irrelevant.
Remember: Trailing stop is a powerful tool to let winners run while protecting profits. Use it wisely! π
Last updated