tradeBAR 

An Interactive Brokers TWS Front-End

Beta Version

Build 1.0.1854.16782

 

 

Please Read: This software currently serves as an execution test harness for another application. The GUI was enhanced to provide a suitable front-end interface. This is a freebie reincarnation of tradeBOT that is simpler to use, more powerful, and is more screen real estate friendly. Any disabled functionality relates to the test harness and therefore has been disabled in the front-end distributable. I believe tradeBAR's functionality to be reliable and accurate as the majority of changes to convert it to a front-end were cosmetic but TEST THIS SOFTWARE THOROUGHLY UNTIL YOU ARE SATISFIED IT DOES WHAT YOU EXPECT IT TO DO (try the IB TWS demo with the username/password "edemo/demouser"). Some routines such as the 3 bar stops will be harder to test in the demo environment as they use last prices which can be slow to change. To understand how to access some hidden functionality you will need to read this Help thoroughly as I have not had time to put in tooltips for all functionality. Enhancement requests might be added but primarily if they complement the test harness side of the software. If you encounter any bugs, feel free to email me.

Overview

Download the Current Version of tradeBAR

As you can see from the features, tradeBAR provides fundamental order functionality from a screen conservative app. It is meant to work alongside TWS and therefore provides only basic visual position monitoring. Although most front-ends are probably accurate, it is still a good idea to verify your positions in TWS as a safety check. tradeBAR uses the .Net Framework. You can get the redistributable from Microsoft here.

 

New Features and Bug Fixes for Build 1.0.1854.16782

This page will be updated when time permits but all changes and fixes can be seen here. This new version can be found in the Downloads directory with the previous version now called tradeBAR_1.zip.

Bug Fixes for Build 1.0.1815.28662

The 3 bar stop has been fixed. Values were wider than they should have been in the previous version.

 

Enhancements or Changes for Build 1.0.1815.28662

A quick toggle capability has been added to dynamically switch between market stops and limit stops.  Click the following link for more details:

http://ecliptictrading.com/Software/tradeBAR/index.htm#ver28662

 

Startup

When you install tradeBAR, it will automatically place a shortcut icon on your desktop. When you run it you will see the following:

You can maintain your own list of contracts you want to trade. tradeBAR uses a configuration file for each market. If you click on the dropdown ("defaults.ecl"), you can see some choices to start with. You can change the defaults for any of the sample markets or start a new contract with this dialog. When you change any inputs or create a new contract configuration file be sure to save it. Then your inputs will always be available when you start tradeBAR. The inputs are as follows:

"defaults.ecl" dropdown - Click this to get a list of contract configuration files. To create a new contract file, enter the symbol such as "EUR" for the eurodollar contract. This needs to be the symbol used by IB to designate a contract. tradeBAR will automatically create the file ("EUR.ecl" in this case) when you save the defaults. If you want to add a currency for example, you might want to call up the EUR defaults. You can then make the necessary changes in inputs and finally put the correct symbol name in the dropdown. Click save and this new contract configuration file will be ready the next time you run tradeBAR. A number of different market configuration files are already provided with tradeBAR so check to see if one exists before going to the trouble of creating it (click the dropdown to see the list).

Exp - Contract expiration expressed for example as "200412".

Exch - Exchange where the contract is traded. "GLOBEX" for example. You can find any contract's exchange from both TWS and IB's website.

Client ID - This needs to be a unique number when connecting with TWS. tradeBAR ships with eight sample market configuration files (using unique ID's of 1 through 8). If you add a new contract you might use "9" for example as the client ID. You can use any ID you like as long as you do not try to use it twice in the same TWS session.

OCA ID - tradeBAR uses OCA orders for stops and targets. The sample contracts go up to a value of 1400. If you add a new contract you would want to start at 1600 for example. Space these 200 apart. If you then add another new contract you would use 1800. This will allow you up to 200 trades for any tradeBAR session. You can decrease or increase this interval to accommodate your trading activity but 200 is probably more than enough for the majority of traders.

StpOffset - This is the decimal amount to offset the stop when you enter a trade. tradeBAR will always enter a stop for every trade.  If for example you want your bond stop to be 6 ticks from entry, then you would use .1875 as the stop offset value. A 6 tick offset in the Euro would be .0006.

TgtOffset - This is the decimal value used to offset a target when you enter a trade. This functionality can be disabled.

IP Addr - If you have a network and want to run tradeBAR and TWS on different machines then enter the IP address of the TWS computer. If you run TWS and tradeBAR from the same machine then leave this empty.

Px Incr - This is the decimal value of a tick. For example use .03125 for bonds, .0001 for eurodollars, .1 for the Russell, or 1 or the Dow.

DefSize - Enter the default size you want each trade to start with.

Format # - This is the number of decimal places to use in formatting the price. For example use 5 for bonds, 4 for eurodollars, 2 for the Russell, and 0 for the Dow.

Use Target checkbox - Check if you want to use targets.

Use Alerts checkbox - Check if you want to use alerts.

When you select a contract to use from the dropdown, click OK to connect to TWS and begin trading.

 

Order Entry

Any limit, market, stop, or stop limit orders can be used to start a trade. You can setup a group of limit orders for example. When the first one is hit, tradeBAR will setup the stop and target (if you enable targets). As each additional limit is triggered, tradeBAR will continue to synchronize the stop/target size. You can also set up layered orders to take off contracts and tradeBAR will keep the stop/target size synchronized. Fixed interval scaling in or out of positions and bracket orders can also be done automatically based on your own criteria with the price alerts dialog (discussed below).

Limit Sell at Bid/Buy at Ask Orders - Click the Buy button to take the offer or click the Sell button to hit the bid. This is the default functionality for these two buttons unless you have clicked a radio button and are in the process of submitting a limit, market or stop order. Discussed below with "Limit/Market/Stop Orders".

Limit Sell at Ask/Buy at Bid Orders - Right click the Buy button to buy on the bid or right click the Sell button to sell at the ask. This will always be the functionality for these buttons.

Limit/Market/Stop Orders - Click the radio button (from the Use with Buy/Sell group) for the order type you want. The textbox will update with the last price. You can then use the mouse wheel to change the price. Click the Buy or Sell to submit the order. With a market order you would just click the "Mkt" radio button and the the Buy or Sell button. Note that you need to click the appropriate radio button to enter these orders or tradeBAR will assume you are doing a limit sell at bid or limit buy as ask described above. Also if you click one of these radio buttons but decide not to enter the order, you will need to click the position stop radio button ("Stp" in the "Use with Xmit" group) to reset the order status so a click on the Buy or Sell buttons will act as described above (i.e. hit bid, take offer). The Buy/Sell buttons' right click functionality will not be affected as it is not shared.

To restate, if you start an order by clicking a radio button ("Lmt", "Mkt", or "Stp" from the "Use with Buy/Sell" group) and then decide not to enter it, just click the position "Stp" radio button (in the "Use with Xmit" group) to reset order entry back to the default state. If you had entered the order, tradeBOT would have automatically reset to the default state.

Last Price - The red price to the right of the trade size box is the last price.

 

Position Stop and Target Price Adjustment

 Once a position has been started, the "N/A" textbox (see above) will always hold the current stop price by default.

Update the Position Stop - The N/A box will by default have the current stop price when in a trade. Just click the textbox and use the mouse wheel to change it to a new price. The "Stp" radio button (in the "Use with Xmit" group) should also be selected by default. Once you have your new stop price click the "Xmit" button to change the current position stop.

Update the Target - If you have target functionality enabled and have started a position, select the "Trgt" radio button. The stop price will be replaced with the current target price. Use the mouse wheel to update the target and click the "Xmit" button to change the target order price. The price will then revert back to the current stop price and the "Stp" radio button will be selected.

 

Stops and Targets

Manual Break-Even Stop Adjustment - You can change the stop to break-even plus a tick (to cover commissions) at any time by clicking the red stop sign icon.

Trailing Stops - The dialog has an extended mode (to be covered shortly) that will enable you to enter trailing stops. The example above shows a trailing stop of 5 ticks and has been activated by checking the checkbox. If you uncheck the checkbox, you will deactivate the trailing stop and the stop will be left at its current price. Remember the trailing stop will only work while the checkbox is checked.

 

3 Bar Trailing Stops - If you leave a 0 in the trailing stop offset box (as shown below) and click the checkbox, you will activate the 3 bar trailing stop.

The 3 bar stops can use one, three, five, and ten minute interval data. You can select the interval to use from the following popup options (covered below):

 

Note that if the 3 bar stops have been activated you can switch between minute intervals as you want while in a position. Normally you would want to start with a longer interval and switch to shorter intervals to tighten the stops. If you start with a shorter interval and switch to a longer one, tradeBAR will leave the shorter interval stop and let the longer one catch up. Which brings up a point that in any and all stop routines, tradeBAR will never move a stop further away. It will always use the more conservative stop level that is tighter when moving stops.

The 3 bar stop is the lowest low over the past three bars of the selected interval data and the highest high of the past three interval bars. If you are long the 3 bar low will be used to trail and the 3 bar high for short positions. Like the regular trailing stops, if you uncheck the checkbox the trailing 3 bar stop will be deactivated and the current stop will be left intact. Note that a 1 minute 3 bar stop should initialize after approximately 3 minutes (15 minutes for 5min 3 bar, etc)  but it can take longer in inactive markets where the price is not changing.

If you let the mouse hover over the textbox just to the right of the trailing stop checkbox, you can get an update on the 3 bar stop status. It will let you know if it is still initializing or if the stops are ready it will show the current stop menu selection and its respective high and low 3 bar levels. See below:

 

Local Stops - Covered below.

Changing the Stop/Target Offsets Before Entering a Position - Simply enter the offset values you want to use (you can also use the mouse wheel) in the appropriate boxes and these values will be used to generate the stop/target levels. In the example below, a stop will be placed 5 ticks from entry and a target (if enabled) will be placed 15 ticks from entry when you put a trade on.

 

 

Other Functionality

Position Status - The basic position summary is displayed at the top of tradeBAR. Using the example above, the position is short one YM at 10510. As you add more contracts, the position price will be the average purchase or sell price. 

Manually Clearing Open Orders - Click the yellow ball icon (next to the red stop sign) to manually clear all open orders. This will not affect existing position stop and target orders.

Manually Closing a Position - You can close an existing position by right clicking the red stop sign icon. All resting orders will be cancelled and the existing position will be offset. tradeBAR will be reset and ready for the next trade.

Showing tradeBAR Popup Menu List - Right click on the yellow ball icon to show extra functionality. You will see the following:

Local Stops - A local stop is exactly like a regular stop except that tradeBAR manages it rather than submitting it to IB. These are occasionally necessary in some pre-market situations when an exchange will not accept native stops. See the IB site for more information on whether this would apply to you. In the above example, you would check "Use Local Stops" to activate this type of stop BEFORE you enter a trade. Once you take a trade the stop will be sent to IB if this is not checked. The stop price will show in the price textbox. You can adjust it like a regular stop. The position will be closed by tradeBAR when the last meets or exceeds your designated stop level. Beware that because these stops are managed locally, you are at risk if you lose your internet connection or IB goes down.

Extended Dialog - Clicking "Extend Dlg for Stp and Trail Adj's" will resize the dialog to allow you to use trailing stops, trailing 3 bar stops, and to dynamically set position stop and target offsets (all covered above).

Market and Limit Stops - If you check the "Stops - Chk for Mkt, UnChk for Stp Lmt" menu option, all stops will be submitted as market stops. Uncheck it for limit stops. This option is checked by default. If you uncheck this before taking a trade, the position stop will be a stop limit. You can quickly toggle between market stops and limit stops by right clicking the "Xmit" button. When you first click it, you will see the following:

The "Stp" radio button label in the "Use with Buy/Sell" group will be red which means limit stops are selected which you can verify by going to the popup (above) where the "Stops - Chk for Mkt, UnChk for StpLmt" will be unchecked. Black means normal market stops and red means limit stops.

Show Price Alerts - If you check this option, tradeBAR will launch the following dialog:

 

This dialog provides a flexible approach to scaling into or out of positions. You can setup alerts and associated actions before you enter a trade (for bracket orders for example) or while you are in a trade. Use the mouse wheel if you want to dynamically update the trigger levels after they have been activated (in other words there is no need to reactivate the new levels). You can double click the textboxes to the right of the green and red arrows to get the last price. You can use the mouse wheel to adjust the prices. Textboxes without labels have tooltips on this dialog. Let your mouse hover over a box to see if it has a tooltip. To setup alert triggers and/or re-arms consider the example below:

Both the upside (green arrow) and downside (red arrow) alert triggers take the following inputs:

Upside trigger price level    Number of ticks to reset level    Number of contracts    Action if trigger level is hit

Downside trigger price level    Number of ticks to reset level    Number of contracts    Action if trigger level is hit

Check the "Arm" checkboxes to activate the trigger levels and check the "Re-arm" checkboxes to reset the trigger levels when they are hit.

Using the above example, the upside alert level is 1185.75. The "Arm" checkbox activates this trigger level when it is checked. When the alert level is triggered it will be reset 2 ticks higher and re-armed (since "Re-arm" checkbox is also checked). In addition when the alert level is met, one contract will be bought. The re-arm and buy one contract process will continue until the position totals 10 contracts as specified in the "Max Contracts" textbox at the bottom (10 is a default but you can put any value in this box). The same process will occur on the downside but with a 1 tick re-arm decrement and one contract will be sold at each alert level. If you do not check the re-arm check boxes the two alerts can only fire once and then will be cleared. You can set an alert and choose the "Close All" option to offset the existing position when the alert level is met. When you associate a buy or sell with an alert level tradeBAR will show the alert arrows in blue as shown above. Also note that you can choose to buy or sell contracts below and above current market levels. Multiple alert levels can only be achieved by checking the "Re-arm" and providing an increment/decrement value.

If you leave "N/A" in the dropdown but arm the alert, it will play an alert sound file if you have provided a wav file (described below).

Reset tradeBAR - This option will force tradeBAR to entirely reset back to a pre-position state.

Re-Connect TWS - If TWS goes down you can usually just wait for it to return and tradeBAR will pick up where it left off and maintain all current position information. This option gives you the ability to force a re-connect if you want to.

Show Activity Log - This will enlarge tradeBAR to display an activity/debug log.

The rest of the options are self-explanatory. As mentioned above, some functionality has been disabled because it only had relevance to the test harness app.

Enabling Audible Alerts - There are a few audible alerts that fire when a position is entered, closed, etc. Wav files are not included with the installer but you can create your own. By creating your own you can also determine which if any alerts you want to hear. Simply provide files for alerts you want. The file name always starts with the IB symbol such as ES or EUR. You can customize your alerts to include the contract name when they fire. The following is a list of alert files:

_closed.wav - Position closed.

_init.wav - Trade initiated.

stpbe.wav - Stop moved to breakeven.

pxalertabove.wav - Upside price alert (used with the price alert dialog).

pxalertbelow.wav - Downside price alert.

trailstp.wav - Trailing stop adjusted.

Just add the symbol name to the file name as listed above to create the alert ( i.e. esstpbe.wav or es_closed.wav). All wav files should be placed in following directory:

"C:\program files\ecliptictrading\tradeBAR\genWav"

 

Good Trading!