Note: This article is outdated because Nest Plus API has been discontinued by most brokers
Automated Trading with Matlab via Nest Plus API is easily configurable because it is available from most brokers. The Nest Plus API maybe available on broker’s discretion for both individual retail traders and Authorized Persons.
Available API Funtions
Main Article: Nest Plus Auto Trading Tutorial
The following functions from Nest Plus API can be called in Matlab:
- PlaceOrder(): Place an order in exchange with custom order type, quantity, limit price, trigger price etc.
- ModifyOrder(): Modify a pending order with given reference number
- CancelOrder(): Cancel a pending order with given reference number
The following sample code can be appended in Matlab for automated order placing:
plus = actxserver(‘Nest.PlusApi’)
For individual traders, the Nest Plus API asks a confirmation prompt for placing the order with a pop-up window. For Authorized Persons of Broker (Sub-broker or Dealer) no such pop-up appears and orders are placed completely automatically.
The live execution of orders can be monitored by opening the Nest Pulse window in Nest Trader. Go to Nest Trader->Nest Plus menu->Nest Pulse Script->Pulse Running Script.
The Nest Plus API is a primitive API which dows not allows expose several important functions for smooth trading. For example, there is no function to test broker connectivity, login to broker network, or chech Net Position in a scrip. For a more professional automated trading with matlab, users are advised to go with the .NET Nest Dll from Omnesys.
If we consider the following requirements posted by one of our user’s
- Fully automatic trading or user can manually approve all orders.
- Customise order type (i.e Buy, Sell or SL) with customized order quantity in each trigger.
- Automatic auto-login if broker connection goes offline and back online.
- Error check to report if broker goes offline.
- Handles any symbols from all data feeds.
- Fast and easy manual order entry.
- Positions in all symbols is updated automatically.
- Fast access allows user to Cancel All open orders with one trigger.
- Fast access allows user to flatten all positions with one trigger.
- Constant updates of order status: Filled, Cancelled, Placed or Partial filled. Thus, to ensure a minimum slippage.
- Automatic trailing stop loss when the order will be filled.
- All position should be squared off at a specified time ( user input).
Nest Plus API can be deployed with programming for all above requirements except 4, 7 and 12.