This information is useful if you have two strategies that you want to link together conceptually in a data flow. By default, for example, orders sent from a strategy are sent directly to the Routing Engine for routing. It is possible to send orders to another strategy instead, which would send them on to the Routing Engine from there, if necessary. You might want to do this for risk management or order consolidation.
Step-by-step guide
Strategy Engine Command File
This is the easiest approach. Here, we'll use an existing sample strategy, the VWAP strategy to send orders, and we'll use a Strategy Engine command file to establish the data flow to a second strategy. This setup overrides the default behavior for the VWAP strategy which normally sends orders directly to the Routing Engine. Instead, we'll direct the orders to a second strategy which has the option to send them on or ignore them or whatever.
- Create the sending strategy. In this case, we'll use our VWAP sample strategy.
- Create the receiving strategy. Make sure it implementsÂ
onOther
. See the OrderReceiver sample strategy. - Establish the data flow in the Strategy Engine command file. See this sample.
- Start the Strategy Engine using the command file.