🚀Advanced Features
Trade Protection & Profit Management
BananaEA includes sophisticated trade management features that protect profits and reduce risk as trades move in your favor.
Break-Even Protection
What It Does
Automatically moves stop loss to entry price when trade reaches profit threshold, eliminating risk of loss.
Settings
UseBreakEven
true — Enable break-even feature
false — Disable (SL stays at original distance)
BreakEvenTrigger
What it does: Profit level (in ATR) required to trigger break-even.
Configuration:
Default: 1.0 ATR
Range: 0.5–5.0 ATR
Examples:
0.5 = Aggressive (move to BE quickly, higher chance of BE stop-outs)
1.0 = Balanced (recommended)
2.0 = Conservative (trade must be well in profit before BE triggers)
BreakEvenOffset
What it does: Additional pips beyond entry to place BE stop (secures small profit).
Configuration:
Default: 2.0 pips
Range: 0.0–10.0 pips
Purpose: Ensures trade closes in small profit if reversed (accounts for spread/commission)
How It Works
Example calculation:
Entry: 1.1000
SL: 1.0980 (20 pips)
TP: 1.1100 (100 pips)
BreakEvenTrigger = 1.0 ATR (= 10 pips)
BreakEvenOffset = 2 pips
Trade reaches 1.1010 (10 pips profit = 1.0 ATR)
→ SL moves to 1.1002 (entry + 2 pip offset)
→ Guaranteed 2 pip profit if reversed
Best Practices
Aggressive break-even (scalping):
BreakEvenTrigger = 0.5 ATR
BreakEvenOffset = 1-2 pips
Moves to BE quickly
Protects capital early
Higher chance of BE stop-outs
Balanced break-even (swing trading):
BreakEvenTrigger = 1.0 ATR
BreakEvenOffset = 2-3 pips
Gives trade room to breathe
Protects profit once confirmed
Recommended for most traders
Conservative break-even (position trading):
BreakEvenTrigger = 2.0 ATR
BreakEvenOffset = 5 pips
Only activates when trade well in profit
Minimizes BE stop-outs
Maximizes trend capture
Partial Close
What It Does
Takes partial profit at target while leaving remaining position to run toward final TP.
Settings
UsePartialClose
true — Enable partial profit taking
false — Disable (trade runs to full TP or SL)
PartialCloseTrigger
What it does: Profit level (in ATR) to trigger partial close.
Configuration:
Default: 2.0 ATR
Range: 0.5–10.0 ATR
Example: 2.0 ATR = Close partial when trade reaches 2 × ATR profit
PartialClosePercent
What it does: Percentage of position to close.
Configuration:
Default: 50%
Range: 25%–75%
Examples:
25% = Take small profit, let majority run
50% = Balance (recommended, secure half + let half run)
75% = Take most profit, minimal runner
How It Works
Example:
Entry: 1 lot BUY at 1.1000
SL: 1.0980 (20 pips)
TP: 1.1100 (100 pips)
PartialCloseTrigger = 2.0 ATR (= 20 pips)
PartialClosePercent = 50%
Trade reaches 1.1020 (20 pips profit = 2.0 ATR)
→ Close 0.5 lot at 1.1020 (secure 10 pip profit × 0.5 lot)
→ Remaining 0.5 lot stays open targeting 1.1100
→ SL can be moved to BE on remaining position
Strategy Benefits
Why use partial close:
✅ Secures profits early (removes anxiety)
✅ Lets winners run (captures big moves)
✅ Reduces impact of reversals
✅ Improves psychological confidence
Profit comparison:
Without partial close:
Win: +100 pips × 1 lot = +100 pips
Loss (reversed from +50 pips): -20 pips × 1 lot = -20 pips
With partial close (50% at 2.0 ATR):
Win: (+20 pips × 0.5 lot) + (+100 pips × 0.5 lot) = +60 pips
Loss (reversed from +50 pips): (+20 pips × 0.5 lot) + (-20 pips × 0.5 lot) = 0 pips
Result: Partial close protected you from loss in reversal scenario.
Trailing Stop
What It Does
Follows price in profit, locking in gains while allowing trade to capture larger moves.
Settings
UseTrailingStop
true — Enable trailing stop
false — Disable (SL stays fixed)
TrailingTrigger
What it does: Minimum profit (in ATR) before trailing starts.
Configuration:
Default: 1.5 ATR
Range: 0.5–5.0 ATR
Purpose: Prevents premature trailing in choppy markets
TrailingDistance
What it does: Distance (in ATR) to trail behind price.
Configuration:
Default: 1.0 ATR
Range: 0.5–3.0 ATR
Examples:
0.5 = Tight trailing (captures small moves, more stop-outs)
1.0 = Balanced (recommended)
2.0 = Wide trailing (gives trade room, fewer stop-outs)
TrailMinimumMovement
What it does: Minimum price movement required to update trailing SL.
Configuration:
Default: 5 pips
Range: 1–20 pips
Purpose: Reduces broker API calls by 70-90% (avoid micro-trailing)
How It Works
Example:
Entry: 1.1000 BUY
SL: 1.0980 (20 pips)
TrailingTrigger = 1.5 ATR (= 15 pips)
TrailingDistance = 1.0 ATR (= 10 pips)
Price reaches 1.1015 (15 pips profit = 1.5 ATR)
→ Trailing activates
→ SL moves to 1.1005 (current price 1.1015 - 10 pips trailing distance)
Price continues to 1.1040
→ SL trails to 1.1030 (1.1040 - 10 pips)
→ Locked in 30 pips profit
Price reverses to 1.1030
→ SL triggered at 1.1030
→ Trade closes with 30 pip profit (instead of riding it back down)
Trailing Strategies
Tight trailing (scalping):
TrailingTrigger = 0.5 ATR
TrailingDistance = 0.5 ATR
TrailMinimumMovement = 2 pips
Follows price closely
Captures small moves
Higher chance of early exits
Balanced trailing (swing trading):
TrailingTrigger = 1.5 ATR
TrailingDistance = 1.0 ATR
TrailMinimumMovement = 5 pips
Gives trade breathing room
Balances capture vs exits
Recommended for most traders
Wide trailing (trend trading):
TrailingTrigger = 2.0 ATR
TrailingDistance = 2.0 ATR
TrailMinimumMovement = 10 pips
Maximizes trend capture
Minimizes premature exits
Best for strong trending markets
Combining Features
Example 1: Maximum Protection Strategy
Goal: Secure profits at every stage, minimize risk.
UseBreakEven = true
BreakEvenTrigger = 1.0 ATR
UsePartialClose = true
PartialCloseTrigger = 2.0 ATR
PartialClosePercent = 50%
UseTrailingStop = true
TrailingTrigger = 3.0 ATR
TrailingDistance = 1.5 ATR
Workflow:
Trade reaches 1.0 ATR profit → Move to break-even (no risk)
Trade reaches 2.0 ATR profit → Close 50% (secure profit)
Trade reaches 3.0 ATR profit → Start trailing remaining 50%
Remaining position trails to capture extended moves
Example 2: Let Winners Run Strategy
Goal: Capture maximum profit on winning trades.
UseBreakEven = true
BreakEvenTrigger = 2.0 ATR
UsePartialClose = false
UseTrailingStop = true
TrailingTrigger = 2.0 ATR
TrailingDistance = 2.0 ATR
Workflow:
Trade reaches 2.0 ATR profit → Move to break-even + start trailing
No partial close (full position stays)
Wide trailing distance (2.0 ATR) gives trade maximum room
Captures full profit of trending moves
Example 3: Scalping Strategy
Goal: Quick in, quick out with secured profits.
UseBreakEven = true
BreakEvenTrigger = 0.5 ATR
UsePartialClose = true
PartialCloseTrigger = 1.0 ATR
PartialClosePercent = 75%
UseTrailingStop = false
Workflow:
Trade reaches 0.5 ATR → Move to break-even quickly
Trade reaches 1.0 ATR → Close 75% (secure most profit)
Remaining 25% runs to full TP
No trailing (rely on fixed TP for remaining position)
Best Practices
Feature Activation Order
Logical progression:
Break-even (earliest) → Eliminates risk
Partial close (middle) → Secures initial profit
Trailing (latest) → Maximizes extended profit
Recommended timing:
BreakEvenTrigger < PartialCloseTrigger < TrailingTrigger
Example:
Break-even at 1.0 ATR
Partial close at 2.0 ATR
Trailing starts at 3.0 ATR
ATR vs Fixed Pips
For advanced features, ATR-based is recommended:
Adapts to market volatility
Works across different trading sessions
Consistent behavior across symbols
Fixed pips can be used for:
Specific strategies with consistent volatility
Backtested exact values
Simple, predictable behavior
Performance Optimization
Test these combinations in backtesting:
Break-even only
Break-even + partial close
Break-even + trailing
All three features combined
Analyze:
Win rate impact
Average profit per trade
Maximum drawdown
Profit factor
Troubleshooting
Issue: Break-Even Triggered Too Early
Symptoms: Many trades hit BE then reverse for full TP.
Solutions:
Increase
BreakEvenTrigger
(try 1.5 or 2.0 ATR)Review entry quality (early BE may indicate weak entries)
Consider skipping BE for trend-following strategies
Issue: Partial Close Reduces Profit
Symptoms: Winners would have hit full TP with full position.
Solutions:
Reduce
PartialClosePercent
(try 25% instead of 50%)Increase
PartialCloseTrigger
(close later, closer to TP)Test disabling partial close for trending markets
Issue: Trailing Stops Out Too Early
Symptoms: Trade trails then stops out before reaching TP.
Solutions:
Increase
TrailingDistance
(give trade more room)Increase
TrailingTrigger
(start trailing later)Increase
TrailMinimumMovement
(reduce micro-adjustments)Consider using break-even + fixed TP instead
Related Settings
Stop Loss & Take Profit - SL/TP calculation methods
Trade Management Mode - Magic = 0 enhancements
Risk Management - Position sizing with advanced features
Quick Reference
Break-Even
1.0 ATR
Eliminate risk
Partial Close
2.0 ATR
Secure initial profit
Trailing Stop
1.5-3.0 ATR
Capture extended moves
Balanced configuration (recommended):
UseBreakEven = true
BreakEvenTrigger = 1.0 ATR
UsePartialClose = true
PartialCloseTrigger = 2.0 ATR
PartialClosePercent = 50%
UseTrailingStop = true
TrailingTrigger = 2.0 ATR
TrailingDistance = 1.0 ATR
Last updated