⏰ Trading Hours & Filters
Time Controls & Entry Filters
BananaEA provides powerful filtering mechanisms to control when trades are opened and what market conditions qualify for entry.
Trading Hours Control
Dual Trading Session System (v4.x.x)
NEW: BananaEA now supports two independent trading sessions for maximum flexibility.
⚡ Key Benefits:
- ✅ Trade multiple optimal time windows per day
- ✅ Combine European morning + US afternoon sessions
- ✅ Avoid slow midday periods automatically
- ✅ Minute-level precision for exact session timing
- ✅ Enable/disable each session independently
Master Time Window Control
UseTimeWindow
What it does: Master switch for all time-based trading restrictions.
Configuration:
- Default: true (time restrictions enabled)
- Options:
- true — Respect Session 1 and Session 2 time windows
- false — 24/7 trading (ignore all session settings)
When to disable (false):
- 24/7 crypto trading
- Automated testing without time restrictions
- Indices that trade around the clock
Session 1 Settings
Typical use: European morning session, London open, primary trading window
UseSession1
What it does: Enable/disable first trading session.
Configuration:
- Default: true (Session 1 enabled)
- Options:
- true — Session 1 active (respects start/end times)
- false — Session 1 disabled (no trading in this window)
Session1_StartHour & Session1_StartMinute
What it does: Exact time when Session 1 begins.
Configuration:
- Format: 24-hour format
- Hour range: 0–23
- Minute range: 0–59
- Default: 10:00 (10 AM)
- Example:
Session1_StartHour = 10, Session1_StartMinute = 0→ 10:00 AM
Session1_EndHour & Session1_EndMinute
What it does: Exact time when Session 1 ends.
Configuration:
- Format: 24-hour format
- Hour range: 0–23
- Minute range: 0–59
- Default: 13:00 (1 PM)
- Example:
Session1_EndHour = 13, Session1_EndMinute = 0→ 1:00 PM
Session 1 Example:
UseSession1 = true
Session1_StartHour = 10
Session1_StartMinute = 0
Session1_EndHour = 13
Session1_EndMinute = 0
10:00 AM → Session 1 starts
10:30 AM → Signal generated → Trade opened ✅
12:45 PM → Signal generated → Trade opened ✅
1:00 PM → Session 1 ends
1:15 PM → Signal generated → Trade ignored ❌
Session 2 Settings
Typical use: US afternoon session, New York open, secondary trading window
UseSession2
What it does: Enable/disable second trading session.
Configuration:
- Default: true (Session 2 enabled)
- Options:
- true — Session 2 active (respects start/end times)
- false — Session 2 disabled (no trading in this window)
Session2_StartHour & Session2_StartMinute
What it does: Exact time when Session 2 begins.
Configuration:
- Format: 24-hour format
- Hour range: 0–23
- Minute range: 0–59
- Default: 16:15 (4:15 PM)
- Example:
Session2_StartHour = 16, Session2_StartMinute = 15→ 4:15 PM
Session2_EndHour & Session2_EndMinute
What it does: Exact time when Session 2 ends.
Configuration:
- Format: 24-hour format
- Hour range: 0–23
- Minute range: 0–59
- Default: 17:45 (5:45 PM)
- Example:
Session2_EndHour = 17, Session2_EndMinute = 45→ 5:45 PM
Session 2 Example:
UseSession2 = true
Session2_StartHour = 16
Session2_StartMinute = 15
Session2_EndHour = 17
Session2_EndMinute = 45
4:15 PM → Session 2 starts
4:30 PM → Signal generated → Trade opened ✅
5:30 PM → Signal generated → Trade opened ✅
5:45 PM → Session 2 ends
6:00 PM → Signal generated → Trade ignored ❌
Dual Session Combined Example
European morning + US afternoon:
UseTimeWindow = true
// Session 1: European morning (10:00 - 13:00)
UseSession1 = true
Session1_StartHour = 10
Session1_StartMinute = 0
Session1_EndHour = 13
Session1_EndMinute = 0
// Session 2: US afternoon (16:15 - 17:45)
UseSession2 = true
Session2_StartHour = 16
Session2_StartMinute = 15
Session2_EndHour = 17
Session2_EndMinute = 45
Daily Timeline:
10:00 AM - 1:00 PM → Session 1 ACTIVE ✅
1:00 PM - 4:15 PM → Both sessions INACTIVE ❌
4:15 PM - 5:45 PM → Session 2 ACTIVE ✅
5:45 PM - 10:00 AM → Both sessions INACTIVE ❌
Open trades continue to be managed 24/7 (SL/TP/BE/Trail)
Only NEW entries are blocked outside session windows
Best Trading Sessions
Based on 3,777+ DAX signal analysis
Peak performance hours:
- 10:00 AM — 126 signals (highest activity)
- 12:00 PM — 114 signals
- 11:00 AM — 79 signals
Recommended Dual Session Configurations
European DAX Trading (Peak Hours Strategy)
Combines highest-activity morning + afternoon windows:
UseTimeWindow = true
// Session 1: European morning peak (10:00 - 13:00)
UseSession1 = true
Session1_StartHour = 10
Session1_StartMinute = 0
Session1_EndHour = 13
Session1_EndMinute = 0
// Session 2: US market open impact (16:15 - 17:45)
UseSession2 = true
Session2_StartHour = 16
Session2_StartMinute = 15
Session2_EndHour = 17
Session2_EndMinute = 45
Result: Trade only during highest-probability windows
Avoid: Slow midday 13:00-16:00 period
London + New York Sessions (Forex Majors)
Maximum liquidity windows:
UseTimeWindow = true
// Session 1: London morning (8:00 - 12:00)
UseSession1 = true
Session1_StartHour = 8
Session1_StartMinute = 0
Session1_EndHour = 12
Session1_EndMinute = 0
// Session 2: London-NY overlap (14:00 - 17:00)
UseSession2 = true
Session2_StartHour = 14
Session2_StartMinute = 0
Session2_EndHour = 17
Session2_EndMinute = 0
Perfect for: EURUSD, GBPUSD, USDCHF
Asian + London Sessions (JPY Pairs)
Tokyo + London overlap:
UseTimeWindow = true
// Session 1: Tokyo active hours (1:00 - 6:00 GMT)
UseSession1 = true
Session1_StartHour = 1
Session1_StartMinute = 0
Session1_EndHour = 6
Session1_EndMinute = 0
// Session 2: London open (8:00 - 11:00 GMT)
UseSession2 = true
Session2_StartHour = 8
Session2_StartMinute = 0
Session2_EndHour = 11
Session2_EndMinute = 0
Perfect for: USDJPY, GBPJPY, EURJPY
Single Session Strategies
European session only (DAX, EURUSD):
UseTimeWindow = true
// Session 1: London open to close
UseSession1 = true
Session1_StartHour = 8
Session1_StartMinute = 0
Session1_EndHour = 16
Session1_EndMinute = 0
// Session 2: Disabled
UseSession2 = false
US session only (NAS100, US30):
UseTimeWindow = true
// Session 1: Disabled
UseSession1 = false
// Session 2: NY trading hours
UseSession2 = true
Session2_StartHour = 14
Session2_StartMinute = 30
Session2_EndHour = 21
Session2_EndMinute = 0
24-hour trading (crypto, round-the-clock indices):
UseTimeWindow = false
// Both sessions ignored - continuous trading
Trade Closure Control
CloseTradesAtSessionClose
What it does: Controls whether open trades are force-closed when trading sessions end.
Configuration:
- Default: false (recommended for swing trading)
- Options:
- false — Trades continue after session ends (recommended)
- true — Force-close all trades at session end (day trading)
How it works with dual sessions:
CloseTradesAtSessionClose = false:
- Trades opened in Session 1 continue through Session 2
- Trades run overnight targeting SL/TP/BE/Trail
- Maximizes possible test outcome on winning trades
CloseTradesAtSessionClose = true:
- All trades closed at Session 1 end (1:00 PM)
- New trades can open in Session 2 (4:15 PM)
- All trades closed at Session 2 end (5:45 PM)
- No overnight exposure
Example scenarios:
Swing trading (CloseTradesAtSessionClose = false) - RECOMMENDED
Session 1: 10:00 AM - 1:00 PM
Session 2: 4:15 PM - 5:45 PM
CloseTradesAtSessionClose = false
12:50 PM - Trade opened in Session 1
1:00 PM - Session 1 ends (no new entries)
Trade continues running (not closed)
4:15 PM - Session 2 starts (trade still open)
5:45 PM - Session 2 ends (trade still open)
Overnight - Trade continues targeting TP
Next day - Trade hits TP → Closed with full profit ✅
Day trading (CloseTradesAtSessionClose = true)
Session 1: 10:00 AM - 1:00 PM
Session 2: 4:15 PM - 5:45 PM
CloseTradesAtSessionClose = true
12:50 PM - Trade opened in Session 1
1:00 PM - Session 1 ends
1:00 PM - Trade force-closed at current price (+10 pips)
4:30 PM - New trade opened in Session 2
5:45 PM - Session 2 ends
5:45 PM - Trade force-closed at current price (+8 pips)
Result: No overnight exposure from that position
Perfect for: Prop firm rules, day trading strategies
CancelPendingsAtSessionClose
What it does: Controls whether pending orders are canceled when trading sessions end.
Configuration:
- Default: false (pending orders remain active)
- Options:
- false — Pending orders remain active after session close
- true — Cancel all pending orders at session end
Use case:
CancelPendingsAtSessionClose = true
Session 1: 10:00 AM - 1:00 PM
12:30 PM - Pending BUY order placed
1:00 PM - Session 1 ends
1:00 PM - Pending order canceled automatically
4:15 PM - Session 2 starts (fresh pending orders can be placed)
Perfect for: Ensuring clean session starts without stale pending orders
Moving Average Filter
Multi-Layered EMA Trend Filter System
BananaEA uses a 3-tier EMA system for multi-layered trend confirmation.
Each layer can be enabled or disabled independently.
Fast EMA Filter
Filter_EMA_Fast — Enable/disable fast EMA filter
FastEMA_Value — Fast EMA period
Default: 9 Range: 5–20
Filter_EMA_Fast = true
FastEMA_Value = 9
BUY signals only when price > EMA(9)
SELL signals only when price < EMA(9)
Slow EMA Filter
Filter_EMA_Slow — Enable/disable slow EMA filter
SlowEMA_Value — Slow EMA period (default: 21)
Filter_EMA_Slow = true
SlowEMA_Value = 21
BUY when price > EMA(21)
SELL when price < EMA(21)
Slowest EMA Filter
Filter_EMA_SLOWEST — Enable/disable long-term EMA filter
EMA_SLOWEST_Input — Period (default 55)
EMA_SLOWEST_Strict — Require strict EMA hierarchy
EMA_SLOWEST_Strict = true
BUY requires:
1. Price > EMA(9)
2. EMA(9) > EMA(21)
3. EMA(21) > EMA(55)
MA Crossover Filter
Filter_MA_Crossover — Enable EMA crossover direction filter
Filter_MA_Crossover = true
BUY only after Fast EMA crosses ABOVE Slow EMA
SELL only after Fast EMA crosses BELOW Slow EMA
EMA Filter Presets
Aggressive
Filter_EMA_Fast = true
Filter_EMA_Slow = false
Filter_EMA_SLOWEST = false
Filter_MA_Crossover = false
EMA_SLOWEST_Strict = false
Balanced (recommended)
Filter_EMA_Fast = true
Filter_EMA_Slow = true
Filter_EMA_SLOWEST = true
Filter_MA_Crossover = true
EMA_SLOWEST_Strict = false
Conservative
Filter_EMA_Fast = true
Filter_EMA_Slow = true
Filter_EMA_SLOWEST = true
Filter_MA_Crossover = true
EMA_SLOWEST_Strict = true
No Filtering
Filter_EMA_Fast = false
Filter_EMA_Slow = false
Filter_EMA_SLOWEST = false
Filter_MA_Crossover = false
EMA Filter Pros & Cons
Benefits
- ✅ Filters counter-trend trades
- Can reduce counter-trend entries when the filter matches market behavior
- ✅ Avoids range-bound whipsaws
- ✅ Modular — enable any combination
Drawbacks
- ❌ May miss reversals
- ❌ Fewer trades overall
- ❌ Strict mode can be overly selective
Spread Filter
MaxSpread
What it does: Maximum spread (in pips) allowed to open trades.
Typical range: 0.5–10.0 pips
MaxSpread = 3.0
Spread = 1.5 → Accepted ✅
Spread = 4.0 → Rejected ❌
Why it matters:
- Prevents poor execution in high-spread conditions
- Avoids news-time or low-liquidity entries
Recommended Spread Limits
| Symbol Type | Recommended MaxSpread |
|---|---|
| Forex Majors | 2.0–3.0 |
| Forex Minors | 3.0–5.0 |
| Forex Exotics | 5.0–10.0 |
| Indices (DAX/NAS) | 2.0–4.0 |
| Gold (XAUUSD) | 3.0–5.0 |
By Trading Style
- Scalping: 1.5–2.0
- Day trading: 2.0–3.0
- Swing trading: 3.0–5.0
Slippage Control
Slippage
Purpose: Maximum slippage (in pips) allowed for order execution.
Default: 2–3 pips Range: 0–10 pips