---
title: "07.01. Filters: Filter groups and conditions"
description: ~
---

[Skip to content](https://support-beta.brokeree.com/help/484043746497#main-content)

![](https://support-beta.brokeree.com/hs-fs/hubfs/brokeree_logo_2021.png?width=1634&height=453&name=brokeree_logo_2021.png)

Open main navigation

Close main navigation

 How can we help you?

- There are no suggestions because the search field is empty.

1. [Brokeree Documentation Hub](https://support-beta.brokeree.com/help?hsLang=en)
2. [Dealing Desk](https://support-beta.brokeree.com/help/dealing-desk?hsLang=en)
3. [User manual](https://support-beta.brokeree.com/help/dealing-desk?hsLang=en#user-manual)

# 07.01. Filters: Filter groups and conditions

Besides the general filters, users may also use filter types which can be put in separate filter groups. The application will choose only one suitable filter group among specified in the list starting from the top (following *OR* logic). The filters specified inside the group itself follow *AND* logic.

![](https://brokeree.box.com/shared/static/tgzbwa7rqj2vshroqudutpay2mpu8ssy.png)

For example, the rule’s action is to reject incoming requests, and there are 2 filter groups: Group1 and Group2. Group1 has the *Accounts = 123* and *Volume \> 2* filters specified in it; Group2 has the *Accounts = 123* and *Days = Thursday, Friday* filters. This means that if the trading account ID 123 tries to open more than 2 lots, the order will be rejected at any time, but if the order’s volume is less than 2, the trader’s orders will be rejected only on Thursdays and Fridays.

Such design may significantly decrease the time spent on composing complicated sets of rules and also clears the rule list itself, as it removes the necessity of doubling the rules with almost similar conditions just for the sake of adding one alternative filter. See the supported filter types below.

- **Accounts**
  
  A list of accounts and/or groups. Masks `!` and `*` can be applied.
  
  Conditions: `=`
  
  Example values:
  
  ```
  1234
  *Group*, !993
  ```
- **ID number**
  
  A list of values of accounts’ “ID number” fields. Masks `!` and `*` can be applied.
  
  Conditions: `=`, `≠`
  
  Example values:
  
  ```
  1234, 12345, abcde
  ```
- **Request comment**
  
  A list of values of requests’ “Comment” field. Masks `!` and `*` can be applied.
  
  Conditions: `=`, `≠`
  
  Example values:
  
  ```
  1234, my, comment
  ```
- **Agents**
  
  A list of accounts. Masks `!` and `*` can be applied.
  
  Conditions: `=`
  
  Example values:
  
  ```
  1234
  !1235, 123*, 999
  ```
- **Countries**
  
  A list of country names. Masks `!` and `*` can be applied.
  
  Conditions: `=`
  
  Example values:
  
  ```
  France
  !Kazakhstan, *stan
  ```
- **Symbols**
  
  A list of symbols and/or securities. Only one *Symbols*   
  condition is allowed per filter group.
  
  Conditions: `=`
  
  Example values:
  
  ```
  EURUSD
  !AUD*, For*, !Crypto
  Forex\*
  Forex\2\AUD*
  ```
- **Days**
  
  A list of days of the week.
  
  Conditions: `=`
  
  Example values:
  
  ```
  Monday
  Sunday, Monday, Tuesday
  ```
- **Time**
  
  Time of the server in 24h format. One timestamp per filter.
  
  The *Time* filter compares the specified hours and minutes with MT server’s time as integers disregarding the dates, therefore 23:00 of current day is *mathematically more* than 02:00 of the next day. To specify a timeframe starting at one trading session and ending at the consequent one, use two *Time* filters in separate *Filter groups*. [See the Usage examples](https://support-beta.brokeree.com/help/484057356516?hsLang=en).
  
  Conditions: `≥` `≤` `>` `<`
  
  Example values:
  
  ```
  15:00:00
  23:59:01
  ```
- **Volume**
  
  The volume of an incoming trade request.
  
  Conditions: `=` `≠` `≥` `≤` `>` `<`
  
  Example values:
  
  ```
  4
  1.25
  0.13
  ```
- **Colors**
  
  A list of color titles on the MetaTrader server. Used with MetaTrader accounts having a color property chosen. Values can be specified in 3 color formats:
  
    - **Text**
      
      Names of colors as in MetaTrader.
    - **RGB**
      
      Using underscores instead of commas to separate color channels.
    - **HEX**
      
      Without #
  
  Use one of the online color converters (for example, [this one](https://www.rgbtohex.net/)) to utilize RBG or HEX custom color values.
  
  Conditions: `=`
  
  Example values:
  
  ```
  Red
  !Honeydew, 240_10_15, ffffab, Yellow*
  ```
- **Duration**
  
  The lifetime of a position starting from the position’s opening timestamp (activation timestamp for pending orders). Checked for closing requests only, specified *in seconds*.
  
  Conditions: `=` `≠` `≥` `≤` `>` `<`
  
  Example values:
  
  ```
  60
  180
  ```
- **Profit**
  
  The position’s profit (PnL field value) in the account’s deposit currency.  Checked for closing requests only.
  
  Conditions: `=` `≠` `≥` `≤` `>` `<`
  
  Example values:
  
  ```
  1.25
  -3.01
  100
  ```
- **Quote delay**
  
  The time passed from receiving the last tick of the instrument being traded. Specified as an integer in seconds.
  
  Conditions: `=` `≠` `≥` `≤` `>` `<`
  
  Example values:
  
  ```
  5
  10
  ```
- **Trading session**
  
  The time passed from the beginning of a trading session. Trading session start time is based on the [MT symbols’ settings](https://support.metaquotes.net/en/docs/mt4/administrator/administration/ug_symbols). Specified as an integer in minutes. *Trading session’s* values can’t be more than 1440 (24h in minutes). Values more than 24h will be maxed out at 1440 by the plugin.
  
  If the trading sessions are adjacent in time (e.g. Forex Monday-Friday with no breaks), the session start time will be considered as the start of the first day. In this case, the value `≥5` will let the request pass on Wednesday at 00:03 if the Monday’s session has started at 00:00.
  
  Conditions: `=` `≠` `≥` `≤` `>` `<`
  
  Example values:
  
  ```
  10
  30
  ```
- **Email**
  
  The plugin compares the values with the “Email:” field in MT account profiles. The value `*` will choose all accounts even with no email specified in their profiles.
  
  Conditions: `=`
  
  Example values:
  
  ```
  *
  qwerty@*
  *@gmail.com*
  user@mail.com
  ```
- **Positions limit**
  
  The number of open positions and/or pending orders the account has at the moment of sending a trading request.
  
  *Value model: (r)positions count; trading type; aggregation; (r)symbol/security mask*
  
    - **Positions count (required)**
      
      Number of open positions and/or pending orders. Please note that the Positions parameter doesn’t mean that only position open requests are taken into account by the rule - it’s the *Request type* and *Entry type* filters who control this aspect. Take a look at the example:
      
      \*Positions limit = \**`≥3;Positions`*
      
      \*Entry type, Request type = \**`*`*
      
      \*Action = \**`Reject`*
      
      Given an account already has 3 open positions (the rule has been created after the account opened the third position). Any request will be rejected in this situation: placing a pending order, modifying SL/TP on a position, even closing an existing position.
    - **Trading type (optional)**
      
      Determines which entities to count:
      
          - **Positions (default)**
            
            Only open positions
          - **Pendings**
            
            Only pending orders awaiting activation
          - **All**
            
            Positions and pendings altogether.
    - **Aggregation (optional)**
      
      Determines which symbols to take into account:
      
          - **PerSymbol (default)**
            
            Count only positions/pendings of the same symbol as in the request;
          - **SymbolMask**
            
            Count positions/pendings of the symbols specified in the *Symbol/security mask* (next parameter).
    - **Symbol/security mask** (**required**, if *Aggregation* is set to *SymbolMask*)
      
      Determines the symbols, positions/pendings of which are to be taken into account. If the incoming request is to open a new position, Dealing Desk counts the number of positions including the requested one, but doesn’t do so for close position requests.
  
  Conditions: `=` `≠` `≥` `≤` `>` `<`
  
  Example values:
  
  ```
  2
  3;All
  4;Positions;SymbolMask;*EUR*
  ```
- **Exposure limit**
  
  The amount of money (exposure) in open positions.
  
  Exposure calculation **for Forex** symbols: `Lots * Contract size`
  
  Exposure calculation **for non-Forex** symbols: `Lots * Contract size * Price`
  
  Price is:
  
    - For current exposure (currently open trades): *Open price*.
    - For requested exposure (incoming trade request): *Requested price*, prior to slippage calculation. It may be important to tell these apart when processing close requests (where the *Price* is *Close price* of the order).
  
  *Exposure limit* requires other filters to be set along with it:
  
    - Symbols, always
    - Accounts, if *Exposure limit* filter’s *Account mode* is set to *AccountMask*
  
  *Value model: (r)symbols/security mask; (r)amount of money; currency; positions mode; request mode; symbol mode; account mode; (r)account/group mask*
  
    - **Symbol/security mask (required)**
      
      The rule will check the exposure of positions on the specified symbols/securities only.
    - **Amount of money** **(required)**
      
      The size of total exposure of the positions measured in the **Currency** (*optional* next parameter, USD by default)**.**
    - **Positions mode (optional)**
      
      Determines the way to calculate the exposure based on market participation:
      
          - **Hedged (default)**
            
            Check positions’ hedged volumes before calculating exposure;
          - **Total**
            
            Simply add exposures of all positions regardless of their direction.
      
      Explanation: Given the account has Buy $10000 and Sell $6000 positions opened. With *Hedged*, their exposure is seen as $4000, with *Total* - as $16000.
    - **Request mode (optional)**
      
      Determines participation of requested volume in exposure calculation:
      
          - **Include (default)**
            
            Calculate amount of money of already open positions *plus*   
            that of the request
          - **Ignore**
            
            Calculate exposure of already open positions only.
    - **Symbol mode (optional)**
      
      Determines which symbols to take into account:
      
          - **SymbolMask (default)**
            
            Calculate amount of money only on positions, symbols of which are specified in the *Symbol/security mask* parameter;
          - **PerSymbol**
            
            Calculate amount of money only on positions, the symbol of which is the same as that of the request.
    - **Account mode (optional)**
      
      Determines the accounts to calculate exposure of:
      
          - **PerAccount (default)**
            
            Calculate amount of money only on the account, which has sent the request;
          - **AccountMask**
            
            Calculate amount of money on accounts specified in the *Account/group mask* parameter altogether.
    - **Account/group mask** (**required**, if *Account mode* is set to *AccountMask*)
      
      Accounts and/or groups to check the exposure of.
  
  Conditions: `=` `≠` `≥` `≤` `>` `<`
  
  Example values:
  
  ```
  *; 30000
  EURUSD, GBP*; 500000; CHF; Total; Ignore; PerSymbol; AccountMask;*
  ```

  ❗
  
  Exposure is calculated for instruments, only when it is possible to convert position’s volume into account’s deposit currency, using MetaTrader conversion rules. If conversion is not possible, then the exposure for these positions is set to 0.   
  See more details at [https://support.metaquotes.net/en/docs/mt5/platform/administration/admin\_symbols/admin\_symbols\_settings/symbol\_settings\_trade/conversion](https://support.metaquotes.net/en/docs/mt5/platform/administration/admin_symbols/admin_symbols_settings/symbol_settings_trade/conversion)

 

- **Stop deviation**
  
  Difference between current market price and Stop loss/Take profit levels specified in the request. The price difference is taken as an absolute value, so there’s no need to differentiate between levels for Buy and Sell orders.
  
  The difference can be specified in exact points (a numeral, e.g. *sl:100*) and calculated as  *SLTP price - current price*. This value type is recommended in rules for specific symbols.
  
  Using the percentage-based difference (e.g. *tp:5%*) is recommended in general rules for multiple symbols with various digits, because the explicit point difference would be hard to determine. The percentage is calculated as *(SLTP price - current price)  / current price \* 100%.*
  
  Both SL and TP levels can be specified in the condition, e.g. *sl:3%;tp:2%*. They will be checked separately from each other. To target requests containing strictly both SL and TP levels specified, set a filter group containing two *Stop deviation* conditions.
  
  The *Stop deviation* filter works for the following requests only (in which ST/TP levels can be set):
  
    - Opening a new position (not including pending order’s activation)
    - Placing a pending order
    - Modifying ST/TP levels of existing positions and pending orders.
  
  If an incoming request is not of one of these types, filter groups containing *Stop deviation* conditions **are ignored** (return *false*). If the filtered value - SL and/or TP - is not specified in the request (left *0*), filter groups containing *Stop deviation* conditions **are ignored** (return *false*). This means, if you add a Stop deviation condition, a filter group starts to **make sense only for requests with SL/TP specified** in them.
  
  Conditions: `=` `≠` `≥` `≤` `>` `<`
  
  Example values:
  
  ```
  sl:2%
  tp:4%
  sl:10
  tp:100
  sl:50%;tp:30%
  sl:1000;tp:50%
  ```

[![](https://support-beta.brokeree.com/hs-fs/hubfs/brokeree_logo_2021.png?width=1634&height=453&name=brokeree_logo_2021.png)](https://support-beta.brokeree.com/?hsLang=en)

<https://www.facebook.com/> <https://www.twitter.com/> <https://www.instagram.com/> <https://podcasts.apple.com/> [mailto:email@email.com](mailto:email@email.com)

Copyright © 2026, brokeree.com