Skip to main content

Automate trade order flow

You can set up and modify the trade order flow to suit your needs. For example, you can decide at what time (and how often) you will perform validations and bulking. You can also specify portfolio groups for manual check and bulking.

Structure of trade order flow rules

The trade order processing rules are set in decisions tables.

RuleTable Open trade orders

If the parent portfolio belongs to a dynamic group called Manual order acceptance the order receives a Manual acceptance-Waiting tag.

By default, all orders in Open status go forward and change to Accepted if the order does not have a Manual acceptance-Waiting tag.

If you need to define this step in instrument / trade order level (portfolio group is not insufficient), modify this rule: Open orders must be checked manually if their portfolio belongs to the Manual order acceptance group (the order receives the Manual acceptance-Waiting tag).

RuleTable Open trade orders (Order payment rules)

If the account is missing or it is non cash account in purchase trade order (B,SUB), order will get a Payment-Waiting and Validation-Not needed tags.

If you need to define these rules differently, modify rules in rule table called RuleTable Accepted trade orders (Order payment rules).

RuleTable Open trade orders (Pre-validation rules)

By default, all buy and sell orders without Validation-Not needed tag will have Validation-Waiting tag.

If you want validation for some orders to be skipped, add a new rule to the first in rule table RuleTable Open trade orders (Pre-validation rules).

Action for this rule should be a new tag called Validation-Not needed:

$t.setTag("$1");$t.setTags($t.getTags());update($t);

RuleTable Accepted trade orders (Limit check rules)

This rule adds tag Limits-Waiting on Accepted orders with no tag in the Limits tag group.

RuleTable Accepted trade orders (Bulk rule)

By default, all accepted orders whose parent portfolio belongs to a group called "Bulk" (and are paid and validated) receive a Bulk-Waiting tag.

If you need to define this step in instrument / trade order level (portfolio group is not insufficient), modify these rules: Accepted / Paid / Validated buy orders should have Bulk-waiting tag, if parent portfolio belongs to group Bulk (B / SUB / S / RED).

RuleTable for Accepted trade orders

This rule table sets status to Accepted on orders which have Order validation tag Ok or Not needed, don't have Limits tag Fail or Waiting (i.e. their pre-trade limit check is not failed or pending) and don't have Payment tag Mismatch, Waiting or Sent (i.e. their payment is ok).

RuleTable for Executable trade orders

When accepted order is paid and validated (and not a part of bulk), the order status is changed to Executable.

If you need to define extra steps / different rule for this, modify the rule table called RuleTable for Executable trade orders.

RuleTable for Trading Connector

Customise your rule for trading connector. Scheduled trade orders send is done with the orders, that have Trading-Waiting tag. Remember to add all the needed trading info (channel, identifier).

Optional rule for skipping manual order validation

The fa_tradeOrder_orderFlow.xlsx rule table contains an optional rule for skipping manual order validation. By default it is disabled. To use it, change column C to "ORDER" instead of "DISABLED".

optional_rule.jpg

Modify the decision table rules

For more details on how to modify and deploy decision tables, refer to the Developer Guide:Create, deploy and verify a decision table