Broker Direct Help Topic Information Background:
Trading Blox menu options:
Use Run Test to run a normal simulation. If Broker Connection set to Data Only or Data and Orders, then the data will be updated before the test is run. If the data is already updated or static from an external source, then set the Broker Connection to Offline.
Use Orders to generate orders. If Broker Connection is set to Orders Only or Data and Orders, then the open positions will be synchronized and the orders will be sent to the broker.
Use Broker Direct to start the automated process that generates orders every bar. The first run is a plain simulation run, as it could be mid bar, but starting on the second run going forward, the Order Generation process will be run every bar as the new bar is created. Data is updated (if data connection type is selected), positions are synchronized between TB and the broker, and new orders are sent to the broker.
Broker Direct Broker Connection parameter options:
Broker Connection: Offline, Data Only, Orders Only, Data and Orders
•Offline: The existing data will be used, no data from broker, no orders to broker
•Data Only: TB will first update the data from the broker, if possible.
•Orders Only: TB will use existing data only, synch positions, and send orders to broker.
•Data and Orders: TB will update data from broker, synch positions, and send orders.
When using the Data option, the Dictionary entry for each instrument needs to be set for the Broker. If the data format is ASCII, then the data will not be updated from the broker.
Broker Direct Broker parameter options:
FXCM: Use FXCM as the broker for data and orders.
IB: Use Interactive Brokers as the broker for data and orders.
TB FXCM: Use a built-in account to access free courtesy forex data from FXCM. This option can only be used with the Data Only Broker Connection. No orders can be sent to this data only account.
Broker Direct parameters for Interactive Brokers:
IB Port: Set to same port as TWS API global option
IB Client ID: Set to a unique number for each Trading Blox installation that is running concurrently against TWS. Useful for multiple installs that might be running different timeframes of different asset classes.
IB Global Cancel: Set to true for a full cancel and replace of all orders for each order generation run. This global cancel will cancel all orders placed in TWS or through any API connection.
Reporting: Set to true to create all normal simulation reports and order reports. Set to false to disable all the normal reports, charts, and graphs when running an intraday system that does not use or need that information.
Broker Direct parameters for FXCM:
FXCM Login: Enter the login information provided by FXCM.
FXCM Password: Enter the password provided by FXCM.
FXCM Account: Enter the account to use. Leave blank to use the default account for the login.
FXCM Account Type: Set to Demo or Real. Set based on account type.
Broker Direct parameter for TB FXCM:
This account type can only be used for Data Only. Gets free courtesy data, cannot place orders.
TWS example. Check Enable, set port, check Allow Localhost.
Select Create API message log if you want to track IB messages and debug issues. Log will be located in the IB installation directory.
Be sure to use a Paper Trading Account Only.
This is beta test functionality, not to be used for real trading. You are responsible for all trades sent from TB to IB, so be sure to monitor the process closely. Do not leave unattended.
Trading Blox is not responsible for your trading choices or actions.
Futures Dictionary Example:
1)Broker symbol needs to match the IB symbol
2)Exchange needs to match the IB exchange
3)Select IB as the Format
4)Select the Trading Month (YYYYMM) for the contract desired only if this is the first time getting data for this instrument. Once there is a text file with historic data available, the last record of data will be used for the futures month.
5)Set the bar size (m1, m5, m15, m30, H1, H2, H4, D1)
6)File name is used to save cached data loaded from IB. Each run will load more data and append to file. Delete file as needed if data becomes corrupted for any reason.
Forex IB Dictionary Example:
1)Set Format to IB
2)Use combo box to select market (EURUSD) and bar size (m1). The symbol, broker symbol, description, and file name will be auto populated.
3)Set the tick unit, min tick, spread, and commission as needed.
4)File name is used to save cached data loaded from IB. Each run will load more data and append to file. Delete as needed if data corruption problems.
Forex FXCM Dictionary example:
Stock Dictionary Example:
1)Set the symbol as needed, with bar size or other descriptors.
2)Set the Broker Symbol to match what IB expects.
3)Set the Exchange to SMART
4)Set the format to IB
5)Set the bar size as needed
6)Cached data file is created as symbol.txt in the stock data folder set in preferences. Delete as needed if data corruption problems.
Note that when using daily data from an external source, the stock dictionary does not need to be changed. The IB format is only used for getting data from IB, not for sending orders. The bar size defaults to daily. A normal stock dictionary with ASCII as format and D1 as bar size can be used when using existing daily data and just sending daily orders to IB.
Edit Time: 5/9/2017 10:37:46 AM
Topic ID#: 238