TWS and Excel - IB Trader Workstation | futures io social day trading
futures io futures trading


TWS and Excel
Updated: Views / Replies:6,420 / 11
Created: by hadamkov Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

TWS and Excel

  #1 (permalink)
MATrader
Prague Czech Republic
 
Futures Experience: Beginner
Platform: S5 Trader, Jigsaw, SeasonAlgo, Sierra Chart
Broker/Data: IB/OEC
Favorite Futures: Eurex Futures
 
hadamkov's Avatar
 
Posts: 489 since Nov 2011
Thanks: 860 given, 391 received

TWS and Excel

Hello,

I am using Excel with XLQ plugin for extracting daily data from yahoo and intraday from IB.
I was wondering whether there is any magician who is able to program a way how to automatically send orders from Excel to TWS.

Thanks and successful trading.
Hana

Reply With Quote
 
  #2 (permalink)
Elite Member
Luxembourg
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB / Kinetick
Favorite Futures: ZN
 
Fadi's Avatar
 
Posts: 482 since Apr 2012
Thanks: 650 given, 625 received


hadamkov View Post
Hello,

I am using Excel with XLQ plugin for extracting daily data from yahoo and intraday from IB.
I was wondering whether there is any magician who is able to program a way how to automatically send orders from Excel to TWS.

Thanks and successful trading.
Hana

Check the recorded webinars: http://individuals.interactivebrokers.com/en/general/education/priorWebinars.php?ib_entity=llc

Successful people will do what unsuccessful people won't or can't do!
Reply With Quote
The following 3 users say Thank You to Fadi for this post:
 
  #3 (permalink)
MATrader
Prague Czech Republic
 
Futures Experience: Beginner
Platform: S5 Trader, Jigsaw, SeasonAlgo, Sierra Chart
Broker/Data: IB/OEC
Favorite Futures: Eurex Futures
 
hadamkov's Avatar
 
Posts: 489 since Nov 2011
Thanks: 860 given, 391 received

TWS and Excel





Thanks, I will check out the DDE and Excel API.
H

Reply With Quote
 
  #4 (permalink)
Elite Member
Montreal, Canada
 
Futures Experience: Intermediate
Platform: Multicharts
Broker/Data: Interactive Broker
Favorite Futures: Forex
 
Posts: 262 since Sep 2010
Thanks: 436 given, 86 received


hadamkov View Post
Hello,

I am using Excel with XLQ plugin for extracting daily data from yahoo and intraday from IB.
I was wondering whether there is any magician who is able to program a way how to automatically send orders from Excel to TWS.

Thanks and successful trading.
Hana

Did you resolve your problem? I'm sending Excel to send orders to IB via TwsLink2 (api and function). I'm not an expert at all, but I did succeed to send orders

Now, I'm looking for a way to receive a confirmation that an order as been executed.

Good luck

Martin

This code send a long stop order with a time ( after and before) validation ( order cancel after a given time by IB).
Attached to hit, a stop order is send. It will be activated if the stop entry is activated. It will be cancelled at the same time if the initial order is not triggered within the proper allowed time

 
Code
 UidParentOrder = _
            TwsLink.PLACE_ORDER(UidContract, Uidorder, Action, OrderType, QT, _
            LimitEntry_Long, StopEntryPrice_1, Duration_Entry, NotTransmit, 0)
        ' Set a commentary string
        
        If GTD <> "" Then
            setOValue = TwsLink.SET_ORDER_VAL(UidParentOrder, 9, GTD, Transmit)
            setOValue = TwsLink.SET_ORDER_VAL(UidParentOrder, 8, GAD, Transmit)
        End If
        Setup = "L"
        setOValue = TwsLink.SET_ORDER_VAL(UidParentOrder, 49, WorksheetFunction.Clean("ETy Lg: " & Iscale & Str(QT / 1000) & "K@" & Str(StopEntryPrice_1) & GTD & " til " & GAD & Space(1) & Setup & Space(1)), Transmit)
       
            
        'MsgBox (UidParentOrder & ", " & 8 & ", " & GAD & ", " & -1)
        
        Uid_StopOrder = _
            TwsLink.PLACE_ORDER(UidContract, Uidorder, ReverseAction, "STP", QT, _
            ExitLimitPrice_2, StopIbEntryPrice_1, Duration_Exit, NotTransmit, UidParentOrder)

Reply With Quote
The following user says Thank You to arjfca for this post:
 
  #5 (permalink)
MATrader
Prague Czech Republic
 
Futures Experience: Beginner
Platform: S5 Trader, Jigsaw, SeasonAlgo, Sierra Chart
Broker/Data: IB/OEC
Favorite Futures: Eurex Futures
 
hadamkov's Avatar
 
Posts: 489 since Nov 2011
Thanks: 860 given, 391 received

Thanks Martin,

I gave up . I am still entering orders manually but it is just a ten-minute procedure each day so I do not worry about it.

H

Reply With Quote
 
  #6 (permalink)
Elite Member
Montreal, Canada
 
Futures Experience: Intermediate
Platform: Multicharts
Broker/Data: Interactive Broker
Favorite Futures: Forex
 
Posts: 262 since Sep 2010
Thanks: 436 given, 86 received


hadamkov View Post
Thanks Martin,

I gave up . I am still entering orders manually but it is just a ten-minute procedure each day so I do not worry about it.

H

Is your bug is with Excel or with the API?
The best site that I know for Excel help is MrExcel.com... Forum. Can't get better for the price... free


You could try TWSLINK free for 1 month. The site as some example on how to set it. Never work with Ib API directly. A friend of has done it do.



1' First you have to Connect to IB using the proper port
 
Code
 connected = TwsLink.connect(Host, Port, 1, delayed)
2' You need to get your contract UID (here Eur.Usd)
 
Code
Sub GetEurUsdUIDConTract()
    If TwsLink Is Nothing Then
        Set TwsLink = CreateObject("twslink2.twslinkCom")
    End If
    UidContract = TwsLink.REGISTER_CONTRACT("EUR", "CASH", "USD", "IDEALPRO", "", "", "", 0#, "", 0, 0#)
   
End Sub
3' Then and only then you would be able to send an order
 
Code
Sub PlaceA_BuyLimitContract()
    If TwsLink Is Nothing Then
        Set TwsLink = CreateObject("twslink2.twslinkCom")
    End If
    Uid_Buy_Limit = TwsLink.PLACE_ORDER(UidContract, 0, "BUY", "LMT", 30000, 1.3, 0#, "GTC", 1, 0, "", "", -1)
    Uid_Buy_Limit = TwsLink.PLACE_ORDER(UidContract, Uid_Buy_Limit, "BUY", "LMT", 30000, 1.303, 0#, "GTC", 1, 0, "", "", -1)
        
End Sub

Reply With Quote
The following 2 users say Thank You to arjfca for this post:
 
  #7 (permalink)
MATrader
Prague Czech Republic
 
Futures Experience: Beginner
Platform: S5 Trader, Jigsaw, SeasonAlgo, Sierra Chart
Broker/Data: IB/OEC
Favorite Futures: Eurex Futures
 
hadamkov's Avatar
 
Posts: 489 since Nov 2011
Thanks: 860 given, 391 received


arjfca View Post
Is your bug is with Excel or with the API?
The best site that I know for Excel help is MrExcel.com... Forum. Can't get better for the price... free


You could try TWSLINK free for 1 month. The site as some example on how to set it. Never work with Ib API directly. A friend of has done it do.



1' First you have to Connect to IB using the proper port
 
Code
 connected = TwsLink.connect(Host, Port, 1, delayed)
2' You need to get your contract UID (here Eur.Usd)
 
Code
Sub GetEurUsdUIDConTract()
    If TwsLink Is Nothing Then
        Set TwsLink = CreateObject("twslink2.twslinkCom")
    End If
    UidContract = TwsLink.REGISTER_CONTRACT("EUR", "CASH", "USD", "IDEALPRO", "", "", "", 0#, "", 0, 0#)
   
End Sub
3' Then and only then you would be able to send an order
 
Code
Sub PlaceA_BuyLimitContract()
    If TwsLink Is Nothing Then
        Set TwsLink = CreateObject("twslink2.twslinkCom")
    End If
    Uid_Buy_Limit = TwsLink.PLACE_ORDER(UidContract, 0, "BUY", "LMT", 30000, 1.3, 0#, "GTC", 1, 0, "", "", -1)
    Uid_Buy_Limit = TwsLink.PLACE_ORDER(UidContract, Uid_Buy_Limit, "BUY", "LMT", 30000, 1.303, 0#, "GTC", 1, 0, "", "", -1)
        
End Sub


Thanks a lot! I think the bug is in my head (or hands ). I will try again as soon as the manual order entry frustrates me again...
Thanks for the link to the forum.
H.

Reply With Quote
 
  #8 (permalink)
Elite Member
Raleigh NC USA
 
Futures Experience: Advanced
Platform: CTS T4 and TradeStation
Favorite Futures: Oil
 
Posts: 17 since May 2011
Thanks: 0 given, 7 received


hadamkov View Post
Thanks, I will check out the DDE and Excel API.
H


Note that there is now also an ActiveX API that should be faster and more reliable than the older DDE one.

Reply With Quote
The following user says Thank You to comintel for this post:
 
  #9 (permalink)
Trading Apprentice
Toledo, OH
 
Futures Experience: Advanced
Platform: NinjaTrader, proprietary API for TWS
Favorite Futures: NQ, YM, ES, FOREX
 
Posts: 41 since Nov 2012
Thanks: 16 given, 44 received

ActiveX API much faster than DDE

Hi,
The templates that come with IB API options are a great starting point. You can achieve all in your wishlist and more with them. As an advisor, i cannot use Ninja anymore as they dont support Multiple accounts. So i had to build my own and I used the ActiveX technology to do it.
All the best!

Reply With Quote
The following user says Thank You to FalseProphets for this post:
 
  #10 (permalink)
Trading Apprentice
Los Angeles, CA
 
Futures Experience: Advanced
Platform: Interactive Brokers
Favorite Futures: ES, CL, SB, KC, Forex
 
Posts: 14 since Jan 2016
Thanks: 0 given, 5 received


Here is another interesting Excel spreadsheet, based on IB ActiveX API and serves as a template for implementing your trading rules for Interactive Brokers. Also lets you trade manually, I like their bracket orders feature.

Take a look, I've been using it recently and pretty happy with it:

Interactive Brokers Excel Trader - Trading Geeks

Reply With Quote
The following user says Thank You to schematics12 for this post:

Reply



futures io > > > > TWS and Excel

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Keep alive TWS 24x6 TraderSU IB Trader Workstation 29 October 30th, 2015 10:02 PM
TWS on a tablet Bookworm IB Trader Workstation 2 November 8th, 2012 02:47 PM
Configuring Booktrader in TWS Zwaen IB Trader Workstation 4 September 9th, 2012 09:21 PM
Other platforms more or less buggy than TWS? maxplanck Platforms and Indicators 2 November 11th, 2011 04:38 AM
TWS with Ninja and Multicharts cleon IB Trader Workstation 8 March 22nd, 2011 03:56 PM


All times are GMT -4. The time now is 11:57 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-17 in 0.13 seconds with 19 queries on phoenix via your IP 54.90.92.204