MT4 Coverage Setup
To configure coverage, you will need to add a new rule in the Giveup component. This can be done directly from the Pending Config component. There are several parameters that need to be defined. These, impact the way trades are recorded into the coverage account.
| Parameter | Description |
|---|---|
| Connectors | the name of the source connector(s) from where the received trades need to be saved to the coverage account Note: you can have one or multiple connectors. Examples below: - * – All connectors will be set as the source - trade/fixclient1 – Connector with name fixclient1 will be set as the source - trade/fixclient1,trade/fixclient2 – Connectors fixclient1 and fixclient2 will be set as the source - trade/fixclient* – Connectors that start with trade/fixclient , which will include fixclient1 and fixclient2 will be set as the source - !trade/fixclient*,* – All connectors except those starting with trade/fixclient will be set as the source |
| Target | the name of the MT4 connector in the XCore that contains the MT4 coverage account where trades will be recorded |
| Accounts | the name of the connector account(s) from where the received trades need to be saved to the coverage account Note: you can have one or multiple connector account. Examples below: - * – All accounts will be set as the source - trading1 – Accounts with name trading1 will be set as the source - trading1,trading2 – Accounts trading1 and trading2 will be set as the source - trading* – Accounts that start with trading, which will include trading1 and trading2 will be set as the source - !trading*,* – All accounts except those starting with trading will be set as the source |
| Securities | the specific securities(from the ones defined in the XCore) whose trades will be covered e.g: FX – meaning only trades belonging to FX security will be covered Note: by default this is set to “*”, meaning the coverage rule is defined for all symbols of all securities |
| Symbols | the specific symbols(from the ones defined in the XCore) whose trades will be covered Note: you can have one or multiple symbols. Examples below: - * – All symbols will be set - EURUSD – Only symbol EURUSD will be set - EURUSD, GBPUSD – Symbols EURUSD and GBPUSD will be set - EUR* – Symbols that start with EUR , which will include for example EURUSD, EURGBP and more will be set - !EUR*,* – All symbols except those starting with EUR will be set |
| SubId1 | specify a parameter to filter from where the received trades need to be saved to the coverage account Note: you can have one or multiple filters. Examples below: - * – All records will be set - 123 – Only record 123 will be set - 123,124 – Records 123 and 124 will be set - 12* – Records that start with 12, which will include for example 123, 124 and more will be set - !12*,* – All records except those starting with 12 will be set |
| SubId2 | specify a parameter to filter from where the received trades need to be saved to the coverage account Note: you can have one or multiple filters. Examples below: - * – All records will be set - 123 – Only record 123 will be set - 123,124 – Records 123 and 124 will be set - 12* – Records that start with 12, which will include for example 123, 124 and more will be set - !12*,* – All records except those starting with 12 will be set |
| SubId3 | specify a parameter to filter from where the received trades need to be saved to the coverage account (for MT4/MT5 sources this is the login ID) Note: you can have one or multiple login ID(s). Examples below: - * – All login ID’s will be set - 123 – Only login ID 123 will be set - 123,124 – Login ID’s 123 and 124 will be set - 12* – Login ID’s that start with 12, which will include for example 123, 124 and more will be set - !12*,* – All login ID’s except those starting with 12 will be set |
| Providers | the name of one or several providers(from the ones defined in the XCore) in case you want to only record to a coverage account trades sent to the specific provider(s). Examples below: - * – All providers will be set - provider1 – Only provider1 will be set - provider1,provider2 – Providers provider1 and provider2 will be set - provider* – Providers that start with provider, which will include for example provider1, provider2 and more will be set - !provider*, * – All providers except those starting with provider will be set Note: for B-book trades, it considers the provider who was streaming the price used for execution. Note: can only be used with the following Reported Price values : – 0 — with XCore markups – 1 — without XCore markups (raw LP price) Note: applies in FIFO and SIMPLE coverage mode; DISTINCT mode ignores it. |
| Mode | This can be set to: - any – all executed trades will be recorded in the coverage account, regardless if they were executed as A-book or B-book - a_only – only trades executed as A-book will be recorded in the coverage account - b_only – only trades executed as B-book will be recorded in the coverage account Note: by default, all trades will be covered, so the execution mode parameter in the coverage rule is set to “any” Note: Mode "a_only" and "b_only" can only be used with the following Reported Price values : – 0 — with XCore markups – 1 — without XCore markups (raw LP price) Note: DISTINCT coverage mode supports only "any" mode. |
| Values | specify the coverage parameters pattern, more details can be found in the coverage parameters table at the bottom of the page. SERVER,LOGIN,INSTRUMENT,PRICE,SCALING[,POST[,SYN[,MARKUP]]] e.g.: 11,50001,#I#,0,0.5 The first five positions are required; see also the Giveup page. |
| Coverage Mode | Coverage modes available: - FIFO – means that all trades in the MT4 coverage account will be hedged based on the trade instrument name (in the order they are received) - DISTINCT – means that the orders will be closed/hedged in the coverage account only if the original recorded order is closed. In other words, all trades in the MT4 coverage account will be hedged based on the MT4 ticket ID (a one to one mapping between executed order and recorded order in the coverage account). This mode is only applicable to MT4 trades - SIMPLE – means there will be no hedging. Every trade (open or close) will be opened in MT4 coverage account as a single order (Buy and Sell) without any hedging. The mode is set per coverage login in the Connector Config Settings of the target MT4 connector as a parameter whose name starts with Coverage, with the value <login>|<MODE>, for example Coverage1 = 50001|FIFO. Every numeric login used in a coverage rule needs such a parameter.Note: The coverage mode cannot be changed for an existing rule as it can cause issues with covering the trades. |
| Priority | the priority of the rule Note: higher number means higher priority, which will supersede the rules with lower priority |
| Enable | represents if the rule is enabled or disabled Note: a disabled rule creates no coverage, but if it matches at a higher priority than the other rules for the same target, it still prevents them from applying (see Giveup). |
Coverage parameters:
Coverage parameters defined under the values column of the Giveup Component follow the pattern outlined below:
- SERVER,LOGIN,INSTRUMENT,PRICE,SCALING[,POST[,SYN[,MARKUP]]]
- e.g.: 11,50001,#I#,0,0.5
| Field | Required | Description |
|---|---|---|
| Server | Yes | ID of the server/client (per target connectors, server IDs need to be unique, between different sources — if there are multiple sources, pushing to the same target, the server IDs between the sources, need to be unique) if 0 it is ignored Note: Max allowed id 99, if number greater to 99 added you will received a verification error → invalid coverage server: |
| Login | Yes | Login ID for the target coverage account. For FIFO or SIMPLE coverage booked when the XCore order closes, n/a uses the order’s SubID3 as the target login. Use an explicit numeric login for DISTINCT mode or post coverage. |
| Instrument | Yes | pattern of the symbols enabled on the coverage account on the target MT4 - #S# = XCore Symbol Name e.g. EURUSD (FX) and GER30 (nonFX) - #I# = XCore Connector Stream Instrument name e.g. EURUSDx (FX) and GER30x (nonFX) - #1##2# = XCore Connector Stream Base/Quote name e.g EURUSD(FX) and GER30EUR(nonFX) - #S#.tt = custom pattern using the symbol name with a suffix .tt and resulting in e.g. EURUSD.tt (FX) and GER30.tt (CFD) Note: Some custom patterns can lead to errors and wrong mapping if it’s applied on all securities. Note: For #1##2# it is highly advised to be used just for FX Symbols. Note: Please note that incorrect pattern that was configured by the XCore user may lead to multiple alerts mtSymbol not found which if not resolved promptly will result to block the coverage MT login. |
| Price | Yes | if the price to be covered at contains the markups or not: 0 — with XCore markups, 1 — raw LP price, 2 – the MT4 group price (the XCore price plus the MT4 group markup), used when coverage is booked after the MT4 order is done: DISTINCT mode, or POST=1 in FIFO/SIMPLE mode. In FIFO or SIMPLE mode without POST, the group markup is not applied. |
| Scaling | Yes | Quantity multiplier and side of the trade placed in the coverage account: -1 — (100%, reversed side), 1 – (100%, same side), -0.5 – (50%, reversed side), 0.3 – (30%, same side). A value of 0 behaves as 1. |
| Post | No | Sixth position. In FIFO or SIMPLE mode, 1 books after the MT4 order is done; an absent position or another value books when the XCore order closes. DISTINCT mode follows the MT4 order lifecycle. The PRICE position selects the reported price. |
| Syn | No | Seventh position, reserved. Leave it empty unless PrimeXM support asks otherwise. |
| Markup | No | Eighth position. It is an additional static markup, which is only applied to the fill price. If you enter a positive value (e.g.: 0.4), it will be a normal Markup (deducted from Sell and added to Buy), and if you enter a negative value (e.g.: -0.4), it will be a reversed Markup (added to Sell and deducted from Buy). Note: The entered value is in units of ten times the symbol price_unit (pips for five-digit FX symbols). A value that cannot be parsed counts as zero.Note: This configuration can only be done from our side. Please contact our support for further assistance. |