|
The TWSLink batch tester, short: BaTe, is intended to quickly create and test typical TWSLink command sequences. BaTe allows to track the whole circuit: The call of exported functions and TWSLink (API) responses. BaTe has 2 pages: Page Function calls is used to create your sequence, so a batch of TWSLink exported functions which are to be executed. Page Callback shows all outgoing commands (exported function calls, green) and what TWSLink answered with callbacks. Page Function Calls
Section 1 control panel
The panel is used to run and control your sequence. Start batch runs the batch as often as defined in field Loops A delay in milliseconds can be defined between 2 calls of the batch. If you need a specific delay, use function WAITDLL. Once you are ready with batch and you need to integrate it in your script or program, press Copy to Clipboard. This allows to paste the batch with a prefix of your choice to your script code. NOTE: The load command implies a TWSLink exported function call SET_EVENT_HANDLER. So this function is not needed to list in your sequence. By this BaTe runs in passive eventhandling mode. The callback are shown in page Callack. Section 2 parameter input
When you double click on a function in section 1, the parameters for this function are loaded into section 2. The green field can be edited by a double click in order to set the parameter value. So far, there are 4. special expression which evaluate to a constant value:
Page Callback The panel shows all exported function calls - green - and responses from TWSLink (callback) ordered by the time of their occurance.
The black columns describe the function call (1. column green) or, in the event of callback, the main category (int1) and optional subcategory (int2) of callback. A double click on row raises a dialog which gives detailed information about the function call or callback. Press Show Help to load a html help with information about the callback: what parameters are used and their meaning. Int1 describes always the category of callback, such as order event order account value, etc..Int2 in addition can describe a subcategory, in particular if Int1=2. Callback filter The upper section allows to define an Int1 and Int2 filter. If empty, no filter is active. You can type a comma separated string of integer numbers to set the filter. If Int1 or Int2 values of incoming callbacks are not listed in your filter, they don't get displayed in table.
Final BaTe should help you to get fast results with TWSLink as it makes its usage transparent. Before coding with TWSLink in your script, you can use BaTe to check out, if it works like intended. Just play around, nothing can happen. If you do not know how to implement a specific task with TWSLink or if you like to share your ideas with others, feel free to post your batch file in TWSLink yahoo group TWSLink Manual, Copyright 2011 trade-commander.org
|