Strategy logic: the Expert Advisor analyzes the direction of the previous trading day and can open positions either in the direction of continuation or in the direction of reversal on the following day. Any combination of weekdays can be tested, allowing the evaluation of recurring market behavior and calendar-based effects.
Positions can be closed at the end of the trading day to isolate the raw day-of-week effect, or managed using optional Stop Loss, Take Profit, and additional filters. This makes it possible to compare the underlying pattern with optimized trade management rules.
The EA was developed as a research framework for systematically testing day-of-week hypotheses across different markets, including Forex, commodities, and stock indices.
Weekly Day
ATR Filter
Example:
ATR = 100 points
MinCheckDayATR = 1.5
A trade will only be opened if Monday's range exceeds 150 points.
Position Settings
Example:
ATR = 100 points
kDailyATR = 0.5
The Stop Loss will be placed 50 points away from the entry price.
Example:
Stop Loss = 50 points
rrTP = 2.0
The Take Profit will be placed 100 points away from the entry price.
Close Position
Risk Calculation
When using % Risk from Start Balance, position size is calculated from the account balance captured when the EA starts, not from the current account balance.
This behavior is intentional and was designed to make strategy testing more consistent. Risk remains constant throughout the test and does not change as the balance grows or declines.
If you prefer the traditional approach based on current balance or equity, the position sizing logic can be modified in the CalcLot() function.
The strategy was tested on EURUSD, XAUUSD and SP500 over the 2016–2026 period.
XAUUSD after adding the ATR filter and position management rules, the results changed:
Full research report, equity curves and test results: /en/blogs/post/771715
Source code is open — feel free to modify it, test it on other instruments and build upon it.
This EA was created to test trading hypotheses, not to trade real money without additional research and validation.
Simple EMA Cross EA with SL/TP and Magic Number
A simple Expert Advisor based on the crossover of two EMAs (fast and slow), with configurable Stop Loss, Take Profit, lot size, and Magic Number.
V1N1 LONNY MT5
Asian Range Breakout day-trading EA. Multi-symbol, M15/M30/H1. Places pending stop orders during the London session outside the pre-London Asian range, using PSAR + MACD + Stochastic signals, with automatic London/NY DST handling, structural stops, trailing and break-even.
RealCost Spread P95 Logger MT5
Open source MT5 spread logger with average, p50, p90, p95, p99, maximum spread, alerts and CSV export.
Spread Meter
Spread Meter — Live Single-Symbol Spread Tracker with Max/Min Record Spread Meter by Fox Wave is a sleek, single-symbol dashboard that displays the live spread of your current chart symbol in real time, while permanently recording the widest and tightest spread ever seen — with exact timestamps.