Вы находитесь на странице: 1из 8

REDIPlus Documentation Package : Version 21zz with TIB Migration issue doc

*** NOTE:***
There is documentation attached to this email that highlights some known issues for migrating API
application to the new "TIBCO" based REDIPlus version. Please review this document. Some of the
samples need migrations addressed, particularly the Order loading sequence and price type issues.
These issues have not been changed yet during the migration period to the "TIBCO" based version.

******
Please find attached documentation and samples for REDIPlus DDE and ActiveX.
Please note that our documentation is subject to change. When you begin work on your
programming and when you later move into testing and production, please verify that your
information is current by calling the group at 646 446 3400.
*************
Users on REDIPlus version 5.0 and newer now have access to the a new DDE link Add-In
building tool for Excel. The installation and usage instructions for the REDIPlus Excel Add-In are
available in the REDIPlus Customer Access Site. Logon with your REDIPlus user id and
password then go to EDUCATIONAL MATERIALS then under RESOURCES.
https://wws.executionclient.tech.gs.com/cgi/SecureSite/CSfrontpage.cgi
*************
The zip file is named RediPlusddelinkv21zz.zip and contains the following files:
CacheControl2.doc -- shows the REDIPlus ActiveX interface commands.
PortfolioTestv2.xls -- an Excel sample program that shows the interface to receive quote
information. It also submits orders utilizing a macro and demonstrates using the DisplayOrderDlg
method to shows how one can set the values that appear in the dialog window.
Getobjv3.xls -- Excel sample program that shows the usage of control buttons to submit an order,
to access the message table, and to access the position table.
GetobjOptionsv4.xls -- Excel sample program that shows the usage of control buttons to
submit an order for Options and to access the message table.
LoadDDEFormulas.xls -- Excel sample program that demonstrates how to build the REDIPlus
DDE links using a button on an Excel spreadsheet.
RediOLE-Visual Basic.zip -- a Visual Basic demo that shows many features of the REDIPlus
ActiveX interface, including order entry and sending messages. Please unzip to its own directory
and use Project1.vbp to view the demo.
Redi Plus C++ Sample.zip -- A C++ demo that is linked at compile time to the Redi TLB file and
shows many features of the REDIPlus ActiveX interface, including order entry and sending
messages.
Please unzip to its directory and use CacheDlg.dsw project workspace to view the code. Use
CacheDlg.exe
to run the sample program. ** The file extension for the CacheDlg executable was changed from
".exe" to ".XXX" and the registry file changed from ".reg" to ".rezzg" to pass various security
checks. Alter the extensions back to register the program on your PC and to run the executable.
RediDDEv3.doc -- provides additional information on setting up a DDE link into REDIPlus.

RediPlusFAQv11.pdf -- provides answers to questions on using the DDE Link, the Active/X
interface, and other related topics.
You can use the interface in REDIPlus to receive DDE price feed and position information or use
the DDE functionality in addition to the ActiveX interface, depending on the Quote Feed values
associated with your Redi User Id.
Please refer to the REDIPlus FAQ document to learn more about the settings required for Quote
Feed and position information.
The symbol ZVZZT is available for NASDAQ and OTC systems testing. It is strongly
recommended that you use ZVZZT for program testing to avoid creating actual market positions.
ZVZZT , which represents a single "actively traded" test stock symbol, is supported by REDI,
NASDAQ and OTC systems. You can view ZVZZT in the NASDAQ Level 2 windows, send
ZVZZT orders through the REDI system, and view the results of ZVZZT orders without impacting
actual market positions.
Currently, there is no symbol for testing listed stocks or options.
There is no longer a "test environment" nor test id for API development.

RediPlus ddelinkv21- RediPlus TIBdocv1.d


6Z Z .zip
oc

--------------------------------------------------------------------------------------------------------------------------------------------Submit2 / Modify & Cancel using OrderRefKey Sample - v 1-11


This sample shows the new SUBMIT2 method (quick submit) and the ways to check the status of the
quick submitted orders. It also contains samples of using the SetOrderKey Order method and the
CancelByKey CacheControl method.
The method that cancels orders with the "ClientData" value does not require access to the message
table. It does require that the "ClientData" values be unique. If a "ClientData" exists on more than one
record, no matter what the status of the various records, the cancel method will fail.
Note that these methods are available in the "newer" version of the REDIPlus application. Please check
through the object browser to confirm that the methods exist in your version of the application.

OrderLis t-Mod-Can
Sample v1-11....

--------------------------------------------------------------------------------------------------------------------------------------------Cancel Methods Information

As far as the REDIPlus APIs, the following are the only cancel methods available in the CacheControl
object. You can see what methods are available on your particular version of REDIPlus by looking into the
Redi libraries using the VBA object browser.
CANCEL:
Original cancel method. Requires the usage of the "cache row number" of the order. The cache row
number can change with and without notice through cache events throughout the orders life.
Function Cancel(vaRow, vaError)
Member of RediLib.CacheControl
CANCELBYBRANCHSEQUENCE:
Newer cancel method. Requires the Branch-Sequence id of the order. Causes an internal CacheControl
object to be initiated setting a filter to the Branch-Sequence value. Several clients have observed delays
when using this method towards the end of the day when the message table is large.
Function CancelByBranchSequence(vaBrSeq, vaError)
Member of RediLib.CacheControl
CANCELBYKEY:
Newest cancel method. Requires the User id and the Order Reference Key(OrderRefKey) of the order.
This method uses a direct reference to the order to perform the cancel. It removes the overhead issue
associated with the CancelByBranchSequence method. It also removes the changing value issue of the
row number used in the Cancel method.
Function CancelByKey(vaUser, vaKey, vaError)
Member of RediLib.CacheControl
I would suggest utilizing the CancelByKey method if it is available for implementing cancellation logic in
your application.
--------------------------------------------------------------------------------------------------------------------------------------------"Can't find project or library" error
The "can't find project or library" error is typically caused because the reference to the REDIPlus
reference file (Redi.TLB) is incorrect.
Many times the steps below will correct the error condition. Please attempt these steps to resolve the
issue.
1) When the error occurs, close the error window.
2) In the "References - VBAProject" window, "uncheck" the "Redi" reference.
3) Click "OK" to close the window.
4) Save the file in the "Microsoft Visual Basic" environment.
5) Open the "References" window, TOOLS->REFERENCES
6) Scroll down to find the "Redi 1.0 Type Library" reference.
7) "Check" the "Redi 1.0 Type Library" reference.
8) Click "OK" to close the window.
9) Save the file in the "Microsoft Visual Basic" environment.
10) Return to the Excel window and save the file.
11) Close the file within Excel.
12) Reopen the spreadsheet.
---------------------------------------------------------------------------------------------------------------------------------------------

Order List Spreadsheet Sample - with Option, Ticket, Portfolio Trader, Spread, DoneAway Lists V
6-27
This is a sample order list spreadsheet that submits a list of orders. Please review the User doc
worksheet for details here are some highlights:
* Clear order list button will clear existing data
* Enter symbols in column D starting on row 5
* Rebuild Quote links will make new DDE links into REDIPlus for the Last, Bid, and Ask prices
* On config page enter unique user information (user id, password, accts)
* After order info is loaded the Send Order button sends the order into REDIPlus with the send status
reflected in the G column. Anything other than "Submitted" is typically an error returned by Redi,
including a blank error.
* The Start Redi Trade Link button opens a link to the REDIPlus message table to return execution
information to the TradeLog worksheet.
* The Ready_For_Sale_Options sheet demonstrates the Option List functionality.--->>> Month format
version dependant, see memo on field.
* The Ready_For_Sale_Tickets sheet demonstrates the Ticket List functionality.
* The Ready_For_Sale_PT sheet demonstrates the Portfolio Trader Combined product List
functionality.---->>> Requires REDIPlus version 5.3 or newer.
* The Ready_For_Sale_PT_Integrated sheet demonstrates the Portfolio Trader Integrated List
functionality.---->>> Requires REDIPlus version 7.1.2 or newer, must set user id on configuration page.
* The Ready_For_Sale_Spread sheet demonstrates the Spread Entry functionality.---->>> Requires
REDIPlus version 6.0 or newer.
* Note the usage of the "ROOT" field when more than 1 contract exists for a particular Date/Strike. (odd
underlying contracts).
* The DoneAways_Entry sheet demonstrates the DoneAway Entry functionality.---->>> Requires
REDIPlus version 6.0 or newer.
- There are specific values for the DoneAway Entry values in REDIPlus version 6.1 and newer. See
notes in sheet.

Redi Entry WExec


Rpts - OrdLis t...

--------------------------------------------------------------------------------------------------------------------------------------------Redi++ CacheControl Registration files


A new installation of REDIPlus does not always properly register the automation properties of the API.
These files will address the "automation" error condition.
*******
I removed the ".reg" file extensions.
execute the files.
*******

Add the ".reg" back on before you

Please following the steps below to correct the missing registration of the REDIPlus CacheControl
methods:
1) Exit REDIPlus and the interfacing appl (Excel, VB project, etc)
2) Save the attached CacheControl files to your machine (location is not important)
a) Add the ".reg" extension to the file names
3) Double click the "ecahce...." file
4) Double click the "icache...." file
5) Start up the REDIPlus application
6) Start up interface application
7) Test CacheControl interface

ECacheControl-Regi
s ter

ICacheControl-Regi
s ter

--------------------------------------------------------------------------------------------------------------------------------------------Get REDIPlus Executions Sample


Attached is a spreadsheet that can be used to get the executions from the REDIPlus clients' message
table. Please feel free to modify and adapt this sample to your needs.

Get Executions and


Doneaways 4...

--------------------------------------------------------------------------------------------------------------------------------------------Excel VBA Sample of Active-X Access to POSITION data - v 9-15 w PPPNL


Attached is a Excel / VBA sample of accessing the Position data using the Active-X controls.
The custom formula will load the regular P&L value if it is not zero, other wise it will load the Pre/Post P&L
value into the custom formula column. The these value are accumulated into the "U2" cell to reflect the
total P&L value. This should help the client see the total value until the bug in REDIPlus concerning the
stocks that have the close price set to zero that prohibits the P&L calculation in the REDIPlus.

Active-X-Pos ition
Sample9-15 -...

--------------------------------------------------------------------------------------------------------------------------------------------REDIPlus C# / VB Class DLL Example


Attached is a zip file that contains the necessary components to demonstrate the usage of the REDIPlus
API calls within a C# development environment.
The C# environment does not support the passing of an Object data type by reference to the REDIPlus
APIs as is needed for many of the API calls. In order to facilitate the need to pass this type of data a
Visual Basic DLL was created to "wrapper" the Object Data reference issues.
These examples are not fully featured but were built to show the approach necessary to make the
REDIPlus API calls functional in C#. For instance the VBSubmit method is only coded to accept a few
order elements, not enough to send a good order. This would need to be expanded to be a structure of
data elements or many other elements need to be passed into the procedure. Below is information on the
key points in the two components of the sample.
VB Redi Class Project (VBRediClasses) Information:
- This class contains a reference link to the REDI.TLB file.
- VBOrderClass contains the VBSubmit procedure to send in an order. This needs to be enhanced for
more order elements but demonstrates calling the object and getting the return values.
- VBCacheClass contains several procedures related to the REDIPlus CacheControl Object.
- VBRediCache is the CacheControl object used in the sample.
- VBSubmit is the procedure that makes the CacheControl Submit call to link to the message table.
- VBRevokeObject is the procedure that makes the CacheControl Revoke call to drop the link to the
message table.
- VBSubmit is the procedure that makes the CacheControl Submit call to link to the message table.
- VBGetCell is the procedure that makes the CacheControl GetCell call to retrieve data from the
message table.
Redi CSharp Test:
- This sample has a reference link to the REDI.TLB file.
- This sample has a link to the VBRediClasses DLL created with the VB Redi Class Project.
- This sample contains a form (Form1) that has a button to "send an order" and another button to "open"
the message table.
- The code to support the various functionality is with the Form1 object.
- The "Send Order" button will send the order specified in the support code and reflect back any errors in
the text box next to the control button.
- The "Open Msg Table" button will open the message table.
- The data retrieved from the message table is loaded in the list box below the control button.
- Key elements in the CSharp sample are below and have comments beginning in column 1 in the code:
- Line 26 - Initialization of the VBRediClass CacheControl object.
- Line 141 - Map the Redi CacheControl Event to a local procedure so that the events are received by a
procedure within the C# sample.
- Line 147 - Initialization of the VBRediClass Order object.
- Line 152 - Call the Submit method to send the order.

- Line 163 - Call the Revoke method to drop previous link to the message table.
- Line 166 - Call the Submit method to link into the message table.
- Line 179 - Call the GetCell method to retrieve data for the initial event of linking to the table, loop
through all rows.
- Line 187 - Call the GetCell method to retrieve data for the row that caused the event.
Note: Due to email security systems the .exe and .dll files were removed from the project. Also the ".vb"
file extension was changed to ".FT1". You need to change the ".FT1" extensions back to ".vb" on the
unzipped files.

CSharp & VB Clas s


Example.zip

--------------------------------------------------------------------------------------------------------------------------------------------VB .Net sample for L1 Active-X Data Access


Attached is the example put together for accessing L1 data in the VB.NET environment. It is built into
another VB.NET project that had been assembled earlier that shows how to access the Message Table.
Note: Due to email security systems the .exe and .dll files were removed from the project. Also the ".vb"
file extension was changed to ".FT1". You need to change the ".FT1" extensions back to ".vb" on the
unzipped files.

dotNETRediTes t.zip

--------------------------------------------------------------------------------------------------------------------------------------------Open Order Tracker Sample - ver 1-2


Attached is a Excel / VBA sample of accessing the Message Table data using the Active-X controls to
track open orders to the market.
A configuration option allows the user to specify certain type of price types to be included in the managed
order list. If no price types are selected then all price types will be included.

Open Order Tracer


V 1-2.XLS

--------------------------------------------------------------------------------------------------------------------------------------------Msg Table Fields Sample v3-3


Attached is a spreadsheet that opens the Message Table and retrieves selected fields for each row of the
message table. Because of the number of fields being retrieved it may take time to run and you may
experience the Microsoft "Server Busy" message. You will need to continue to hit the "Retry" button
periodically until Excel is completed processing the data.
Select fields you want to receive by setting the "Get Data" to "Y" on the "Fields" sheet. To get the data
from REDIPlus use the buttons to perform the following steps: "Clear Message List Data", "Clear Field
Headers", "Load Field Headers", "Open Message Table".

MSGTableFields
v3-3.XLS

A couple of additional documents.

CacheControl2.doc
RediPlus FAQv11.pd
CSharp Example.zip
f

Вам также может понравиться