MoJan

IMPORTANT(1): This Expert Advisor was developed specifically for Gold trading on the M15 timeframe.

MOJAN MT5 is designed to work with its default parameters on Gold M15, so no additional preset file is required for the recommended setup.

If you want to use the EA on other symbols, other timeframes, or different broker conditions, you must perform your own backtests, forward tests, and risk evaluation. Results outside the recommended Gold M15 setup are not guaranteed.



IMPORTANT(2):  Lot Size Note

The lot value is a base lot. Since MOJAN manages trades as a basket, the total exposure may be higher than the entered value and can reach approximately up to 4x the base lot (when the signal is high quality).

The Emergency Basket Loss setting is included to help control the risk of MOJAN’s own trades. It is calculated from the EA’s own profit/loss using the Balance Reference logic, not from the entire account equity or unrelated trades.

Please test visually before live use to make sure the basket size and risk level are suitable for your account.


"MOJAN" MT5 is an automated trend-following Expert Advisor developed for MetaTrader 5.


This EA is not a randomly assembled indicator robot. The original trading logic was created in 2022 as a direct translation of many years of manual trading experience into algorithmic form. The idea behind the system was to convert a discretionary trend-following approach into clear, testable, and repeatable trading rules.

After a long time, this project was reviewed again and tested on the most recent market data without changing the original strategic logic or performing a new optimization for that specific period. Because the strategy was originally designed years before the tested period, the recent one-year historical test can be considered an out-of-sample style robustness check by the developer. It is still a historical test, not a guarantee of future performance.

The purpose of this Expert Advisor is to capture directional market movement while avoiding low-quality entries during sideways or uncertain market phases.

Main Concept

MOJAN MT5 is built around a trend-following and momentum-continuation structure. The EA evaluates the current price position relative to recent market extremes, measures directional strength, filters entries through volatility and trend conditions, and uses ZigZag-based support and resistance logic to avoid entering directly into nearby obstacles.

The strategy is designed to trade only when several independent conditions agree:

- Directional momentum is present
- The market is not too close to a major higher-timeframe mean area
- Volatility is acceptable
- The trade direction is not blocked by nearby ZigZag support or resistance
- The market is inside the allowed trading session
- Spread and margin conditions are acceptable

This is not a scalping grid and not a martingale recovery system.

What Makes the Strategy Different

The logic was not created by simply combining popular indicators. It was originally built from manual market-reading experience and then converted into code.

The EA attempts to identify when price is moving away from previous balance areas and entering a tradable directional phase. It uses multiple confirmations before opening a basket of positions. Each position inside the basket has its own magic number, take-profit target, and management logic.

This allows the EA to manage a trade idea in several parts instead of treating the entire exposure as one single position.

Core Trading Logic

The EA uses an internal rate-of-change style calculation based on the price position relative to the highest and lowest closes over a historical window. This helps the system detect whether price is closer to recent highs or recent lows and whether the current market structure favors buying or selling.

A buy setup is considered when bullish directional strength becomes dominant.

A sell setup is considered when bearish directional strength becomes dominant.

However, the EA does not open trades from this signal alone. A trade must pass additional filters before execution.

Entry Filters

The EA uses several filters before opening a position:

1. Momentum and Directional Strength Filter

The system measures whether the current move has enough strength compared with recent price behavior. Weak, unclear, or low-quality moves are filtered out.

2. Aroon-Based Directional Confirmation

The EA checks whether recent highs or lows support the intended trade direction.

3. ADX and DI Structure Filter

The EA uses ADX and directional movement information to avoid entries when the underlying directional structure is not supportive.

4. Volatility Shock Filter

The EA compares short-term ATR with longer-term ATR to reduce the chance of entering immediately after abnormal volatility spikes.

5. H1 Moving Average Context

The strategy uses a higher-timeframe moving average filter to avoid certain unfavorable trend-location conditions.

6. H4 SMMA 168 ATR Distance Filter

A new higher-timeframe filter is included to reduce trades during potential sideways or reversal zones.

The EA uses a Smoothed Moving Average with period 168 on the H4 timeframe. If the planned entry price is too close to this H4 SMMA, measured by a user-defined ATR multiple, the EA blocks the new entry.

The idea behind this filter is simple:

When price is too close to a major higher-timeframe mean area, the market may be more likely to become sideways, unstable, or reversal-prone. Avoiding new entries near this zone can help reduce low-quality trades.

7. ZigZag Support and Resistance Filter

The EA uses a custom ZigZag-based structure to detect nearby support and resistance areas. A buy trade can be blocked if price is too close to an overhead resistance zone. A sell trade can be blocked if price is too close to a support zone below.

8. Time and Spread Filters

The EA respects user-defined trading hours and blocks entries when spread is above the allowed threshold.

Position Structure

MOJAN MT5 does not open a single position per signal. It can open a structured basket of positions in the same direction.

Each basket can contain multiple positions with different magic numbers and different take-profit targets. This structure allows partial exits, staged management, and separate handling of different parts of the same trade idea.

This is not a grid system. The positions are not opened step-by-step at fixed price intervals against the market.

This is not a martingale system. The EA does not increase lot size after a losing trade in an attempt to recover losses.

Lot Size Logic

The EA supports two lot-sizing modes:

Fixed Lot Mode

The user defines a base fixed lot size.

Auto Lot Mode

The EA calculates the base lot size using a capital-based formula. The lot size is adjusted according to the EA’s own reference balance logic rather than blindly relying on total account equity. This helps reduce interference from other Expert Advisors running on the same account.

Balance Reference Logic

The EA includes a Balance Reference mechanism designed for accounts where multiple Expert Advisors may be running at the same time.

When there are no open positions belonging to this EA, the reference balance is continuously synchronized with the real account balance.

When this EA opens its own positions, the reference balance is locked and remains fixed until all positions belonging to this EA are closed.

This allows the EA to calculate its own basket exposure, emergency loss, and internal performance logic based on its own trading activity rather than being distorted by other EAs or manual trades on the same account.

Risk and Trade Management

MOJAN MT5 includes several trade-management layers:

- Fixed take-profit levels
- Fixed stop-loss levels
- Break-even logic
- Optional trailing stop logic
- Signal-based exit logic
- Partial basket profit protection
- Time-in-trade management
- Cooldown after losing trades
- Spread protection
- Margin availability check
- Emergency basket loss protection based on Balance Reference

Emergency Basket Loss Protection

A dedicated emergency basket loss input is included.

If the combined result of this EA’s open and recently closed basket activity reaches a user-defined loss percentage of the Balance Reference, the EA can close all positions belonging to this EA on the current symbol.

This feature is designed to act as a hard protective layer for the EA’s own basket exposure. It does not depend on the total account equity and is not affected by unrelated trades from other EAs.

What This EA Does Not Use

MOJAN MT5 does not use classical grid logic.

It does not keep opening new trades at fixed distance levels against price movement.

MOJAN MT5 does not use martingale logic.

It does not double or multiply lot size after a loss in order to recover previous losses.

MOJAN MT5 does not rely on random entries.

The trading decision is based on a combination of momentum, trend context, volatility, support/resistance, and time filters.

Recommended Usage

The EA is designed for users who understand automated trading and are willing to test settings carefully before using them on a live account.

Recommended workflow:

- Test the EA in the Strategy Tester first
- Use high-quality historical data
- Start with conservative risk settings
- Avoid excessive lot size
- Review the effect of the H4 SMMA 168 filter
- Review the Emergency Basket Loss percentage carefully
- Test the EA on the intended symbol, timeframe, broker, and account type
- Use a demo account before considering live usage

Important Notes About Backtesting

The strategy was originally written in 2022. The recent test period was not the original development period of the logic. For that reason, the recent historical test can be viewed as an out-of-sample style check of how the original logic handled a later market environment.

However, all Strategy Tester results are historical simulations. They are useful for studying behavior, risk, and robustness, but they do not guarantee future results.

Market conditions, spreads, execution quality, swaps, commissions, slippage, and broker data can significantly affect performance.

Key Inputs

Lot Selection Type

Choose between fixed lot and automatic lot calculation.

Fixed Lot

Defines the base lot size when fixed lot mode is selected.

Base Capital for Auto Lot

Controls how aggressively or conservatively the EA increases lot size in automatic mode.

Maximum Spread Allowed

Blocks new trades when spread is higher than the allowed value.

Trading Time Settings

Controls when the EA is allowed to open new trades.

H4 SMMA 168 ATR Filter

Blocks new entries when the planned entry price is too close to the H4 Smoothed Moving Average 168.

H4 ATR Multiplier

Defines how close price can be to the H4 SMMA 168 before a new trade is blocked.

Emergency Basket Loss Based on Balance Reference

Defines the maximum allowed loss for the EA’s own basket, measured as a percentage of the Balance Reference.

Break-Even Settings

Control when the stop loss is moved into a protected area after price moves in favor of the trade.

Trailing Stop Settings

Control the optional trailing stop behavior.

Take-Profit and Stop-Loss Parameters

Define the percentage-based target and protection levels used by the position basket.

Who This EA Is For

MOJAN MT5 may be suitable for traders who prefer:

- Trend-following logic
- Multi-filter entry confirmation
- Structured position baskets
- No martingale
- No classical grid
- Higher-timeframe trend awareness
- Built-in basket emergency protection
- A system based on a manually developed trading idea rather than a random indicator combination

Risk Warning

Trading involves risk. Automated trading can lead to losses, including losses larger than expected during fast markets, spread widening, slippage, or abnormal execution conditions.

This Expert Advisor does not guarantee profit. Past backtest performance does not guarantee future results. Always test carefully and use risk settings that match your own account size and risk tolerance.
More from author
Gold Futures Spot Arbitrage EA
Ahmed Sabry Mohammed Youssef Elgendi
This EA was built from real trading experience on the relationship between Gold Futures and Spot Gold. Its logic, filters, and risk controls were designed specifically for this type of market structure. For this reason, the product is intended to be used only on the Gold Futures / Spot Gold pair. The author does not take responsibility for results on other symbols or synthetic combinations. The main idea behind the strategy is the natural relationship between a futures contract and its spot mar
Azad ZonePulse MT5
Ahmed Sabry Mohammed Youssef Elgendi
Official Preset File The official XAUUSD M15 preset file is available here: Download Gold XAUUSD M15 Preset Preset installation guide: Official Azad ZonePulse MT5 Preset Guide This preset is optimized for Gold / XAUUSD on the M15 timeframe and can be used with the demo version for forward-test style evaluation after May 1. For other symbols or timeframes, users are advised to run their own optimization and adjust the parameters according to spread, commission, broker execution and market behavio
Filter:
No reviews
Reply to review