# 🔔 Alerts & Notifications

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

BananaEA v4.5.1 includes alert settings for trade, risk, and system events. Alerts can be enabled or disabled by type, and they are automatically disabled during backtesting and optimization to avoid unnecessary messages.

tip

Alerts automatically disable during Strategy Tester backtests and optimizations.

***

## Master Alert Control[​](#master-alert-control "Direct link to Master Alert Control")

### Enable/Disable All Alerts[​](#enabledisable-all-alerts "Direct link to Enable/Disable All Alerts")

The master switch provides instant control over the entire alert system:

```
EnableAlerts = true   // All alerts active (default)

EnableAlerts = false  // All alerts disabled
```

**When to disable**:

* During live trading setup/testing phase
* When running multiple EA instances (reduce alert volume)
* If you prefer quiet operation

info

Individual alert switches work ONLY when `EnableAlerts = true`. The master switch overrides all individual settings.

***

## Alert Categories[​](#alert-categories "Direct link to Alert Categories")

### 1. Trade Execution Alerts[​](#1-trade-execution-alerts "Direct link to 1. Trade Execution Alerts")

Real-time notifications for all trade placement and management events.

#### Signal Triggered Trade[​](#signal-triggered-trade "Direct link to Signal Triggered Trade")

**Parameter**: `Alert_Signal = true`

Notifies when a Banana or Seed signal results in trade placement (market or pending order).

**Alert Format**:

```
[BananaEA v3.13.x] SIGNAL TRIGGERED: BUY #12345

Symbol: GER40.r | Type: Bu1 (Banana Buy #1)

Entry: 19000.5 | SL: 18950.0 | TP: 19100.0
```

**When triggered**:

* Banana Buy/Sell signals (Bu1, Bu2, Bu3, Be1, Be2, Be3)
* Seed signals (small pattern confirmation)
* External indicator signals (if enabled)

***

#### Pending Order Placed[​](#pending-order-placed "Direct link to Pending Order Placed")

**Parameter**: `Alert_PendingOrder = true`

Confirms when pending orders (BuyStop, SellStop, BuyLimit, SellLimit) are successfully placed.

**Alert Format**:

```
[BananaEA v3.13.x] PENDING ORDER PLACED: BUY STOP #12346

Symbol: GER40.r | Entry: 19050.0

Distance: 45.0 pips | Expires: Never
```

***

#### Pending Order Deleted[​](#pending-order-deleted "Direct link to Pending Order Deleted")

**Parameter**: `Alert_PendingDelete = true`

Notifies when pending orders are removed (replaced by better signal, expired, or manually deleted).

**Alert Format**:

```
[BananaEA v3.13.x] PENDING ORDER DELETED: #12346

Reason: Replaced with fresh signal

Old Entry: 19050.0 | New Entry: 19055.0
```

***

#### Partial Close Executed[​](#partial-close-executed "Direct link to Partial Close Executed")

**Parameter**: `Alert_PartialClose = true`

Alerts when the EA closes a portion of the position (typically 50% at partial close trigger).

**Alert Format**:

```
[BananaEA v3.13.x] PARTIAL CLOSE EXECUTED: #12345

Original Lot: 5.00 | Closed: 3.00 | Remaining: 2.00

Closed Result: [amount] ([pips])
```

**Trigger Points**:

* Fixed level (e.g., +50 pips)
* Candle range multiplier (e.g., 2× signal candle)
* ATR multiplier (e.g., 3× ATR from entry)

***

#### Trade Fully Closed[​](#trade-fully-closed "Direct link to Trade Fully Closed")

**Parameter**: `Alert_TradeClose = true`

Confirms when trades are completely closed (by SL, TP, trailing stop, or manual intervention).

**Alert Format**:

```
[BananaEA v3.13.x] TRADE CLOSED: #12345

Exit Reason: Take Profit Hit

Final Result: [amount] ([pips])

Duration: 4h 23m
```

***

### 2. Risk Management Alerts[​](#2-risk-management-alerts "Direct link to 2. Risk Management Alerts")

Automated protection mechanisms and safety triggers.

#### Break-Even Activated[​](#break-even-activated "Direct link to Break-Even Activated")

**Parameter**: `Alert_BreakEven = true`

Notifies when the EA moves stop loss to entry price (zero-risk position).

**Alert Format**:

```
[BananaEA v3.13.x] BREAK-EVEN ACTIVATED: #12345

Symbol: GER40.r | Trade: BUY 5.00 lots

Original SL: 18950.0 → New SL: 19000.5 (entry price)

Current Result: [current R value] ([amount])
```

**Trigger Methods**:

* **Fixed**: After X pips in profit
* **Candle Range**: After price moves X× signal candle size
* **ATR-based**: After price moves X× ATR from entry (default: 4× ATR)

***

#### Trailing Stop Started[​](#trailing-stop-started "Direct link to Trailing Stop Started")

**Parameter**: `Alert_TrailingStop = true`

Confirms when dynamic trailing stop activation begins.

**Alert Format**:

```
[BananaEA v3.13.x] TRAILING STOP STARTED: #12345

Symbol: GER40.r | Activation: +50.0 pips

Current Result: [amount] ([pips])

Trailing Method: ATR-based (1.5× ATR step)
```

***

#### Daily Drawdown Warnings[​](#daily-drawdown-warnings "Direct link to Daily Drawdown Warnings")

**Parameter**: `Alert_DailyDrawdown = true`

Progressive alerts as daily loss limits approach critical thresholds.

**Alert Levels**:

**⚠️ Warning (60-80% of limit)**:

```
[BananaEA v3.13.x] DAILY DRAWDOWN WARNING

Current Loss: €-450.00 (75% of limit)

Limit: €-600.00

Remaining: €-150.00

New trades allowed but caution advised
```

**🛑 Critical (80-100% of limit)**:

```
[BananaEA v3.13.x] DAILY DRAWDOWN CRITICAL

Current Loss: €-540.00 (90% of limit)

Limit: €-600.00

Remaining: €-60.00

EA will stop trading if limit reached!
```

**🚨 Limit Reached (100%)**:

```
[BananaEA v3.13.x] DAILY DRAWDOWN LIMIT HIT

Daily Loss: €-600.00

EA DISABLED for rest of day

Resets at midnight (server time)
```

***

### 3. System & Session Alerts[​](#3-system--session-alerts "Direct link to 3. System & Session Alerts")

Market conditions and operational status notifications.

#### Session Status Change[​](#session-status-change "Direct link to Session Status Change")

**Parameter**: `Alert_SessionChange = true`

Alerts when trading windows activate or deactivate.

**Alert Format (Active)**:

```
[BananaEA v3.13.x] TRADING SESSION ACTIVE

Start Time: 10:00 (London Open)

End Time: 17:00

Status: Actively monitoring signals
```

**Alert Format (Inactive)**:

```
[BananaEA v3.13.x] TRADING SESSION CLOSED

Current Time: 17:05

Next Session: Tomorrow 10:00

Status: Position management only (no new trades)
```

***

#### Order Rejection[​](#order-rejection "Direct link to Order Rejection")

**Parameter**: `Alert_OrderRejected = true`

Critical alert when broker rejects order placement.

**Alert Format**:

```
[BananaEA v3.13.x] ORDER REJECTED

Symbol: GER40.r | Type: BUY

Reason: Invalid stops (ERR_INVALID_STOPS)

Entry: 19000.0 | SL: 18999.5 | TP: 19100.0

Action: Check broker min stop level requirements
```

**Common Rejection Reasons**:

* `ERR_INVALID_STOPS`: SL/TP too close to entry price
* `ERR_NOT_ENOUGH_MONEY`: Insufficient margin
* `ERR_TRADE_DISABLED`: Trading disabled for symbol
* `ERR_TRADE_NOT_ALLOWED`: EA trading permission denied

***

#### High Spread Warning[​](#high-spread-warning "Direct link to High Spread Warning")

**Parameter**: `Alert_HighSpread = false` (disabled by default)

Optional alert for abnormal spread conditions.

**Alert Format**:

```
[BananaEA v3.13.x] HIGH SPREAD WARNING

Symbol: GER40.r

Current Spread: 12.5 pips

Normal Spread: 1.5 pips

Threshold: 5.0 pips

Action: Signal blocked until spread normalizes
```

**Configuration**:

```
Alert_HighSpread = true              // Enable high spread alerts

Alert_SpreadThreshold = 5.0          // Alert threshold in pips
```

warning

**High Spread Alerts** can be noisy during news events and market opens. Recommended to keep disabled unless actively monitoring spreads.

***

## Alert Protection Mechanisms[​](#alert-protection-mechanisms "Direct link to Alert Protection Mechanisms")

### Automatic Backtest/Optimization Silence[​](#automatic-backtestoptimization-silence "Direct link to Automatic Backtest/Optimization Silence")

The Smart Alert System includes **four-layer protection** to prevent alert spam:

```
void SendSmartAlert(string alertMessage, bool individualSwitch) {

   // Protection 1: Master switch check

   if(!EnableAlerts) return;



   // Protection 2: Individual alert type switch

   if(!individualSwitch) return;



   // Protection 3: Skip during backtesting

   if(IsTesting()) return;



   // Protection 4: Skip during optimization

   if(IsOptimization()) return;



   // Send alert with EA version prefix

   Alert("[BananaEA v" + EA_VERSION + "] " + alertMessage);

}
```

**Result**: Zero configuration needed - alerts automatically work only during live/demo trading.

***

### Anti-Spam for Break-Even & Trailing Stop[​](#anti-spam-for-break-even--trailing-stop "Direct link to Anti-Spam for Break-Even & Trailing Stop")

Special tracking prevents duplicate alerts for the same trade:

**Problem**: Trade #12345 moves SL 10 times during trailing stop → 10 alerts ❌<br />**Solution**: Alert only on FIRST SL move → 1 alert per trade ✅

**Implementation**:

* Break-Even: Alert once when SL first moved to entry price
* Trailing Stop: Alert once when trailing first activates
* Subsequent SL adjustments: Silent (logged only)

***

## Alert Configuration Profiles[​](#alert-configuration-profiles "Direct link to Alert Configuration Profiles")

### Conservative Trader[​](#conservative-trader "Direct link to Conservative Trader")

**Goal**: Maximum awareness, all alerts enabled

```
EnableAlerts = true

Alert_PartialClose = true

Alert_TradeClose = true

Alert_Signal = true

Alert_PendingOrder = true

Alert_PendingDelete = true

Alert_BreakEven = true

Alert_TrailingStop = true

Alert_DailyDrawdown = true

Alert_SessionChange = true

Alert_OrderRejected = true

Alert_HighSpread = true         // Optional: Enable for full monitoring

Alert_SpreadThreshold = 3.0     // Tight threshold
```

***

### Balanced Trader (Default)[​](#balanced-trader-default "Direct link to Balanced Trader (Default)")

**Goal**: Essential alerts only, minimal noise

```
EnableAlerts = true

Alert_PartialClose = true       // Important: profit secured

Alert_TradeClose = true         // Important: final result

Alert_Signal = true             // Important: new trades

Alert_PendingOrder = true       // Good to know: pending orders

Alert_PendingDelete = false     // Optional: reduce noise

Alert_BreakEven = true          // Important: risk eliminated

Alert_TrailingStop = true       // Important: profit protection

Alert_DailyDrawdown = true      // Critical: risk control

Alert_SessionChange = false     // Optional: session changes obvious

Alert_OrderRejected = true      // Critical: must know failures

Alert_HighSpread = false        // Disable: too noisy
```

***

### Silent Trader[​](#silent-trader "Direct link to Silent Trader")

**Goal**: Minimal interruptions, critical alerts only

```
EnableAlerts = true

Alert_PartialClose = false      // Check manually

Alert_TradeClose = true         // Must know: final results

Alert_Signal = false            // Check chart for signals

Alert_PendingOrder = false      // Check manually

Alert_PendingDelete = false     // Not critical

Alert_BreakEven = false         // Check manually

Alert_TrailingStop = false      // Check manually

Alert_DailyDrawdown = true      // Critical: must know limits

Alert_SessionChange = false     // Not critical

Alert_OrderRejected = true      // Critical: must know failures

Alert_HighSpread = false        // Not critical
```

***

### Completely Silent (Manual Monitoring)[​](#completely-silent-manual-monitoring "Direct link to Completely Silent (Manual Monitoring)")

**Goal**: No interruptions, full manual control

```
EnableAlerts = false            // Master switch OFF (overrides all individual settings)
```

***

## Alert Format Standards[​](#alert-format-standards "Direct link to Alert Format Standards")

All BananaEA alerts follow consistent formatting:

### Prefix[​](#prefix "Direct link to Prefix")

```
[BananaEA v4.5.1]
```

### Structure[​](#structure "Direct link to Structure")

```
[EA NAME + VERSION] EVENT TYPE: DETAILS

Key Info: Value | Key Info: Value

Action/Context: Explanation
```

### Example[​](#example "Direct link to Example")

```
[BananaEA v3.13.x] PARTIAL CLOSE EXECUTED: #12345

Original Lot: 5.00 | Closed: 3.00 | Remaining: 2.00

Closed Result: [amount] ([pips])
```

***

## Technical Notes[​](#technical-notes "Direct link to Technical Notes")

### Alert Performance[​](#alert-performance "Direct link to Alert Performance")

* **Processing Time**: <0.1ms per alert (negligible overhead)
* **Memory Usage**: \~200 bytes per alert message
* **Optimization Impact**: Zero (alerts disabled automatically)
* **Backtest Impact**: Zero (alerts disabled automatically)

### Alert Triggers[​](#alert-triggers "Direct link to Alert Triggers")

**Synchronous (Immediate)**:

* Trade execution alerts (signal, pending order, close)
* Order rejection alerts
* Break-even activation
* Trailing stop activation

**Asynchronous (On Next Tick)**:

* Session status changes (evaluated once per bar)
* Daily drawdown warnings (evaluated on new trades)
* High spread warnings (evaluated before signal execution)

***

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

### Not Receiving Alerts[​](#not-receiving-alerts "Direct link to Not Receiving Alerts")

**Check 1: Master Switch**

```
EA Inputs → EnableAlerts = true
```

**Check 2: Individual Switch**

```
EA Inputs → Alert_Signal = true (for signal alerts)
```

**Check 3: Trading Mode**

```
Alerts work in: Live Trading, Demo Trading

Alerts disabled in: Strategy Tester, Optimization
```

**Check 4: MT4 Settings**

```
Tools → Options → Events → Enable "Alert notifications"
```

***

### Too Many Alerts[​](#too-many-alerts "Direct link to Too Many Alerts")

**Solution 1: Disable Noisy Alerts**

```
Alert_HighSpread = false        // Most common cause

Alert_PendingDelete = false     // If using pending orders frequently
```

**Solution 2: Use Balanced Profile**

* Enable only critical alerts (close, rejection, drawdown)
* Disable informational alerts (session change, pending orders)

**Solution 3: Silent Mode**

```
EnableAlerts = false            // Complete silence
```

***

### Missing Specific Alerts[​](#missing-specific-alerts "Direct link to Missing Specific Alerts")

**Break-Even not alerting?**

```
Check: UseSLtoBE = true (break-even must be enabled)

Check: Alert_BreakEven = true
```

**Trailing Stop not alerting?**

```
Check: UseTrailingStop = true (trailing must be enabled)

Check: Alert_TrailingStop = true
```

**Daily Drawdown not alerting?**

```
Check: UseDailyDrawdownControl = true (drawdown control enabled)

Check: Alert_DailyDrawdown = true
```

***

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

### 1. Start with Defaults[​](#1-start-with-defaults "Direct link to 1. Start with Defaults")

Use the **Balanced Trader** profile initially. Adjust based on your monitoring style after 1-2 weeks.

### 2. Enable Critical Alerts Always[​](#2-enable-critical-alerts-always "Direct link to 2. Enable Critical Alerts Always")

**Mandatory Alerts** (should always be enabled):

* `Alert_OrderRejected = true` - Must know when orders fail
* `Alert_DailyDrawdown = true` - Must know risk limits approaching
* `Alert_TradeClose = true` - Must know final trade results

### 3. Progressive Alert Reduction[​](#3-progressive-alert-reduction "Direct link to 3. Progressive Alert Reduction")

**Week 1**: Enable all alerts → Understand EA behavior<br />**Week 2**: Disable noisy alerts → Find your comfort level<br />**Week 3+**: Fine-tune to minimal essential alerts → Long-term sustainability

### 4. Mobile Notifications[​](#4-mobile-notifications "Direct link to 4. Mobile Notifications")

**MT4 Mobile App**: Alerts sync to mobile automatically if:

* MT4 Mobile installed and logged in
* Push notifications enabled in mobile settings
* Same account used on desktop and mobile

### 5. Alert Logs[​](#5-alert-logs "Direct link to 5. Alert Logs")

All alerts are also logged to MT4 Experts tab:

```
Experts → BananaEA v4.5.1
```

Filter logs: `Right-click → Filter → "ALERT"`

***

## Version History[​](#version-history "Direct link to Version History")

| Version  | Alert Feature      | Description                                                                |
| -------- | ------------------ | -------------------------------------------------------------------------- |
| v3.13.x  | Smart Alert System | Comprehensive 11-alert system with automatic backtest/optimization silence |
| v3.13.12 | ATR Filter Alert   | Added ATR volatility filter rejection notifications                        |
| v3.13.13 | Daily Range Alert  | Added daily range exceeded and session movement alerts                     |
| v3.13.x  | Alert Anti-Spam    | Break-even and trailing stop duplicate alert prevention                    |

***

## Related Documentation[​](#related-documentation "Direct link to Related Documentation")

* [Risk Management](/banana-ea/mt4/docs/v4/smart-features/risk-management.md) - Daily drawdown control and break-even settings
* [Signal Processing](/banana-ea/mt4/docs/v4/smart-features/signal-processing.md) - Understanding when signals trigger alerts
* [Smart Trailing Stop](/banana-ea/mt4/docs/v4/smart-features/smart-trailing-stop.md) - Trailing stop activation alerts
* [Settings Explained](/banana-ea/mt4/docs/v4/complete-user-guide/settings-guide.md) - Complete parameter reference

***

tip

**Pro Tip**: Use alert logs as a trading journal. Review `Alert_TradeClose` messages to analyze your trade history and identify patterns!
