Apama Capital Markets Foundation Documentation : Capital Markets Foundation : Samples : General CMF samples : Trading Algorithms
Trading Algorithms
The Trading Algorithms sample demonstrates the following algorithms:
This algorithm takes in a symbol, price, side (buy/sell), show quantity, and a total quantity. It ensures that the show quantity is placed on the market, in total, at any point in time with the current symbol, price, and side. Extra logic delays the placing the new order after execution to allow for any subsequent executions that are about to occur. The delay handles the circumstance where multiple orders on the market all execute simultaneously.
More sophisticated than the Iceberg algorithm, PegOrder has a minimum and maximum show quantity (and randomizes between the two), a timeout, a side, a symbol, and a total quantity as part of its parameters. It will work the required quantity (in one or more orders) at the best price in the market on the correct side. When the best price shifts (more aggressively or less) it will cancel all of the orders and join the new best price appropriately. It uses the timeout to wait for the market to stabilize before it cancels and submits new orders.
You can observe the algorithms by stopping the simulator and entering direct trades or by having instances of the algorithms trade against each other.
To enter a direct trade
1. Select a symbol from the Symbol drop down list.
2. Optionally, change the quantity and/or price.
3. Click the appropriate BUY or SELL button.
To use one of the algorithms to trade
1. Click the Peg Order or Iceberg button and a secondary dialog displays.
2. Select a symbol from the Symbol drop down list.
3. Optionally, change the quantity, price, or parameters for the algorithm.
4. Click the appropriate BUY or SELL button.
To amend or cancel an order
1. In the Orders pane, select a trade.
2. Click Amend or Cancel.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback