DML EA JUMP FLIP

DML EA JUMP & FLIP

The DML EA JUMP & FLIP is a unique tool designed to detect JUMP setups, which are above-average breakaways or displacements of DML levels. Observations show that after a JUMP signal is generated, the price often reverses against the direction of the breakaway. In addition to the standard JUMP setup, the robot also handles its dynamic variation: the JUMP & FLIP. A FLIP setup occurs when the breakaway is so strong that the new levels appear on the opposite side of the price. For example, if a level was below the price and the next one appears above it, this is both a JUMP and a FLIP signal.

DML MultiReaction main settings

Initial Setup

This primary section acts as the master switch for the EA's automated trading functions upon initialization.

  • Trading ON on init: This parameter determines whether the Expert Advisor should automatically start placing new trade setups as soon as it is initialized on the chart.
    • Setting it to `false` (default): This is the recommended and safer option for live trading. It acts as a critical safety measure. After an accidental platform restart, for instance, the EA will continue to manage any existing orders but will not open new trade setups. This gives you time to verify your settings before manually enabling new trades via the on-chart button.
    • Setting it to `true`: The EA will begin analyzing the market and opening new positions immediately upon initialization, without requiring manual intervention.

Important Note: When backtesting in the Strategy Tester, the `Trading ON on init` parameter must be set to `true`. Otherwise, the tester will correctly visualize the levels on the chart, but the robot will not open any positions, making it impossible to verify the strategy's performance.

DML MixReaction Global Parameters

Global Parameters

In this section, you define the fundamental settings that ensure the Expert Advisor correctly identifies the instrument and synchronizes its time. Proper configuration here is crucial for stable performance.

  • Symbol Selection Mode: Specifies how the EA identifies the financial instrument to trade on.
    • `Automatic` (recommended): This is the default setting. The EA will auto-detect the symbol from the chart it is running on. This is the best choice for 99% of use cases.
    • `Manual`: This option is for advanced users or when your broker uses non-standard instrument names (e.g., `EURUSD.ecn`, `GBPUSD_x`). It allows you to manually enter the correct instrument name as it appears in the DML databases. This is useful in specific situations, such as running the EA on an instrument with a custom name while wanting it to trade based on a standard instrument (e.g., `EURUSD`).
  • Manual Name For Symbol: This field is active only in `Manual` mode. Enter the exact symbol name as it appears in the DML database. Pay close attention to any suffixes or prefixes (e.g., `EURUSD.m`, `DE40.cash`). An incorrect name will prevent the EA from trading.
  • Broker Server Time (GMT): All data on the DML servers is published in GMT 0 time. This option sets the time offset between the DML server and your broker's server. It is a critically important parameter as it ensures that the DML levels fetched from the server are correctly plotted on your chart's timeline.
  • Magic Number: A unique identifier for this specific instance of the EA. It acts as the robot's "signature" on every order it places.
    • Why is it so important? If you run multiple EAs (or several copies of the same EA) on your account, each instance must have a different Magic Number. Otherwise, the EAs will conflict with each other by trying to manage orders that aren't theirs, which leads to chaos and unpredictable results.
    • Good practice: Assign numbers in an organized way, such as `34501` for the first chart, `34502` for the second, and so on.
DML Proximity Alert

Proximity Alerts

This feature acts as your personal assistant, notifying you when the price approaches a DML level you are interested in. This allows you to prepare for a potential trade without having to constantly watch the chart.

  • How it works:
    The feature requires two steps to activate:
    1. First, you must enable it globally by setting the `Proximity alerts` parameter to `true`.
    2. Then, on the chart, you need to click the 'A' (Alert) button - or hold down the CTRL key on your keyboard - and then click on the specific DML level you want to monitor. An 'A' will appear above the selected level, confirming that the alert for that level is active.
  • Proximity alerts: The master switch for the entire proximity alert functionality. If set to `false`, no alerts will trigger, even if activated on the chart.
  • Proximity activation distance [Points]: Specifies how close the price must get to the level to trigger an alert. The value is in points (not pips).
    • Example: If a DML level is at 1.08500 and you set the distance to `200` points, an alert will be triggered when the Ask price reaches 1.08300 (for an alert below the level) or the Bid price reaches 1.08700 (for an alert above the level).
  • Popup Alerts: Enables the standard alert pop-up window directly on your MetaTrader platform.
  • Mobile Alerts (Push): Enables push notifications to be sent to your phone via the MetaTrader mobile app.
    • Important Note: For mobile alerts to work, you must first configure your unique MetaQuotes ID in the settings of your desktop MetaTrader platform (in the menu: `Tools` -> `Options` -> `Notifications`).
DML Button Parameters

Button Parameters

This section allows for full customization of the control panel that appears on your chart. This panel is your command center for quickly managing the visibility of DML levels and activating interactive functions.

  • Show Button: The master switch for the entire panel. If set to `false`, none of the buttons described below will be visible.
  • Buttons Position: Selects the corner of the chart where the panel will be displayed.
  • Show Hide All (H) / Extend (E) & Alert (A) Buttons: These parameters allow you to show or hide the individual helper buttons, letting you create a more minimalist panel if desired.
  • Helper Buttons: The panel includes special function buttons that act as interaction modes:
    • H (Hide All): A global visibility toggle. A single click hides or shows *all* DML levels at once, overriding the individual settings for each level group. It’s a quick way to clear your chart.
    • E (Extend): Activates the "Extend Levels" mode. After clicking 'E' (the button will become bolded), you can click on individual DML lines on the chart to permanently extend them into the future. Clicking the level again will toggle the extension off. To exit this mode, simply click the 'E' button again. There is also a "hidden" function to extend a DML line: click on the desired DML level while holding down the SHIFT key.
    • A (Alert): Activates the "Set Alerts" mode. It works similarly to the 'E' button. After clicking 'A', you can click on any DML line to arm a proximity alert for it (using the settings from the *Proximity Alerts* section). There is also a "hidden" function to set an alert on a DML line: click on the desired DML level while holding down the CTRL key.
  • 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 Appearance Parameters: Use options like `Button X/Y Size`, `Button Text Color`, `Button Font Size`, etc., to precisely adjust the size, color, and spacing of the buttons to match your trading workspace and chart template.
Jump Flip Levels Parameters

Levels Parameters

This is the key section for the JUMP FLIP strategy, where you define the criteria for identifying a "JUMP" signal—a rapid change in a DML level's value after a period of stability. You can configure up to 12 independent slots, each monitoring a different DML level.

The JUMP signal logic is based on two conditions that must be met simultaneously:

  1. Stability (Quiet Zone / Breakout Zone): The DML level must first move within a very narrow range for a specified period (it cannot have made a previous JUMP), confirming a period of stability.
  2. Jump (JUMP): Immediately following this period of stability, the level must rapidly change its value by at least the defined minimum distance.
  • DML Level Name: The name of the DML level to be monitored (e.g., "Sienna", "Khaki"). Leaving the field empty deactivates the slot.
  • Button Color: The color of the on-chart button assigned to this level (visual setting).
  • Number Of Minutes In Breakout Zone (Stability Time): Specifies the minimum time in minutes that the DML level must remain stable (cannot perform a "JUMP" of the specified size) immediately before a potential signal. This defines the "quiet zone" or "base" before the jump. The longer the required stability time, the more significant the subsequent JUMP may be.
  • Min JUMP Distance [Points]: Specifies the minimum distance in points by which the DML level's value must "jump" (comparing the last value from the stable period with the new value) for a JUMP signal to be generated.
JF Strategy Mode

JUMP & FLIP Strategy Mode

This parameter determines how the EA interprets the JUMP signal and whether it looks for a special variation of the JUMP signal called "FLIP".

  • JUMP_only: The basic mode. The EA opens a position immediately after detecting a JUMP signal, in the direction opposite to the jump (JUMP up = SELL, JUMP down = BUY).
  • JUMP_FLIP: An advanced mode that looks for "FLIP" confirmation. After detecting a JUMP, the EA waits for an additional condition based on the position of the DML level relative to the candle on which the JUMP occurred:
    • FLIP for SELL: After an upward JUMP, the current DML level must be above the opening price of the candle on which the JUMP occurred, AND the DML level just before the JUMP signal must have been below the closing price of that candle. Only when both conditions are met is a FLIP signal for SELL generated.
    • FLIP for BUY: After a downward JUMP, the current DML level must be below the opening price of the JUMP candle, AND the DML level just before the JUMP signal must have been above the closing price of that candle. Only then is a FLIP signal for BUY generated.
  • JUMP_FLIP_Continuation: A variant of the JUMP_FLIP mode. The EA also looks for FLIP conditions. If they are not met, it will open a position according to the last FLIP signal - as a continuation of that direction.
Jump Flip Strategy Parameters

Strategy Parameters

This section contains global filters and management options that influence the logic of opening and closing positions for the entire JUMP FLIP strategy.

  • Trading Direction: A global filter for trade direction. It allows you to restrict the EA to only BUY or only SELL positions, regardless of the generated JUMP/FLIP signals.
    • BUY_and_SELL: The EA opens positions in both directions.
    • only_BUY: The EA only opens BUY positions.
    • only_SELL: The EA only opens SELL positions.
  • Min Distance Between Setups [Points]: The minimum distance in points that must be maintained between a newly opening setup and any other setup in the same direction already existing on the chart. This prevents opening too many positions in close proximity in one direction.
  • Close On Opposite Signal: If set to true, the appearance of a new JUMP signal in the opposite direction (e.g., a downward JUMP when a SELL position is open) will cause the immediate closure of all existing positions and the deletion of all pending orders of the opposite type. It acts like a "Stop and Reverse" mechanism at the signal level.
  • Close On Opposite FLIP: Works similarly to the option above, but reacts only to a FLIP signal (not the JUMP itself). If a FLIP signal opposite to the open positions appears, they will be closed along with their pending orders. This option is relevant only in the JUMP_FLIP and JUMP_FLIP_Continuation modes.
DML Setup Parameters

Setup Parameters / Lot Size

This key section allows you to precisely define what size the opened positions will have and how the EA will initiate and manage the entire lifecycle of a trading setup after a JUMP or FLIP signal.

Setup Lifecycle Management

These parameters control how long a setup is active, under what conditions it is removed, and how often it can be opened.

  • Setup Expiration Minutes: The time in minutes after which an inactive setup (a set of pending orders) will be automatically deleted. A value of 0 means the orders will never expire, unless other variables cancel these positions.
  • Delete Opposite Setup After Entry: If set to true, the activation of one setup (e.g., SELL) will cause the automatic deletion of pending orders for the opposite setup (BUY), if it was generated at the same moment.
  • Max Opened Setup Number PerDay PerColor: Limits how many times a setup can be opened (position filled) from signals generated by a single DML level slot (e.g., only from the "Sienna" level) within one day. A value of 0 disables the limit.
  • Max Signals Number PerDay PerColor: Limits how many times a JUMP/FLIP signal from a single DML level slot can be generated (even if no position is opened) within one day. A value of 0 disables the limit.
  • Trade From Next Day: If set to true, the EA will ignore all signals on the day it was launched on the chart and will start trading only from the next day.

Lot Size Management

Choose the method for calculating trade volume. Settings are separate for Grid and Pyramid orders.

  • Lot Size Mode (for Grid and Pyramid):
    • fixed: The simplest method. The EA will use the exact lot values you manually enter.
    • Lot_perBalance: Volume is calculated dynamically based on the account balance. In the Balance For Position field, you specify the balance amount corresponding to the base lot (e.g., 0.01).
      • Example: If your balance is $10,000 and Balance For Position is 5000, the EA will open a base position of 0.02 lots.
    • Risk_from_Balance / Equity / Amount: Advanced modes. The EA automatically calculates the position size for the entire grid so that if the SL is hit, the total loss does not exceed the set percentage of capital (Resked Percent) or amount (Risked Amount).
      • Example: $10,000 account, 2% risk from balance. Max loss = $200. The EA calculates lots so that closing the entire grid at SL results in a loss of ~$200.
  • Lot Difference (for Grid and Pyramid): Determines the lot size progression in the grid/pyramid (same_for_all or multiplier_for_baseLot).

Very Important Note: In risk-based modes, if the calculated lot size is smaller than the broker's minimum (e.g., 0.01), the EA will open a 0.01 lot position. On small accounts, this can lead to a loss greater than the defined risk.

Entry Settings

  • Open Shift Mode: Decides how distances (Open Shift) are interpreted in the grid/pyramid.
    • in_points: Open Shift values are points.
    • range_Multiplier: Open Shift values are multipliers of the JUMP size (in points) that generated the signal. The 'range' is the distance between the DML level that generated the JUMP signal and the OPEN value of the minute candle on which this signal was generated. This allows for dynamic grid adjustment based on JUMP volatility and market situation.
  • First Order At Market: Determines if the first order is market (true) or pending (false). Setting to false allows for more precise entry relative to the OPEN level of the minute candle on which the JUMP/FLIP signal was generated.
  • Used Base Level For Shifts: Reference point for calculating subsequent grid levels (level_price - the open level of the minute candle on which the JUMP/FLIP signal was generated, first_order_price - the entry price of the first position).
  • Used Spread [Points]: Spread value used for internal calculations, important for the Strategy Tester and for closing SELL orders at TP during the night.
  • Manual Order Fixed Lot size: Fixed lot size for orders added manually via the Position Control Panel.
  • Min Distance Between Manual Orders: Minimum distance between manually added orders.
MMD Grid Orders Filter Parameters

MMD Grid Orders Filter

This advanced filter acts as an intelligent safety brake for your grid of orders. Its purpose is to prevent adding subsequent orders to the grid when the market is moving in a strong, one-directional trend that is contrary to the direction resulting from your strategy.

This filter only activates after the initial number of orders, defined in the Open Pending Grid Number parameter (in the Grid Orders section), has been opened.

Example: If Open Pending Grid Number is set to 2, the first two grid orders will be opened unconditionally. The MMD filter will only start verifying market conditions from the third grid order onwards.

  • Use MMD Grid Orders Filter: The main on/off switch for the filter. Setting it to true activates filtering. The filter is based on the MMD methodology, created by Mariusz Maciej Drozdowski. You can find more about this methodology on MagicOnCharts.com.
  • Fast & Slow MA Cloud Period: These define the periods for two moving average clouds. The EA creates a "cloud" (a zone) by using two types of moving averages (SMA and EMA) of the same period. Such a zone, unlike a single line, is more resistant to market noise and provides a more stable view of the trend.
    • Fast Cloud: Reacts more dynamically to price changes.
    • Slow Cloud: Smooths out price movements, indicating a more long-term direction.
  • Time Frame for MA Clouds: Specifies the time interval on which both moving average clouds are calculated. This allows the trend analysis to be based on a different time horizon (e.g., H1) than the one the Expert Advisor is running on (e.g., M5).

Filter Logic in Practice:

The MMD filter analyzes the relative position of the clouds to assess whether adding another order to the grid is justified.

  • To open a subsequent BUY order from the grid, the fast cloud must be above the slow cloud (suggesting a potential return to an uptrend).
  • To open a subsequent SELL order from the grid, the fast cloud must be below the slow cloud (suggesting a potential return to a downtrend).

If the condition is not met (e.g., the EA wants to open a BUY position, but the clouds indicate a strong downtrend), the order will not be opened, even if the price reaches its level. The EA will wait until the cloud configuration becomes favorable. In short, this filter is designed to protect your account from the uncontrolled expansion of a grid in unfavorable market conditions.

DML Grid Setup Parameters

Grid Orders Parameters

This section defines the mechanics of building a grid of orders. A grid involves opening subsequent orders at specified intervals as the price moves contrary to the direction of your initial position. The main goal is to average the entry price, which means a smaller price movement in the desired direction is needed to achieve profit.

  • Open Pending Grid Number: A key parameter for managing the grid construction. It determines how many pending orders from the grid are placed on the market immediately after a signal appears.
    • How it works: If you set this value to 2, the EA will place only the first two orders from the grid onto the market. The remaining orders (from 3 to 10) are not added automatically. They will be added one by one, only when the price reaches their respective levels and market conditions permit (according to the MMD filter for Grid positions).
    • Logic for adding subsequent orders (from 3 onwards):
      • MMD filter disabled: The EA will unconditionally add the next pending order as soon as the price touches its defined level.
      • MMD filter enabled: To add the next order, two conditions must be met simultaneously: the price must touch its level, AND the MMD cloud formation must align with the order's direction.
  • Position Size Fixed/Multiplier 01 ... 10: Here you define the lot size for each of the up to 10 levels of the grid. If you only want to use 5 orders, leave the value 0.0 in fields 06 through 10.
  • Open Shift 01 ... 10 [Points]: This is where you specify where the pending orders will be placed. The distances are given in points.
    • Open Shift 01: Defines the distance of the first order from the base DML level. A value of 0 means the first order will be placed exactly on that level.
    • Open Shift 02 to 10: Define the distance of subsequent orders from the same base point (i.e., from the DML level or the opening price of the first position, depending on the Used Base Level For Shifts setting).
      • Important: This is not the distance from the previous order! If Open Shift 02 is 100 and Open Shift 03 is 150, it means the second order will be 100 points from the base, and the third order will be 150 points from the base.
DML Pyramid Setup Parameters

Pyramid Setup Parameters

Pyramiding is a strategy of adding more orders as the price moves in the direction of your open, profitable position. The goal is to maximize profits during a strong trend that aligns with your expectations. It is a powerful tool for scaling winning trades.

  • Use Piramide Orders: The master on/off switch for the entire pyramiding function.
  • Start Piramide From Position Nr: Specifies after which Grid position's activation the pyramiding strategy should be launched.
    • Example: If you set this to 1, the pyramid will activate as soon as the first position from the grid is opened. If you set it to 3, the EA will wait for three grid positions to be opened before it starts building the pyramid.
  • Move Piramide with Next Grid Position: Dynamically moves the entire pyramid structure. When the next grid order is opened, the entire pyramid (all its pending orders) is moved, and its levels are recalculated based on the price of the most recently opened grid order. This allows the pyramid to "follow" the developing grid.
  • Start New Piramide with Next Grid Position: A more aggressive form of position scaling. When the next grid order is opened, the EA does not move the existing pyramid but instead starts an additional, independent pyramid sequence from this new order. This results in building multiple pyramids, each with a different base.
  • Position Size & Open Shift (P01 ... P10): These parameters work analogously to those in the Grid section, with the key difference that distances are calculated in the profitable direction.
    • Important: Just like in the grid, Open Shift P01 is the distance from the base, and Open Shift P02 through P10 are the distances of subsequent orders from the same base, not from the previous order.
DML Take Profit and Stop Loss Parameters

TP & SL Parameters

This is the heart of risk and profit management for every setup. All orders within a single grid share one common Take Profit level and one common Stop Loss level. This means that when one of these levels is triggered, the entire group of positions will be closed simultaneously - including orders from the pyramid and orders added manually to the setup (using the Setup Management Panel).

Take Profit (TP)

  • Initial TP Shift [Points]: Sets the initial profit target for the entire setup. This distance is measured in points from the base price (according to the Used Base Level For Shifts setting).
  • Close Opened Setup When TP Reached:
    • true (default): When the TP level is reached, the EA will delete all pending orders belonging to that setup - even if no position from the setup has been filled.
    • false: The EA will maintain all pending orders until at least one position is filled and then either the Take Profit or Stop Loss level is hit.
  • Use Move TP (Dynamic TP shift based on position count): This feature allows you to dynamically move the TP level as the grid expands, which is useful for securing profit or minimizing risk.
    • How it works: After a specific number of positions are opened (e.g., moveTPAfterEntryNr = 3), the common TP will be shifted by a specified value (TPAfterMove01). You can define up to 4 such thresholds.
    • Important Note: The TP level shift can be triggered by positions from both the Grid (identified as values 1 to 10) and the Pyramid (identified as values 11 to 20).
    • Important: The shift value (TPAfterMove) can be negative. A negative value (e.g., -50 points) means moving the TP closer to the Break-Even price, often to a small loss level, to "salvage" a position when the market is moving strongly against you.
  • Use Move TP at Time (Dynamic TP shift at a specific time): Allows for the TP to be moved at a set broker time.
    • moveTPTime: The time at which the modification should occur (e.g., "22:50").
    • TPatTimeShift [Points]: The value in points - relative to the base level (Used Base Level) - by which the TP will be moved. This is useful for tightening the TP before the market closes or during periods of increased volatility.

Stop Loss (SL) & Slippage

  • SL Shift from Base Level [Points]: Sets the distance of the Stop Loss order in points.
    • Key Information: This distance is calculated from the Used Base Level that initiated the entire setup. This ensures a constant and predictable level of risk, regardless of how many positions from the grid are opened.
  • Slippage [Points]: The maximum allowable price deviation (slippage) in points when an order is executed. This protects against opening a position at a much worse price during high market volatility.
Move SL & BE Parameters

Move SL / BE Parameters

This function is an automatic guardian of your unrealized profits. Its purpose is to dynamically move the Stop Loss level as the price moves in your favor. This allows you to "lock in" a portion of the profit, reduce risk to zero (Break-Even), or even guarantee a minimum profit, all without your intervention.

The logic is based on simple "if-then" condition pairs: if the price reaches a specified profit level X (Trigger), then move the Stop Loss to level Y (Gain). You can define up to 10 such thresholds.

  • Use Move SL/BE: The main on/off switch for the entire function.
  • Used Move SL/BE Reference Price: A key parameter that defines the reference point from which all distances will be calculated (for both Trigger and Gain).
    • level_price: The reference point is the original, fixed DML level that generated the signal. This provides predictable, consistent protection levels.
    • first_order_price: The reference point is the actual opening price of the first position in the grid. This is a dynamic approach that adapts to potential price slippage.
  • MoveSLTrigger01 ... 10 [Points]: The "trigger" or activation threshold. This is the distance in points that the price must move away from the reference point (generating profit) to activate the Stop Loss shift.
  • MoveSLGain01 ... 10 [Points]: The new location for the Stop Loss. This is the distance in points from the same reference point to which the SL will be moved after being activated by its corresponding Trigger.
    • A positive value (e.g., 10) means locking in a small profit.
    • A value of 0 means setting the SL to the Break-Even (BE) level.
    • A negative value (e.g., -20) means moving the SL closer, but still at an acceptable loss level.

Example in Practice:

Let's assume a BUY position, and the Reference Price is 1.20000.

  • You set: MoveSLTrigger01 = 100, MoveSLGain01 = 20.
  • When the market price reaches 1.20100 (a 100-point profit), the Trigger01 condition is met.
  • The EA immediately moves the Stop Loss to the 1.20020 level (base price + 20 points).
  • From this moment on, your position has a guaranteed 20 points of profit, even if the price reverses.
Trailing Stop Parameters

Trailing Stop Parameters

A Trailing Stop (TS) is a flexible safety net that automatically follows the price as it moves in a profitable direction. Unlike the `Move SL` function, which shifts the Stop Loss in steps after reaching specific thresholds, the Trailing Stop does so continuously, allowing profits to run while protecting the gains already made.

The EA allows you to define two stages for the Trailing Stop's operation, enabling you, for example, to tighten it as profits increase.

  • Use Trailing Stop Function: The main on/off switch for the entire function.
  • TS_Start01 / TS_Start02 [Points]: The activation threshold. This is the profit level in points (calculated from the price of the lowest-filled position from the Grid), which, when reached, will activate (for Start01) or modify (for Start02) the Trailing Stop.
  • TS_Dist01 / TS_Dist02 [Points]: The trailing distance. This specifies the distance in points at which the Stop Loss will follow the peak price reached by the market after the Trailing Stop has been activated.
  • TS_Close_mode: Defines the conditions under which the Trailing Stop can close positions.
    • TS_close_all: Standard mode. When the price reverses and hits the Trailing Stop level, the EA will close all positions belonging to the setup, regardless of whether their combined result is positive or negative.
    • TS_close_only_profitable: A safer mode. After the Trailing Stop level is hit, the EA will close only the positions that are currently profitable. This prevents a situation where a TS activated on a small profit closes the entire setup with an overall loss.
  • TS_Line_style / color / width: Parameters that allow you to customize the appearance of the Trailing Stop line on the chart for better visualization.

Example in Practice:

Let's assume the price of the lowest-filled position from the Grid for a BUY setup is 1.10000.

  • You set: TS_Start01 = 200, TS_Dist01 = 100.
  • The price rises to 1.10200 (a 200-point profit). The Start01 condition is met, and the TS activates.
  • The EA immediately sets the SL to 1.10100 (200 points of profit - 100 points of distance). You have now locked in 100 points of profit.
  • The price continues to a new high of 1.10250. The SL follows it, moving up to 1.10150 (always 100 points behind the peak).
  • The market reverses, and the price falls to 1.10150. The positions are closed with a 150-point profit.
DML Risk and Safety Functions

Safe Profit & Risk Functions

Additional modules designed to protect capital and secure profits in dynamic market conditions. They act as automatic safety fuses for your strategy.

Safe Profit Function

This function acts like an intelligent Trailing Stop that only activates near the established Take Profit target. Its purpose is to protect the majority of the profit when the market gets close to the TP but then suddenly reverses.

Step-by-step logic:

  1. Arming: The function "arms" itself when the price approaches the Take Profit level to within the distance defined in maxDistToTpToActiveFunction, provided the minimum number of orders (minOpenedOrdersToSafeProfit) is open.
  2. Triggering: Once armed, if the price retreats from the TP zone by a distance greater than defined in distToTpBackToCloseOrders, the EA will close positions to secure the profit.
  • Use Safe Profit Function: The main on/off switch for the function.
  • Safe Profit Mode: Determines which positions are closed when the function is triggered.
    • SP_close_all: Closes all positions in the setup.
    • SP_close_only_profitable: Closes only profitable positions.
  • Close on profit only X times: Limits how many times the SP_close_only_profitable mode can be used for a single setup. A value of 1 means that after closing profitable positions once, subsequent activations will close the entire setup.
  • Min Opened Orders To Active...: The minimum number of open positions required for the function to activate.
  • Distance To TP To Active... [Points]: The maximum distance from the TP at which the function "arms" itself.
  • Back Distance To TP To Close... [Points]: The maximum distance the price can retreat from the TP zone - after the Safe Profit function is activated - at which the positions will be closed.

Max Daily Loss

The ultimate safety net that protects your account from excessive losses within a single trading day.

  • Use Max Daily Loss: The main on/off switch for the function.
  • Max Daily Loss (in account currency): The maximum allowable loss for the day, expressed in your account's currency.
  • How it works: When the sum of realized losses for the day reaches the defined limit, the EA will stop opening new setups for the remainder of that trading day.
Trading Time Parameters

Trading Time Parameters

A time filter is a powerful tool that allows you to precisely adapt the EA's operation to specific trading sessions, avoiding periods of low liquidity or increased risk.

Main Trading Windows

This filter defines the "allowed" time windows during which the EA is permitted to initiate new setups.

  • Use Trading Time: The main on/off switch for this filter.
  • Trade On Monday ... Sunday: Allows you to enable or disable trading on specific days of the week.
  • StartTime / EndTime (for each day): Defines the exact start and end times for trading (according to the broker's server time) for each active day.
    • How it works: Outside of the defined hours, the EA will not open any new setups. Already open positions will continue to be fully managed according to their SL, TP, and other function settings.
    • Strategic Application: Use this filter to limit trading, for example, to only the London and New York sessions (e.g., from 09:00 to 18:00), avoiding trading at night.
Exclude Time Parameters

Exclude Time Parameters

This filter works in the opposite way to the Main Trading Window. Instead of defining when the EA should trade, here you specify a "forbidden" time zone during which the robot should stop opening new setups. This function is ideal for precisely excluding short, risky periods during the day.

  • Use Level Exclude Time: The main on/off switch for this filter.
  • ExcludeStartTime / ExcludeEndTime: The hours between which the EA should stop opening new setups.
    • How it works: If you define a window from 23:00 to 01:30, the robot will stop initiating new trades just before midnight and resume an hour and a half into the new trading day. Already open positions will continue to be fully managed.
    • Overnight Break Handling: The filter correctly interprets windows that cross midnight. If ExcludeEndTime is earlier than ExcludeStartTime (e.g., 23:00 to 01:30), the function will work correctly as an overnight break.
    • Strategic Application: The most common use is to exclude the period of low liquidity and high spreads during the market rollover (the transition from one trading day to the next). It can also be used to avoid trading during regular macroeconomic data releases.
MMD Filter Parameters

MMD Global Filter Parameters

This filter acts as the primary gatekeeper for your strategy. Its purpose is to verify the overall market trend before any setup is even considered. Unlike the MMD Grid Orders Filter, which operates during the expansion of a grid, this global filter decides whether a signal from a DML level has any chance of being executed at all.

  • Use MMD Filter: The main on/off switch for the filter.
  • Fast & Slow MA Cloud Period: These define the periods for the two moving average clouds. These parameters work identically to those in the grid filter - the fast cloud represents short-term momentum, while the slow cloud represents the long-term trend.
  • Time Frame for MA Clouds: Specifies the time interval on which both moving average clouds are calculated. This allows you to base your main trend analysis on a higher timeframe (e.g., H1) while trading on a lower one (e.g., M5).

Filter Logic in Practice:

The filter analyzes the relative position of the clouds to give a "green light" for a potential setup.

  • The EA will only consider opening a BUY setup if the fast cloud is above the slow cloud.
  • The EA will only consider opening a SELL setup if the fast cloud is below the slow cloud.

If the condition is not met, the signal from the DML level is completely ignored, and the EA takes no further action related to that signal. Use this filter to trade exclusively in the direction of the dominant trend, which can significantly increase the probability of success and help you avoid opening positions "against the current."

Position Control Panel

Position Control Panel

This optional panel is your manual command center, giving you the ability to quickly intervene and manage positions opened by this specific EA instance.

  • Show Positions Control Panel: The main on/off switch for the panel. Set to true to display it on the chart.

Note - Beta Version: This panel's functionality is currently in the beta phase and is provided for testing purposes only. A full, detailed description of all its features will be included in the next version of the user manual.

Download DML Expert Advisors

Download

To download the latest version of this tool, go to the Download section in your client panel.


Go to the Download section
This site uses cookies. Without changes to your browser cookies will be stored on your device. Your can find more informations here.
Close