Hello!
Yes, of course the order of the conditions matters.
Conditions often act as filters, so the more selections you filter out at the beginning, the easier and faster the next ones will be processed.
Example:
- Selection's Trigger Expression IF(back_amount>=min_amt, r_ticks(back_price, 1), IF(back_amount2>=min_amt, r_ticks(back_price2, 1), r_ticks(back_price3, 1))) is greater than 3.0
- and Market's Status is Idle
- and Selection's Rank is between 2 and 3
The above order is very inefficient. The parsing of trigger expression is a very resource-consuming operation. It is much more reasonable to first check if the status of the market is right. If it is not the case, then no need to check the trigger expression at all. The next one should be the selection's rank, as it is a comparatively simple operation: just to check one integer (selection's rank). So the right order should be:
- Market's Status is Idle
- and Selection's Rank is between 2 and 3
- and Selection's Trigger Expression IF(back_amount>=min_amt, r_ticks(back_price, 1), IF(back_amount2>=min_amt, r_ticks(back_price2, 1), r_ticks(back_price3, 1))) is greater than 3.0
There are also cases when the order of the conditions may change the actual qualifying selections.
Example 1:
Selection's Rank is less than 6
Selection's Back Price is greater than 7.0
and Selection's Trigger Expression matching_number is less than 3
Example 2:
Selection's Rank is less than 6
and Selection's Trigger Expression matching_number is less than 3
Selection's Back Price is greater than 7.0
What do we have here?
In Example 1, the conditions will be met if out of the first 5 favourites, there are less than 3 selections priced above 7.0.
In Example 2 though, the conditions will only be true if there are just 2 selections in the market and both are priced above 7.0 (I think such markets just do not exist), because it effectively says "our of the first 5 favourites, there must be less than 3 of them".
Hope you see what I mean.