Skip to main content

🔍 Regex

A regex, or regular expression, is a sequence of characters that defines a search pattern. It is used for pattern matching within strings, allowing you to find specific text based on defined rules.

To learn how regex works take a look at this site regexone.com or if you are already familiar you can also check this online utility: regex101.com (make sure to select Java on the left side)

Copier filter​

The copier filter can be used to allow only specific trades based on the comment or magic number. Here are some examples:

TypeRegexDescription
Commentmy EAIt copies only the trades that have "my EA" in the comment field
Comment^my EAIt copies only the trades that have "my EA" in the beggining of the comment field
Comment^my EA$It copies only the trades that have exactly "my EA" in the comment field
Magic number5It copies only the trades that have "5" as magic number. Pay attention that "15" will also be copied.
Magic number^5$It copies only the trades that have "5" as magic number.

Remarks​

  • Regex is case sensitive
  • If you have multiple filters, they will be handled with the OR operator
  • cTrader: the magic number filter is matched against the position label, but only numeric labels are supported. Labels containing letters or other non-numeric characters are ignored and the filter will never match. Use a numeric-only label on cTrader, or filter by the comment field instead.

Symbol mapping​

Here are some examples regarding the symbol mapping and broker selection:

RegexDescription
ICMarketsSCThe mapping is valid for all brokers that have ICMarketsSC in the broker name. This includes all live and demo brokers.
^ICMarketsSC-Demo02$The mapping is valid for all brokers that matches exactly ICMarketsSC-Demo02

Remarks​

  • Regex is case sensitive

Permitted symbols​

Here are some examples regarding the permitted symbols feature:

TypeRegexDescription
WhitelisteurusdOnly orders that includes "eurusd" and "EURUSD" (case insenstive) will be copied
WhitelisteurAll order that includes "eur" or "EUR" (case insensitive) will be copied
Whitelist^eurusd$Only orders that matches exactly "eurusd" and "EURUSD" (case insenstive) will be copied
BlacklistxauAll orders except orders that includes "xau" or "XAU" (case insenstive) will be copied

Remarks​

  • Regex is case insensitive

Telegram message filters​

The Telegram connector lets you define Include and Exclude regex patterns to control which messages reach the AI. Filters are applied before the AI is called, so dropped messages do not count against your daily AI call limit (100/day on Basic, 200/day on Standard & Pro).

Use either Include OR Exclude, not both. Typing in one field clears the other list automatically.

  • Exclude → drop noisy messages (announcements, promos, off-topic chatter) and let everything else through.
  • Include → whitelist only messages matching at least one pattern and drop the rest.

Up to 60 patterns per list. Each pattern is a separate chip, evaluated independently with substring match. If any pattern in the list matches the message, the list is considered a match.

Examples​

TypeRegexDescription
ExcludeannouncementSkip any message containing the word "announcement" (anywhere in the text).
Exclude^promo:Skip messages that start with promo: (e.g. promo: 50% off).
Exclude\bgiveaway\bSkip messages containing the whole word "giveaway" (won't match "giveaways" or "giveawayed").
Excludehttps?://Skip any message containing a URL (http or https link).
Exclude@\w+Skip messages mentioning a Telegram username (e.g. @admin, @support).
Include\b(buy|sell)\bOnly forward messages containing the whole word "buy" or "sell" (typical trading signal keywords).
IncludesignalOnly forward messages containing the word "signal" anywhere in the text.
Include🔔Only forward messages containing the bell emoji (useful when the provider tags every signal with an emoji).
Include\b(EURUSD|GBPUSD|XAUUSD)\bOnly forward messages mentioning one of these specific symbols.
Include\b(tp|sl)\s*[:=]Only forward messages that look like a real signal (contain TP:, TP =, SL: or SL =).

Remarks​

  • Regex is case insensitive (you don't need to write both buy and BUY).
  • Patterns use substring match: the regex doesn't need to match the whole message, just a portion of it.
  • Invalid regex patterns are rejected when you press Enter or click Add.
  • On the Include list, a message must match at least one pattern to be forwarded. Empty list = the include filter is off.
  • On the Exclude list, a message matching any pattern is dropped. Empty list = the exclude filter is off.