I gang

Interactive Brokers TraderWorkstation C++ API Interface

***A simple interface for the Interactive Brokers TraderWorkstation API using C++ ***

The program must compile on vista using a freely available compiler. The program will run from the command line. The program is intended to be run once per day on a daily basis, to submit externally generated trade orders to TWS.

The program will first connect to TWS using the C++ API. Then it will perform the following functions:

1) Basic Orders

It will monitor a simple text file “[url removed, login to view]” for changes. New lines will be added externally to this text file, with each line representing a new order.

These will be basic orders of the format:

StopLoss, TICKER, Exchange,OrderType, Buy/Sell, Quantity, LimitPrice, AuxPrice, timeInForce, ocaGroup, Transmit

The first field is the StopLoss, explained below. All the subsequent fields are standard fields for basic order types with the TWS API, and should be familiar to anyone programming the API.

The program will read each new order as they are appended to the bottom of the “[url removed, login to view]” file, and will then submit them to TWS. Information about the order will be printed out as orders are accepted and filled (the order parameters, and the order status e.g: submitted, part filled, filled, fill price etc).

2) Automatic Stop Losses

The program will take a Boolean command line argument as to whether to produce protective stops for each order. If this is set to TRUE, then the program must also manage a protective StopLoss order for each order. This represents an order of type STP for an equal number of shares as the parent order, with the order in the opposite direction. E.g. when the parent order is a BUY, the StopLoss order will be a STP SELL order, and vice versa.

The price of the STP order is taken from the first field of the order in the [url removed, login to view] file. If empty, a default of 5% of the parent order fill is used. If this first field contains a number (e.g. 23.56), this will be the STP price. If it contains a number followed by a % sign (e.g. 5%), the STP order will be calculated according to the average fill price of the parent order, once the parent order is completely filled. Each order thus has its own unique StopLoss.

If a new order from the text file closes (or partially closes) an existing position which was entered earlier, it will alter the stop loss appropriately. E.g. if the new order partially closes an existing position, the program will reduce the order quantity of the StopLoss. If a new order completely closes an existing position, it will completely remove the stop loss. If a position is exited manually through TWS, the program will also cancel the StopLoss order.

3) Close positions at a set time

A further command line argument will allow the user to specify a time at which all positions will be “flattened”. E.g. all positions exited using a market order. The appropriate StopLoss orders will also be cancelled.

4) Print Info to file

Verbose output concerning the state of the connection and orders should be outputted to the command line and to a dated logfile.

Furthermore, each order will output key information to a second, less verbose logfile. This will contain the following information for each order on one line each: The original order information from the [url removed, login to view] file, the average fill price, the StopLoss price, total commission, the time the order was entered, and the time the order was filled.

Færdigheder: C++ Programmering

Se mere: interactive brokers api, interactive brokers api connection, tws api stop loss, interactive brokers api close positions, interactive brokers cancel parent order, tws api submit order, interface interactive brokers, api interactive brokers, stp programming api, ticker line, standard programming, standard c types, programming using c++, programming using c#, programming types, programming monitor, programming compiler, programming api, price of user interface, perform line, original programming, monitor default, interface programming, c programming boolean, cplusplus set

Om arbejdsgiveren:
( 23 bedømmelser ) Oxford, United Kingdom

Projekt-ID: #961393

Tildelt til:

BoterM

Hello, I am interested in your project. See more details in PMB, please.

$1200 USD in 10 dage
(5 bedømmelser)
5.7

8 freelancere byder i gennemsnit $906 for dette job

Magjoom

I can do this, am ready to start

$1500 USD in 10 dage
(2 bedømmelser)
4.2
vcernobai

Dear sir! I have extensive experience writing trading applications which uses IB C++ API.

$300 USD in 30 dage
(1 bedømmelse)
3.7
softaa

I can do it

$1500 USD in 30 dage
(0 bedømmelser)
0.0
tkasyan

we can do it

$750 USD in 30 dage
(0 bedømmelser)
0.0
nrwc21

Im interested in you project!

$250 USD in 30 dage
(0 bedømmelser)
0.0
dengjf

i use to do such a thing.

$1000 USD in 30 dage
(0 bedømmelser)
0.0
garygoog

Hi,I can look forward your reply.

$750 USD in 50 dage
(0 bedømmelser)
0.0