
DML EA Red
DML EA Red is an automated trading strategy for the MetaTrader platform that bases its trading on unique, weekly DML Red levels. Sourced from DeepMarketLevel.com, these levels highlight areas of interest for "big players," making them potential turning points in the market.
The EA automatically manages trades by opening a grid of orders based on one of three built-in strategies.

Main Startup Settings
- Trading ON on init: Determines whether the EA should start trading automatically when placed on the chart.
- Setting it to `false` (default) provides a safety measure. After an accidental platform restart, the robot will manage existing orders but will not open new ones without manual activation via the on-chart button.
- Setting it to `true` will start trading immediately.
Important Note: When backtesting in the Strategy Tester, the Trading ON on init parameter must be set to TRUE. Otherwise, the tester will visualize the levels, but the robot will not open any positions.
Strategy Modes
This section defines the core logic the EA will use to find and trade setups.
- Red_Reaction – Playing the Reversal
- Red_Reaction_previous – Reaction to Older Levels
- Red_M (Momentum) – Following the Trend
A classic "counter-trend" trading strategy. The EA assumes that the price will react to a DML level, treating it as strong support or resistance. Buy orders are opened at the lower levels (supports), and sell orders are opened at the upper levels (resistances).
A variation of the above strategy that focuses on levels from previous weeks. The EA looks for "fresh," untested zones and plays a potential reversal when the price reaches them.
A strategy that follows the direction set by the market. The EA waits for the price to break one of the outer weekly levels (Up RedEx or Dn RedEx), which establishes a global trading direction (buy-only or sell-only). Trades are then opened in accordance with the established trend at the next DML levels.
Start and Stop Open Time
These parameters define the time window during which the EA can open new grids of orders (setups). This applies only to the Red_Reaction and Red_Reaction_previous strategies. Outside of these hours, no new positions will be opened, but existing ones will be managed normally.
Checked level back
This parameter is used exclusively in the Red_Reaction_previous strategy. It specifies how many levels back the EA should look to retrieve the DML levels for trading.
Dist to level - no trade
This parameter (in points) is a filter that works only with the Red_Reaction_previous strategy. It defines a "buffer zone" around the historical level. If the price enters this zone before the EA places an order, trading on that level will be blocked for the rest of the week. This prevents entering positions on levels that the market may have already "confirmed" or negated. A value of 0 disables this filter.
Wait to next level after establish
This option is available only for the Red_M strategy.
- When disabled (by default), the EA can open a position on the same week's level after establishing the direction.
- When enabled, after establishing the direction for the week, the EA will wait for the next week's levels to appear before looking for an entry. This can serve as a filter to avoid trading on the day of a strong breakout, entering instead on the calmer market of the following day.

Global Parameters
Basic configuration settings for the EA.
- Symbol Selection Mode: `Automatic` auto-detects the symbol from the chart. `Manual` allows you to enter the instrument name by hand.
- Manual Name For Symbol: A field to manually enter the symbol (e.g., `EURUSD`) when in `Manual` mode.
- Broker Server Time (GMT): Sets the time zone offset of your broker's server relative to GMT.
- Magic Number: A unique identifier. Each EA instance on your platform must have a different Magic Number to avoid conflicts.

Proximity Alerts
This feature notifies you when the price approaches a selected DML level.
- Proximity alerts: Enables or disables the alert functionality.
- Proximity activation distance (Points): Specifies the distance in points from the level that will trigger an alert.
- Popup Alerts: Enables pop-up notifications on the MT5 platform.
- Mobile Alerts: Enables push notifications to your MT5 mobile app.

Button Parameters
Settings for the on-chart control panel.
- Show Button: Shows or hides the button panel on the chart.
- Buttons Position: Selects the corner of the chart where the panel will be displayed.
- Helper Buttons: The panel includes additional function buttons:
- H (Hide): Toggles the visibility of all DML levels on the chart.
- E (Extend): Activates a mode to permanently extend level lines into the future.
- A (Alert): Activates a mode to permanently set proximity alerts on levels.
- Helper Buttons Position: This parameter determines where the helper buttons (H, E, A) will appear relative to the main level buttons (e.g., top, bottom, left, or right).
- Other Parameters: Allow for detailed customization of the panel's appearance, such as button size (`Button X/Y Size`), text color, font size, and spacing.

Direction & Distance Parameters
Trading Direction: This parameter is a global filter for trade direction that works independently of the chosen strategy. It allows you to force the EA to open positions only in one specific direction.
- BUY_and_SELL: The EA opens both buy and sell positions.
- only_BUY: The EA will only open buy positions.
- only_SELL: The EA will only open sell positions.
Min Distance Between Setups: This parameter defines the minimum distance in points that must be maintained between a newly opened setup and any other already existing on the chart. This is a safeguard against opening too many order grids in close proximity, which could lead to an excessive concentration of risk.

Lot Size Management / Setup Parameters
This section allows for precise management of position sizing and risk.
- Lot Size Mode:
- fixed: A constant lot size, manually defined in the grid parameters.
- Lot_perBalance: Lot size is calculated proportionally to the account balance, based on the `Balance for position` value.
- Risk_from_Balance: Lot size is calculated based on a percentage of the account balance (`riskedPercent`).
- Risk_from_Equity: Lot size is calculated based on a percentage of the account equity (`riskedPercent`).
- Risk_from_Amount: Lot size is calculated so that the potential loss does not exceed the amount defined in `riskedAmount`.
- Lot Difference:
- same_for_all: All positions in the grid will have the size defined by the user settings.
- multiplier_for_baseLot: The size of subsequent positions in the grid is determined by a multiplier, allowing for strategies like Martingale.
- Balance for position: Defines the amount of balance per unit of lot size. For example, if you enter 1000, the robot will open a 0.01 lot position for every 1000 units of currency in the account.
Very Important Note: In risk-based modes, if the calculated position size is smaller than the broker's minimum allowed lot (e.g., 0.01), the robot will open a position with the minimum size. On small accounts, this could lead to a loss greater than the defined risk.

Grid Setup Parameters
These parameters define how the order grid is constructed after a signal is generated.
- Open Shift Mode: Determines whether the distances between orders in the grid (`Open Shift`) are measured in points (`in_points`) or as a multiplier of the range (`range_Multiplier`). The range is the distance between the signal-generating DML level and the price at the time of the signal.
- First Order At Market: If `true`, the first order is placed immediately at the market price after a signal. If `false`, the EA places a pending order at the open price of the M1 candle on which the signal occurred.
- Used Price Level for Shifts: Decides whether subsequent orders in the grid are placed relative to the price of the first opened order (`first_order_price`) or the DML level that generated the signal (`level_price`).
Tip: The `Open Shift` values can be negative. Positive values create a GRID setup (orders placed against the market), while negative values create a PYRAMID setup (orders added in the direction of price movement).

TP & SL Management
Advanced options for managing Stop Loss and Take Profit orders.
- TP Mode / SL Mode: Allows setting Take Profit and Stop Loss levels in points (`in_points`) or as a multiplier of the range (`range_Multiplier`).
- Use Move TP: Activates the dynamic Take Profit adjustment feature. You can define up to 4 conditions – after a specific position in the grid is opened, the common TP for all orders will be moved to a new, defined level.
- Move SL/BE: A dynamic function to move the Stop Loss (or to Break Even).
- Reference Price: The reference point for calculations can be the price of the first order or the DML level that generated the signal.
- Triggers & Shifts: You can set 4 thresholds. Each threshold consists of two values: the distance from the reference point that activates the change (Trigger), and the new level to which the SL will be moved (Shift).

Risk & Safety Functions
Additional modules to protect capital and secure profits.
- Safe Profit Function: A profit protection feature. It's activated after a specific position number is opened. When the price gets close to the TP by a defined distance, the function "arms" itself. If the price then retreats and reaches a second defined distance, the orders are closed.
- Operating Modes: It can close all positions in the setup, or only those that are currently in profit. In the second scenario, positions closed with a profit will be re-established as pending orders.
- Max Daily Loss: The maximum allowable daily loss in your account currency. Once reached, the robot stops opening new setups for that trading day.

Time & Session Filters
Time filters allow you to adapt the EA's operation to specific sessions or avoid undesirable market periods.
- Trading Time Parameters: Allows you to precisely define the days of the week and hours during which the robot is allowed to open new setups.
- Exclude Time Parameters: Lets you define a "time window" during which the robot will not open new orders (e.g., during spread widening at session rollovers). All previously opened setups will continue to be managed according to their logic.
- MMD Filter Parameters: A trade filter based on the MMD methodology (moving average clouds). It allows you to define two moving averages (SMA and EMA) from a selected timeframe. The robot will only open positions if the Red signal aligns with the direction indicated by the clouds, enabling strategies like trading with the higher-timeframe trend.

Download
To download the current version of DML EA Red, go to the Download section in your client panel.