EA-20815 · Session Trading

Night Flat Trade

This EA trades during the Asian (night) session when the market is typically in a flat/ranging state. It identifies consolidation periods using ATR-based channel detection and enters breakout or mean-reversion trades within the defined night session window. All positions are closed before the high-volatility London session begins.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesM15, M30, H1
IndicatorsATR, Moving Average, Bollinger Bands
AuthorCopyright © 2010, basisforex@gmail.com

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Not convertible yet
GBPUSD0.00%0.00%0.00%0—————Not convertible yet
USDJPY0.00%0.00%0.00%0—————Not convertible yet
XAUUSD0.00%0.00%0.00%0—————Not convertible yet

Why this EA never traded: no entry rule survived the conversion.

Converted from MQL5 to Python and run with the same rules for every EA. Positions use MT5 lot sizes (100,000 units per FX lot, 100 oz per gold lot) with 1:100 leverage, one order at a time, and a stop-out below 10% of the starting balance. Sharpe is computed from the equity curve. Results marked as unreliable are shown for completeness only.

Blow-up risk: No blow-up pattern found

None of the usual blow-up patterns were found in the code, and the account was not stopped out in our backtests. That is not a guarantee: any EA can lose money.

High: stopped out in our backtest, or martingale/grid sizing without a stop loss. Elevated: martingale or grid sizing with a stop loss, or several positions at once without a stop loss. What the label means and what we found →

Strategy analysis

The core concept of this strategy is to capture flat/ranging market conditions during the Asian night session, exploiting the low-volatility environment for range-bound trading. Entry conditions are based on ATR channel detection to determine if the market is in a flat state, with mean-reversion entries when price touches the channel boundaries, or breakout entries following a narrow consolidation period. Exit conditions include fixed take-profit and stop-loss levels, plus a mandatory close of all positions before the London session opens to avoid gap risks. Position sizing uses either fixed lots or a percentage-based calculation tied to account balance, supporting multiple symbols simultaneously. Money management incorporates maximum position limits and daily maximum loss thresholds to prevent excessive losses from unexpected nighttime volatility spikes.

Strengths

  • Exploits the low-volatility night session, avoiding high-volatility news and event risks
  • Mandatory close before London session effectively mitigates gap and slippage risks
  • Daily maximum loss limit prevents catastrophic losses from unexpected market moves
  • Clear strategy logic with sound session selection, suitable for fully automated operation

Weaknesses

  • Nighttime low liquidity can cause spread widening, increasing trading costs and slippage risk
  • Asian session can occasionally experience sudden volatility (e.g., BOJ decisions) and the strategy lacks a news filter
  • ATR threshold parameter may not accurately judge market state and requires separate optimization per instrument
  • Mean-reversion approach is vulnerable to consecutive stop-losses when a trend suddenly emerges

Possible improvements

  • Add a spread filter to prohibit opening positions when the spread exceeds a threshold, avoiding trading in high-cost environments
  • Incorporate an economic calendar event filter to avoid trading around major events like central bank decisions

Risk assessment

Overall risk: Medium

  • Spread widening during low-liquidity night hours can cause actual fill prices to deviate significantly from expectations
  • Lack of news event filtering may lead to unexpected losses during major surprise events
  • Fixed ATR threshold parameters may fail under varying market conditions

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management3.0
Robustness3.0
Innovation2.0
Documentation2.0
Overall2.7

Parameters

ParameterDefaultDescription
StartHour21Night session start hour (server time)
EndHour7Night session end hour (server time)
ATR_Period14ATR period for flat market detection
FlatATRThreshold0.001ATR threshold below which market is flat
LotSize0.1Initial lot size, martingale base quantity
StopLoss200Stop loss in points, max loss per trade
TakeProfit100Group TP in points, close all at this profit
MaxPositions3Maximum simultaneous positions
MaxDailyLoss5Maximum daily loss percentage
MagicNumber20815EA magic number to distinguish trade instances
CloseBeforeLondontrueForce close positions before London session

Similar Session Trading EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.