Skip to content
  • There are no suggestions because the search field is empty.

03. Process

Dealing Desk has one workflow which can be described as one constantly running process. The plugin connects to the MT4/5 event stream and listens to traders’ requests. Once a request has appeared, MT passes it to Dealing Desk to process.

Filtering

First, the Request Type is checked. Dealing Desk processes only a certain number of types, the others, like balance operations or news, are instantly ignored and passed back to MT to execute.

If the request type can be processed, the application looks for a suitable rule, checking if the account, group, symbol, time etc. are legitimate to be processed by Dealing Desk. If not, the Default Rule is applied. Also keep in mind here that Dealing Desk works on behalf of a dealer account and, if the dealer has no rights to work with the group the request is coming from, the default rule will not be applied, and the request will be processed by MT itself.

Since filtering is the very first step that Dealing Desk takes to process a request, it starts at the exact moment a request has come to Dealing Desk’s hands. Once a request is approved by one of the rules’ filters, the decision about its execution is made and it will not change, even if the circumstances have been changed in a way, which contradicts the decision. This might happen in very rare cases, when the circumstances change drastically and in a very short time span. To put it more simply and give a sensible example:

Conditions:

  1. Position #1 open request at 00:00.000 - 0 current positions, approved, will open at ~00:00.100;
  2. Position #2 open request at 00:01.300 - 1 current positions, approved, will open at ~00:01.400;
  3. Position #3 open request at 00:01.350 - 1 current positions, approved, will open at ~00:01.450;

Since the decision about opening the third position has been made before the second position existed, Dealing Desk will open the third one, disregarding that the account already has 2 open positions. There will be no double-checks after the delay.

This behavior applies to other filters as well. Please keep this technical peculiarity in mind.

When the request has passed the filtering stage and the suitable rule has been found, Dealing Desk looks for the actions to apply to the request. If it is Ignore, it is passed to MT. If not, the processing goes to the next step.

Delaying

Each request goes through the Delay stage. However, if the specified delay is 0 or the actions and request types require no delay (Reject or Ignore), the process jumps over to the next step (delay normalization). If there is a delay, Dealing Desk receives the incoming quotes during it and takes this data to the next step.

Calculating the price, confirming the request

On the Calculation step, the final price for the request confirmation is found based on the Slippage settings and Confirmation Type. And finally, the request is confirmed.