# 🛡️ Trade Management Mode

## Magic = 0 Complete Guide[​](#magic--0-complete-guide "Direct link to Magic = 0 Complete Guide")

When `Magic = 0`, BananaEA changes into a trade manager — it stops creating new trades and focuses exclusively on managing existing positions.

> **✨ v4.4.4 Safety Enhancement:** EA now starts in PAUSED mode when attached to chart - YOU control when trading begins! Click TC button to activate when ready.
>
> **✨ v4.4.1 Control Enhancement:** TC button now cycles through THREE modes (AUTO → MANAGE → PAUSED) for complete workflow control!
>
> **✨ v3.13.1 Enhancement:** Trade Management Mode now includes real-time dashboard displays showing entry price, R:R ratio, and directional exposure for instant trade quality assessment!

***

## Overview[​](#overview "Direct link to Overview")

### What Trade Management Mode Does[​](#what-trade-management-mode-does "Direct link to What Trade Management Mode Does")

**Core functionality:**

* ✅ Automatically applies SL/TP to manual trades
* ✅ Maintains consistent risk
  
  :reward
  
  ratios
* ✅ Works with trades from ANY source (manual, copied, other EAs)
* ✅ Applies break-even, trailing, and partial close features
* ✅ **NEW (v3.13.1):** Real-time R
  
  :R
  
  ratio display with color-coded quality indicators
* ✅ **NEW (v3.13.1):** Entry price tracking with current pip difference
* ❌ Does NOT create new trades from signals

**Perfect for:**

* Manual traders wanting risk management
* Prop firm traders needing exact SL/TP ratios
* Copy trading with automated risk protection
* Managing trades from multiple sources on one symbol

***

## 🛡️ structured Safety Features (v4.4.4+)[​](#️-structured-safety-features-v444 "Direct link to 🛡️ structured Safety Features (v4.4.4+)")

### YOU Control When Trading Begins[​](#you-control-when-trading-begins "Direct link to YOU Control When Trading Begins")

**NEW: Intelligent Startup Protection**

When you attach BananaEA to any chart, it now starts in **PAUSED mode** automatically:

✅ **Complete Control** - Trading only begins when YOU decide ✅ **No Surprises** - Zero risk of accidental trades during setup ✅ **Verify First** - Time to check all settings before going live ✅ **structured Workflow** - Deliberate activation, not rushed decisions

**How It Works:**

```
STEP 1: Attach EA to chart

   ↓

✅ EA loads in PAUSED mode (TC button shows "PAUSED")

   ↓

STEP 2: Verify your settings are correct

   ↓

STEP 3: Click TC button when ready

   ↓

✅ EA activates and begins trading (AUTO or MANAGE mode)
```

**Real-World Benefits:**

**Scenario 1: Testing New Settings**

* Attach EA with new risk parameters
* EA waits in PAUSED mode ✅
* Review settings carefully
* Activate when confident
* Trade with peace of mind!

**Scenario 2: Multiple Charts Setup**

* Load EA on 5 different charts
* All stay PAUSED automatically ✅
* Activate each one individually
* Organized, structured workflow

**Scenario 3: Chart Organization**

* Switching symbols or timeframes
* EA waits patiently in PAUSED mode ✅
* Finish your setup calmly
* Activate when chart is ready

**Note:** In Strategy Tester, EA automatically starts in AUTO mode (no button clicks possible in backtesting) - smart environment detection!

***

## 🎯 Enhanced Mode Control (v4.4.1+)[​](#-enhanced-mode-control-v441 "Direct link to 🎯 Enhanced Mode Control (v4.4.1+)")

### Complete Three-State Workflow[​](#complete-three-state-workflow "Direct link to Complete Three-State Workflow")

**NEW: TC Button Power Upgrade**

The TC button now gives you **complete control** with three distinct modes:

**1️⃣ AUTO Mode (Green Background)**

* Automated signal detection enabled
* Trade execution active
* Full EA automation running
* **Click** → Switch to MANAGE mode

**2️⃣ MANAGE Mode (Orange Background)**

* Existing trades management only
* No new signal detection
* Trade management features active (BE, Trailing, PC)
* **Click** → Switch to PAUSED mode

**3️⃣ PAUSED Mode (Red Background)**

* Complete pause state
* No trading activity
* EA monitoring only
* **Click** → Switch back to AUTO mode

**Complete Control Loop:**

```
   AUTO → MANAGE → PAUSED → AUTO (cycle repeats)
```

**Perfect For:**

✅ **End of Trading Session** - AUTO → MANAGE (handle remaining trades) → PAUSED (safe idle) ✅ **News Events** - PAUSED during volatility → AUTO when calm returns ✅ **Manual Override** - Switch to MANAGE when taking manual trades alongside EA trades ✅ **Risk Management** - Quick pause during uncertain market conditions

***

## Configuration Methods[​](#configuration-methods "Direct link to Configuration Methods")

BananaEA offers two calculation methods for SL/TP placement:

### 1. ATR-Based (Adaptive)[​](#1-atr-based-adaptive "Direct link to 1. ATR-Based (Adaptive)")

**Best for:** Markets with changing volatility (forex, indices, commodities)

**How it works:**

* SL distance = `SL_Multiplier × ATR(14 or 15)`
* TP distance = `TP_Multiplier × ATR(14 or 15)`
* Adapts to current market conditions automatically

**Example calculation:**

```
Current ATR = 10 pips

SL_Multiplier = 2.0 → SL = 20 pips

TP_Multiplier = 10.0 → TP = 100 pips

Result: 5:1 Risk:Reward ratio
```

### 2. Fixed Pips (Predictable)[​](#2-fixed-pips-predictable "Direct link to 2. Fixed Pips (Predictable)")

**Best for:** Consistent strategies, prop firm rules, specific R:R requirements

**How it works:**

* SL distance = Fixed pip amount (e.g., 20 pips)
* TP distance = Fixed pip amount (e.g., 100 pips)
* Never changes regardless of volatility

**Example:**

```
SL_FixedPips = 20

TP_FixedPips = 100

Result: Always 5:1 Risk:Reward ratio
```

***

## Settings Reference[​](#settings-reference "Direct link to Settings Reference")

### Method Selection[​](#method-selection "Direct link to Method Selection")

**`TradeManagement_Method`**

Choose calculation approach:

* **`ATR_BASED`** — Dynamic distances that adapt to volatility
* **`FIXED_PIPS`** — Consistent distances regardless of volatility

**Recommendation:**

* Use **ATR\_BASED** for markets with varying volatility (most forex pairs)
* Use **FIXED\_PIPS** for prop firm challenges or strict R
  
  :R
  
  requirements

***

## ATR-Based Settings[​](#atr-based-settings "Direct link to ATR-Based Settings")

### `TradeManagement_SL_Multiplier`[​](#trademanagement_sl_multiplier "Direct link to trademanagement_sl_multiplier")

**What it does:** How many ATR units for stop loss.

**Configuration:**

* **Default:** 2.0 (balanced protection)

* **Range:** 0.5–5.0

* **Examples:**

  * 1.5 = Tight stops (more frequent SL hits)
  * 2.0 = Balanced (recommended)
  * 3.0 = Wide stops (fewer SL hits, larger losses when hit)

**Risk implications:**

* Lower multiplier = Smaller SL = Less $ risk per trade = More SL hits
* Higher multiplier = Larger SL = More $ risk per trade = Fewer SL hits

### `TradeManagement_TP_Multiplier`[​](#trademanagement_tp_multiplier "Direct link to trademanagement_tp_multiplier")

**What it does:** How many ATR units for take profit.

**Configuration:**

* **Default:** 10.0 (approximately 5:1 R
  
  :R
  
  )

* **Range:** 1.0–20.0

* **Examples:**

  * 6.0 = 3:1 R
    
    :R
    
    (with SL 2.0)
  * 10.0 = 5:1 R
    
    :R
    
    (with SL 2.0, recommended)
  * 15.0 = 7.5:1 R
    
    :R
    
    (with SL 2.0, aggressive)

### Risk:Reward Examples[​](#risk-examples "Direct link to risk-examples")

| SL Mult | TP Mult | Result                                |
| ------- | ------- | ------------------------------------- |
| 2.0     | 6.0     | 3:1 R:R                       |
| 2.0     | 10.0    | 5:1 R:R (default)     |
| 1.5     | 15.0    | 10:1 R:R                      |
| 3.0     | 15.0    | 5:1 R:R (wider stops) |

***

## Fixed Pips Settings[​](#fixed-pips-settings "Direct link to Fixed Pips Settings")

### `TradeManagement_SL_FixedPips`[​](#trademanagement_sl_fixedpips "Direct link to trademanagement_sl_fixedpips")

**What it does:** Fixed stop loss distance in pips.

**Configuration:**

* **Example:** 20.0 pips
* **Range:** 5.0–100.0 pips (typical)
* **Broker adjustment:** Account for broker pip definition (5-digit vs 4-digit)

**Example scenarios:**

* **Major pairs (EURUSD):** 15-30 pips
* **Volatile pairs (GBPJPY):** 30-50 pips
* **Indices (DAX, NAS100):** 20-40 pips

### `TradeManagement_TP_FixedPips`[​](#trademanagement_tp_fixedpips "Direct link to trademanagement_tp_fixedpips")

**What it does:** Fixed take profit distance in pips.

**Configuration:**

* **Example:** 100.0 pips (5:1 R
  
  :R
  
  with 20 pip SL)
* **Range:** 10.0–500.0 pips (typical)

**Example scenarios:**

* **Conservative (3:1 R:R):** 60 pips TP with 20 pip SL
* **Balanced (5:1 R:R):** 100 pips TP with 20 pip SL
* **Aggressive (10:1 R:R):** 200 pips TP with 20 pip SL

***

## Preservation Settings[​](#preservation-settings "Direct link to Preservation Settings")

### `PreserveExistingSL`[​](#preserveexistingsl "Direct link to preserveexistingsl")

**What it does:** Don't change manual stop loss if already present.

**Configuration:**

* **true (recommended):** Respect manual SL placement
* **false:** Always apply EA-calculated SL

**Use case:**

* Set to **true** when you want manual control over stop losses
* Set to **false** when you want EA to enforce consistent SL distances

**Behavior:**

```
PreserveExistingSL = true:

- Trade opened with SL = 50 pips → EA leaves it at 50 pips

- Trade opened without SL → EA applies calculated SL



PreserveExistingSL = false:

- Trade opened with SL = 50 pips → EA changes to calculated SL

- Trade opened without SL → EA applies calculated SL
```

### `PreserveExistingTP`[​](#preserveexistingtp "Direct link to preserveexistingtp")

**What it does:** Don't change manual take profit if already present.

**Configuration:**

* **true (recommended):** Respect manual TP placement
* **false:** Always apply EA-calculated TP

**Use case:**

* Set to **true** for manual profit targeting
* Set to **false** for consistent R
  
  :R
  
  enforcement

***

## Enhancement Features[​](#enhancement-features "Direct link to Enhancement Features")

### `AllowTrailingEnhancement`[​](#allowtrailingenhancement "Direct link to allowtrailingenhancement")

**What it does:** Allow trailing stop in Trade Management Mode.

**Configuration:**

* **true:** Trail stops only in risk-reducing direction
* **false:** No trailing (SL stays fixed)

**Behavior:**

* Trailing only moves SL toward entry price or profit (never increases risk)
* Uses `TrailingDistance` and `TrailingTrigger` settings from Advanced Features
* 💡 See [Advanced Features](/banana-ea/mt4/docs/v4/complete-user-guide/settings-guide/advanced-features.md) for complete trailing documentation

### `AllowBreakEvenEnhancement`[​](#allowbreakevenenhancement "Direct link to allowbreakevenenhancement")

**What it does:** Move SL to break-even after profit threshold.

**Configuration:**

* **true:** Enable automatic break-even
* **false:** SL stays at original distance

**Behavior:**

* When trade reaches profit threshold, SL moves to entry price (zero loss)
* Uses `BreakEvenTrigger` and `BreakEvenOffset` settings
* 💡 See [Advanced Features](/banana-ea/mt4/docs/v4/complete-user-guide/settings-guide/advanced-features.md) for complete break-even documentation

***

## 📊 Dashboard Features (v3.13.1+)[​](#-dashboard-features-v3131 "Direct link to 📊 Dashboard Features (v3.13.1+)")

**Real-Time Trade Monitoring**

**BananaEA v3.13.1+ includes enhanced dashboard displays for Trade Management Mode:**

#### **Enhanced Swing Point Detection (v4.4.3+)**[​](#enhanced-swing-point-detection-v443 "Direct link to enhanced-swing-point-detection-v443")

**NEW: Perfect Pattern Recognition**

When using MANAGE mode with S button pressed, BananaEA now detects **ALL swing points** including:

✅ **Flat-Top Swing Highs** - Multiple bars with same high price ✅ **Flat-Bottom Swing Lows** - Multiple bars with same low price ✅ **Traditional Swing Points** - Classic higher/lower patterns ✅ **Stable Detection** - Uses only closed bars (no flickering)

**Why This Matters:**

**Before:** Missed obvious entry points with flat tops/bottoms **After:** Complete swing point mapping for better trade entries!

**Benefits:**

* 📊 **More Accurate Entries** - See ALL major support/resistance levels
* 🎯 **Better Timing** - Precise entry point identification
* 💡 **structured Analysis** - Complete swing structure visibility
* ✅ **Reliable Patterns** - Swing points don't disappear as bars form

**Example:**

```
Flat-Top Swing High (NOW DETECTED!):

Bar 5: High 40,150

Bar 4: High 40,150  ← Same high!

Bar 3: High 40,150  ← Center bar = Swing Point ✅

Bar 2: High 40,145

Bar 1: High 40,140
```

Previously missed, now detected perfectly!

***

#### **Trade Panel Information (Per Position)**[​](#trade-panel-information-per-position "Direct link to trade-panel-information-per-position")

Each managed trade displays:

1. **Entry Price with Pip Difference**

   * **Display:** `Entry: 24636.4 (+7.0 pips)` or `(-2.3 pips)`
   * **Color:** Green when profitable, red when losing
   * **Benefit:** Instant position status without clicking order

2. **Risk:Reward Ratio (Automatic)**

   * **Display:** `R:R Ratio: 1:5.0`

   * **Color Coding:**

     * Green: ratio meets the configured review threshold
     * ⚪ White: ≥1.5 (acceptable quality)
     * 🟡 Yellow: <1.5 (poor R
       
       :R
       
       \- warning!)

   * **Benefit:** Instant trade quality assessment - no manual calculation needed!

3. **Initial Risk vs Current Risk**

   * Shows how much risk has been reduced by break-even/trailing
   * Locked profit display when SL is in profit territory

4. **Current P\&L**

   * Real-time profit/loss in dollars and pips
   * Color-coded for quick visual assessment

#### **Enhanced Info Panel (Symbol-Level)**[​](#enhanced-info-panel-symbol-level "Direct link to enhanced-info-panel-symbol-level")

When managing multiple trades, the dashboard shows:

* **Directional Exposure:** `Exposure: 2 BUY, 0 SELL`
  * Concentration risk warning if all trades same direction
* **Total Open Trades:** Count of managed positions
* **Daily Range Progress:** `Daily Range: 187.2 / 245.3 (76%)`
  * Helps time new entries (is most of daily range consumed?)

### **Visual Benefits**[​](#visual-benefits "Direct link to visual-benefits")

**No More Mental Math:**

* R
  
  :R
  
  ratio calculated automatically (was your 5:1 target achieved?)
* Entry price difference shown in pips (are you +7 or -2 pips?)
* Color-coded quality indicators (is this trade meeting standards?)

**Quick Decision-Making:**

* See all managed trades at a glance
* Identify concentration risk instantly (all BUY or all SELL?)
* Monitor progress toward configured exit levels visually

***

## Workflow Examples[​](#workflow-examples "Direct link to Workflow Examples")

### Example 1: Manual Day Trading with Strict R:R[​](#example-1-manual-day-trading-with-strict-r "Direct link to example-1-manual-day-trading-with-strict-r")

**Goal:** Manual entries with fixed 5:1 R:R, 20 pip SL.

**Configuration:**

```
Magic = 0

TradeManagement_Method = FIXED_PIPS

TradeManagement_SL_FixedPips = 20.0

TradeManagement_TP_FixedPips = 100.0

PreserveExistingSL = false

PreserveExistingTP = false

AllowBreakEvenEnhancement = true

AllowTrailingEnhancement = true
```

**Workflow:**

1. Identify setup on chart
2. Place manual BUY (no SL/TP)
3. EA instantly applies 20 pip SL, 100 pip TP
4. **Dashboard displays:** `Entry: 24636.4 (+0.0 pips)`, `R:R Ratio: 1:5.0` (green ✅)
5. EA manages break-even and trailing automatically
6. **Monitor visually:** Watch entry price difference turn green as trade profits

### Example 2: Copy Trading with Adaptive Risk[​](#example-2-copy-trading-with-adaptive-risk "Direct link to Example 2: Copy Trading with Adaptive Risk")

**Goal:** Copy trades from signal provider, apply adaptive SL/TP.

**Configuration:**

```
Magic = 0

TradeManagement_Method = ATR_BASED

TradeManagement_SL_Multiplier = 2.0

TradeManagement_TP_Multiplier = 10.0

PreserveExistingSL = true  (respect signal provider's SL)

PreserveExistingTP = false (override TP for better R:R)
```

**Workflow:**

1. Signal provider trade copied to your account
2. EA checks for existing SL (preserves if present)
3. EA applies adaptive TP based on current ATR
4. **Dashboard shows:** Current R
   
   :R
   
   ratio for each copied trade (instantly see if it's 1:3.5 or 1:5.0)
5. EA manages trailing and break-even
6. **Monitor exposure:** Check if all copied trades are same direction (concentration risk warning)

### Example 3: Prop Firm Challenge[​](#example-3-prop-firm-challenge "Direct link to Example 3: Prop Firm Challenge")

**Goal:** Meet prop firm requirements (1:2 R:R minimum, max 2% risk).

**Configuration:**

```
Magic = 0

TradeManagement_Method = FIXED_PIPS

TradeManagement_SL_FixedPips = 30.0

TradeManagement_TP_FixedPips = 60.0  (2:1 R:R)

PreserveExistingSL = false (enforce firm rules)

PreserveExistingTP = false (enforce firm rules)

RiskPercent = 2.0  (in Risk Management settings)
```

**Workflow:**

1. Manual entry on chart
2. EA enforces 30 pip SL (= 2% risk via lot size)
3. EA enforces 60 pip TP (= 2:1 R
   
   :R
   
   )
4. **Dashboard confirms:** `R:R Ratio: 1:2.0` displays in white (acceptable ✅)
5. Meets prop firm requirements automatically
6. **Visual compliance check:** All trades show correct R
   
   :R
   
   ratio - no manual verification needed!

***

## Best Practices[​](#best-practices "Direct link to Best Practices")

### Choosing Between ATR and Fixed Pips[​](#choosing-between-atr-and-fixed-pips "Direct link to Choosing Between ATR and Fixed Pips")

**Use ATR-Based when:**

* Trading multiple timeframes with varying volatility
* Trading across different market sessions (Asian/London/NY)
* You want SL/TP to adapt to market conditions

**Use Fixed Pips when:**

* You need exact R
  
  :R
  
  ratios (prop firms, personal rules)
* Trading single timeframe with consistent strategy
* You want predictable risk per trade in dollar terms

### Preservation Settings Strategy[​](#preservation-settings-strategy "Direct link to Preservation Settings Strategy")

**Preserve Both (Flexible):**

```
PreserveExistingSL = true

PreserveExistingTP = true
```

* Manual control when you set SL/TP
* EA fills in when you don't set them
* Best for experienced traders

**Preserve Neither (Strict):**

```
PreserveExistingSL = false

PreserveExistingTP = false
```

* EA enforces consistent SL/TP every trade
* Removes emotional decision-making
* Best for beginners or prop firm compliance

### Risk:Reward Ratio Selection[​](#risk-ratio-selection "Direct link to risk-ratio-selection")

**Conservative (3:1 to 5:1):**

* Higher win rate required for profitability
* Shorter holding periods
* Suitable for ranging markets

**Balanced (5:1 to 8:1):**

* Moderate win rate (40-50%) needed
* Most popular for swing trading
* Works in trending and ranging markets

**Aggressive (10:1+):**

* Low win rate acceptable (20-30%)
* Longer holding periods
* Best for strong trending markets

***

## Troubleshooting[​](#troubleshooting "Direct link to Troubleshooting")

### Issue: SL/TP Not Applied[​](#issue-sltp-not-applied "Direct link to Issue: SL/TP Not Applied")

**Check:**

1. Is `Magic = 0`? (Verify in EA inputs)
2. Is EA attached to correct chart symbol?
3. Are trades on the same symbol as chart?
4. Check MT4 Experts log for error messages

### Issue: Wrong SL/TP Distances[​](#issue-wrong-sltp-distances "Direct link to Issue: Wrong SL/TP Distances")

**Check:**

1. Verify `TradeManagement_Method` setting (ATR vs Fixed Pips)
2. If ATR: Check current ATR value on chart
3. If Fixed Pips: Verify broker pip definition (5-digit vs 4-digit)
4. Check `ShowDebugLogs = true` for calculation details

### Issue: SL/TP Changed Unexpectedly[​](#issue-sltp-changed-unexpectedly "Direct link to Issue: SL/TP Changed Unexpectedly")

**Check:**

1. `PreserveExistingSL` and `PreserveExistingTP` settings
2. If false, EA will override manual settings
3. Break-even or trailing may have triggered
4. Check EA logs for management actions

### Issue: R:R Ratio Shows Yellow Warning[​](#issue-r-ratio-shows-yellow-warning "Direct link to issue-r-ratio-shows-yellow-warning")

**Understanding the display:**

* 🟢 Green (≥2.0): Excellent R
  
  :R
  
  ratio - strong R
  
  :R
  
  trade
* ⚪ White (≥1.5): Acceptable R
  
  :R
  
  \- meets minimum standards
* 🟡 Yellow (<1.5): Poor R
  
  :R
  
  \- risk too high for reward!

**If ratio is lower than expected:**

1. Check your multiplier settings (TP\_Multiplier should be 5-10× SL\_Multiplier)
2. For Fixed Pips: Verify TP\_FixedPips is at least 3× SL\_FixedPips
3. Example fix: If SL = 20 pips, TP should be 60+ pips for 3:1 minimum
4. **Prop Firm Warning:** Most firms require minimum 2:1 R
   
   :R
   
   (green or white display)

### Issue: Dashboard Panels Stuck on Chart[​](#issue-dashboard-panels-stuck-on-chart "Direct link to Issue: Dashboard Panels Stuck on Chart")

**Fixed in v3.13.1:**

* Previous versions: Panels remained after EA removal
* **Current version:** All Trade Panels clean up automatically when EA removed
* **If still seeing stuck panels:** You're using older version - update to v3.13.1+

**Manual cleanup (older versions only):**

1. Right-click chart → Objects → Objects List (Ctrl+B)
2. Delete all objects starting with "BananaEA*TradeInfo*"
3. Or update to v3.13.1 for automatic cleanup!

***

## Related Settings[​](#related-settings "Direct link to Related Settings")

* **[General Settings](/banana-ea/mt4/docs/v4/complete-user-guide/settings-guide/general-settings.md)** - Magic number configuration
* **[Advanced Features](/banana-ea/mt4/docs/v4/complete-user-guide/settings-guide/advanced-features.md)** - Break-even, trailing, partial close
* **[Risk Management](/banana-ea/mt4/docs/v4/complete-user-guide/settings-guide/risk-management.md)** - Position sizing for calculated risk

***

## Quick Reference[​](#quick-reference "Direct link to Quick Reference")

| Setting                           | ATR Mode              | Fixed Pips Mode       |
| --------------------------------- | --------------------- | --------------------- |
| `TradeManagement_Method`          | ATR\_BASED            | FIXED\_PIPS           |
| SL Distance Setting               | SL\_Multiplier (2.0)  | SL\_FixedPips (20.0)  |
| TP Distance Setting               | TP\_Multiplier (10.0) | TP\_FixedPips (100.0) |
| Typical R:R Ratio | 5:1                   | 5:1                   |

**Mode activation:**

* Set `Magic = 0` to enable Trade Management Mode
* Attach EA to chart with symbol you want to manage
* EA manages ALL trades for that symbol (regardless of origin)

**Dashboard displays (v3.13.1+):**

* ✅ Entry price with current pip difference (`+7.0 pips` or `-2.3 pips`)
* ✅ Automatic R
  
  :R
  
  ratio calculation (`1:5.0` with color-coded quality)
* ✅ Directional exposure tracking (`2 BUY, 0 SELL`)
* ✅ Real-time risk reduction monitoring (initial vs current risk)

**No manual calculations needed** - dashboard shows everything instantly!
