Description
This EA is a multifunctional automated trading system that combines two distinct strategy logics to flexibly execute entries and exits in response to market conditions. Each strategy employs its own technical indicators to generate signals and strictly manages risk through precise entry price calculations and exit rules. Below is a detailed explanation of the system’s features and underlying mechanics.
1. Basic Structure and Parameter Settings
The EA operates by integrating two strategies—Strategy 1 and Strategy 2. Each strategy is assigned its own magic numbers and comments, ensuring that the signals generated remain distinct and independent.
-
Strategy 1:
This strategy focuses on ADX-based indicators, specifically monitoring the behavior of ADX DI Minus and ADX DI Plus. A long entry signal is generated when the ADX DI Minus is falling, while a short entry signal is triggered when the ADX DI Plus is falling. In addition, the system ensures that the Magic1 flag is enabled to validate the signal. -
Strategy 2:
The second strategy utilizes the Rate of Change (ROC) indicator to gauge market momentum. When ROC is rising, and Magic2 is enabled, a long entry signal is generated; conversely, a falling ROC produces a short entry signal. Each strategy operates independently, so if the conditions for one are met, the corresponding orders are executed.
2. Signal Generation and Entry Logic
The EA checks for signals at the open of each bar and automatically issues orders based on the conditions met by each strategy.
Entry Under Strategy 1
-
Entry Signal:
When the ADX DI Minus (or DI Plus) is falling and Magic1 is enabled, a corresponding long or short entry signal is produced. -
Entry Price Determination:
For a long entry, the system determines the entry price by referencing MTATR (a measure of the average range over a defined period). Upon the signal’s activation, a stop order is placed using the value derived from MTATR. -
Validity Period and Risk Management:
Orders are set to remain valid for 102 bars, with mechanisms in place to prevent duplicate orders and to allow replacement of existing pending orders when necessary. Risk management is enforced by calculating stop loss and profit target levels using ATR. If the position reaches a predefined profit level, the EA automatically moves the stop loss to break even based on an ATR-derived coefficient. Additionally, a trailing stop is applied to safeguard gains, and an automatic exit rule is triggered after a specified number of bars to reduce exposure during volatile conditions.
Entry Under Strategy 2
-
Entry Signal:
When the ROC is rising and Magic2 is enabled, a long signal is generated; conversely, a falling ROC triggers a short signal. -
Entry and Risk Management:
In Strategy 2, the entry price is determined using the range provided by Bollinger Bands along with a predefined coefficient. Similar to Strategy 1, this strategy incorporates ATR-based calculations for stop loss and profit target settings. It also includes break-even adjustments and a trailing stop mechanism. However, Strategy 2 uses a different set of coefficients, enabling a more adaptable risk management approach tailored to the prevailing market conditions.
3. Trade Timing and Additional Conditions
The EA is capable of precise control over the timing of trades and adapts to various market environments.
-
Trading Time Restrictions:
The system can be configured to avoid trading during weekends or specific time periods (for example, from late Friday night to early Sunday morning), thereby reducing exposure during low liquidity periods. -
Intraday Exit Rules:
There are options to automatically close all positions at the end of the day or during specific times on Friday, minimizing the risk of adverse market movements. -
Other Trade Conditions:
Additional settings include limiting the deviation between the order price and the market price to a specified percentage and capping the maximum number of trades per day, all designed to prevent overexposure and unnecessary risk.
4. Comprehensive Risk Management and Automated Order Control
A key feature of this EA is its rigorous risk management and order control system.
-
ATR-Based Dynamic Settings:
For every entry, the system calculates stop loss and profit target levels dynamically using ATR, which allows the EA to adjust quickly to changing market volatility. -
Break-Even Move Functionality:
When a position reaches a certain profit threshold, the EA automatically shifts the stop loss to break even based on an ATR-derived coefficient, thus securing profits and minimizing potential losses. -
Trailing Stop Mechanism:
If the market moves favorably, a trailing stop is triggered automatically, ensuring that gains are locked in while allowing further upside potential. -
Automatic Exit Function:
Particularly in Strategy 1, an automatic exit rule is embedded, closing the position after a predefined number of bars. Strategy 2 similarly incorporates mechanisms to exit positions under certain conditions.
5. Conclusion
This EA combines a variety of technical indicators—such as ADX, ROC, MTATR, and Bollinger Bands—to accommodate diverse market scenarios with flexibility. In Strategy 1, the focus is on ADX-based signals and determining the long entry price using MTATR, while employing robust risk management through ATR-based stop loss, break-even adjustments, and trailing stops. Meanwhile, Strategy 2 leverages ROC signals and Bollinger Band ranges, with its own tailored risk management parameters. With additional features like trade timing restrictions and strict order validity periods, the system minimizes unnecessary risks and optimizes entry and exit timing. These comprehensive features make the EA a reliable and adaptable automated trading solution suitable for both novice and experienced traders.
Davi –
It’s good that such EAs are provided for free.
This avoids techniques such as martingale.
Free EAs –
Thank you for your Review!