The File Port enables ZeroLine Trader to receive order instructions from third party software or automated trading system. The File Port works with Individual account and the Financial Advisor account.
Once the File Port is opened, ZeroLine Trader will check the specific file with specific interval.
To open the File Port, Tools->File Port ... and then click the Open File Port button.
User can choose one from two solutions to pass order instructions to ZeroLine Trader: Multi Files or Single File.
Multi Files: ZeroLine Trader will check if there are any files under the specified directory at given interval. If so, it will read and process the order instruction from the file and then delete the file. The third party software should write one order instruction in one file with unique file name. This solution eliminates the possibility that the order instruction may be read and processed more than once.
Single File: ZeroLine Trader will check the file at given interval. It will read and process the order instructions in the file and then wait for more instructions. ZeroLine Trader will NOT delete the file and will NOT clear or change the content of the file. It is the user's responsibility to make sure that the file doesn't contain previous order instructions before clicking the "Open File Port."
The third party software must write the order instructions in following format:
Action,Order Quantity,Order Type,Tab Name,Data Row ID;
Note: ";" ends one order instruction.
Action: Buy or Sell
Order Quantity: An integer number.
Order Type: Market, Bid or Ask. Market specifies it is a market order. Similarly, Bid for buy/sell at bid; Ask for buy/sell at Ask.
Tab Name: The tab page name in ZeroLine Trader main window.
Data Row ID: The ID of the data row in the tab page. To see the ID of a data row, just right click on the table header and check Data Row ID.
Here is an example,
This order instruction will send a market order to buy 2 contracts of ES (as indicated by the data row with ID 1 in the ES/ZB tab page). Since the order is related to the data row, the trade parameters associated with the data row are effective. For example, if the stop is defined for the data row, the stop loss order will be generated.
It is a good idea to create a separate tab page and data rows to keep track of orders from the File Port (third party software). The trade parameters can be cleared in Strategy dialog if you don't want to use them in this case.
You can right click on the data row and select DOM to monitor and/or manage the trade in DOM window.
To close the position, the order instruction syntax is:
Action,Tab Name,Data Row ID;
This order instruction will close the position on the data row with row ID 1 in the tab page ES/ZB.
If ZeroLine Trader is connected to a FA TWS, the order, even it is from File Port (third party software), will be automatically allocated to sub-accounts based on the allocation profile defined for the data row.