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

Time Window Settings

Restrict trading to specific hours of the day.

StartTradingHour

What it does: Hour when EA begins looking for trade signals.

Configuration:

  • Format: 24-hour format (0–23)

  • Default: Varies by optimization set

  • Example: StartTradingHour = 10 → Trading starts at 10:00 AM

StopTradingHour

What it does: Hour when EA stops opening new trades.

Configuration:

  • Format: 24-hour format (0–23)

  • Default: Varies by optimization set

  • Example: StopTradingHour = 20 → No new trades after 8:00 PM

How it works:

StartTradingHour = 10
StopTradingHour = 20

10:00 AM  → EA starts accepting signals
10:30 AM  → Signal generated → Trade opened ✅
7:45 PM   → Signal generated → Trade opened ✅
8:00 PM   → Trading window closes
8:15 PM   → Signal generated → Trade ignored ❌

Open trades continue to be managed (SL/TP/BE/Trail)
Only NEW entries are blocked outside trading hours

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

European session (DAX, EURUSD, GBPUSD):

StartTradingHour = 8   (London open)
StopTradingHour = 16   (London close)

US session (NAS100, US30, XAUUSD):

StartTradingHour = 14  (NY open, European time)
StopTradingHour = 21   (NY close, European time)

Asian session (USDJPY, AUDJPY):

StartTradingHour = 0   (Tokyo open, European time)
StopTradingHour = 8    (Tokyo close, European time)

24-hour trading (indices, crypto):

StartTradingHour = 0
StopTradingHour = 23

Trade Closure Control

CloseAllTradesAtStopTime

What it does: Controls whether open trades are force-closed when trading hours end.

Options:

  • Open trades continue to run after StopTradingHour

  • Trades close naturally at SL/TP/BE/Trail

  • Maximizes profit potential on winning trades

  • All open trades force-closed at StopTradingHour

  • Ensures no overnight exposure

  • Ideal for prop-firm daily close rules

Example scenarios:

Swing trading (CloseAllTradesAtStopTime = false)

StopTradingHour = 20
7:50 PM - Trade opened (within window)
8:00 PM - Trading window closes (no new entries)
Trade continues overnight targeting TP
Next day 10:00 AM - Trade hits TP → Closed with full profit ✅

Day trading (CloseAllTradesAtStopTime = true)

StopTradingHour = 20
7:50 PM - Trade opened (within window)
8:00 PM - Trading window closes
8:00 PM - Trade force-closed at current price
Result: Trade closed early with +10 pips profit

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
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

  • ✅ Improves profit factor in trending markets

  • ✅ 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

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

Last updated