You can create up to 300 rules. Each time a price tick occurs on the chart to which VOM is attached (or once every X seconds, if VOM is running in continuous mode), VOM processes every rule, from the top of the list to the bottom of the list.
Let’s call each time it runs through the list of rules a ‘cycle’. Here’s what takes place during the processing of a rule, within a cycle:
1. If the rule is stamped ‘//DELETED’ in the ‘Rule Name’ field, then it is skipped over altogether. VOM moves onto the next rule.
2. VOM then seeks to build a pool of ‘selected’ orders, by looking only at orders in the state(s) (Pending, Open, Closed, or Deleted) specified in the ‘Order States’ field. Any order currently in one of the specified states, that also meets any one of the specifications in the ‘Selected Orders’ column (these specifications may include references to: ALL orders; a currency; a pair; a magic#; a range of magic#s; case-insensitive text embedded anywhere in a comment; or order number(s)), gets moved to the SELECTED orders pool.
3. VOM then looks at the ‘Criteria’ field. Any SELECTED orders that MEET the specified Criteria are further stamped with a MEET flag.
- If the ‘Criteria’ field is blank, then this is the same as criteria of >0#, i.e. if the order has a lot size > 0; in other words, if the order exists at all.
4. The Number of SELECTED orders that meet the Criteria (i.e. MEET-stamped orders) are counted, and the count is compared to the ‘Number of Orders’ specification. If this specification is not met, then no further processing takes place for this rule. VOM moves immediately onto the next rule (return to step 1).
- If the ‘Number of Orders’ field is left blank, then this is the same as an entry of >0, i.e. at least one selected order must meet the Criteria.
- If the ‘Number of Orders’ field is set to EVERY, then every selected order must meet the Criteria.
- If the ‘Number of Orders’ field is set to SUM, then the sum of the specified quantity (pips P/L, dollars P/L, or lots) of all of the orders that meet the Criteria must also meet the specification in the ‘Number of Orders’ field.
5. The External Criteria is evaluated. If this is not met, then no further processing takes place for this rule. VOM moves immediately onto the next rule. (NOTE: External Criteria doesn’t apply until VO-Pro v3.10 is released).
6. Assuming that the aforementioned conditions are met, VOM now checks the ‘Orders to be Actioned’ field.
- If this is set to SELECTED, then VOM will attempt to perform the specified action on every order in the SELECTED orders pool.
- If this is set to MEET, then VOM will attempt to perform the action on only the SELECTED orders that were stamped with a MEET flag.
- If this is set to other listed orders, then VOM will attempt to perform the action on the orders that meet the specification. Exactly as in point 2, these specifications may include references to: ALL orders; a currency; a pair; a magic#; a range of magic#s; case-insensitive text embedded anywhere in a comment; or order number(s).
7. VOM attempts to perform the specified action on each such order separately and individually.
- Action DELETE is applied only to Pending orders.
- Actions CLOSE, MOVE SL and TRAIL SL are applied only to Open orders.
- No actions may be performed on either Closed or Deleted (i.e. cancelled or expired) orders.
8. If the action is applied successfully (i.e. the broker does not return an error when asked to apply the action) to one or more orders (while processing this particular rule during the current cycle) then VOM looks at the ‘Rules to be Deleted’ field; otherwise this field is ignored for this rule/cycle.
- If the field contains an asterisk (*), then the current rule is logically deleted: it has ‘//DELETED’ stamped in its ‘Rule Name’ field.
- If the field contains one or more text items (separated by commas), then VOM looks through the entire rule list, and any Rule Name that has any one of these items embedded somewhere in its name, is likewise logically deleted.
9. That completes the processing for the current rule. VOM then moves on to the next rule in the list (return to step 1).