Author Topic: TWS macro to link Trade Ideas Pro with Interactive Brokers  (Read 7838 times)

86Meriam

  • Newbie
  • *
  • Posts: 6
  • Karma: +2/-0
TWS macro to link Trade Ideas Pro with Interactive Brokers
« on: February 24, 2015, 07:26:01 am »
I updated the AutoHotKeys (freeware) macro that will link Trade Ideas windows with Interactive Broker Charts to allow you to double click a symbol in any TI window to send it to an IB TWS chart.  Be sure to double-click the symbol and not another column in the window.  This is in addition to the keyboard short cut. 

If you want to use the double-clicking, you need to go to Tools Options in the TI window and under "Integration Support" change the setting to "Web" instead of "External Linking".  You can still use the keyboard short-cut without doing this.

To use the macro, you need to download AutoHotKeys.  Here is the text of the macro.  Just save this as a file with an "ahk" extension and double-click to launch from Explorer.

^a::
;this is the short-cut key (ctrl+a)

Send {Ctrl Down}c{Ctrl Up}
;copies the currently selected symbol in the TI window to the clipboard

ClipSaved := clipboard   ; Save the entire clipboard to a variable of your choice.
StringSplit, word_array, ClipSaved, %A_Tab%.  ; Omits periods.
;take out the symbol


IfWinExist [IB Account Number] Chart
;if an IB chart window open, activate it

    {
   WinActivate
    }

Send %word_array1% {Enter}
;enter the symbol
Sleep, 250
Send {Enter}
;press Enter
Sleep, 250
Send {Enter}
;press Enter again if needed


Return


;this detects a double click in a Trade Ideas window
#IfWinActive ahk_class WindowsForms10.Window.8.app.0.2bf8098_r11_ad1
LButton::

MouseClick, left

WinGetClass, class, A


ti_class := "WindowsForms10.Window.8.app.0.2bf8098_r11_ad1"

If (A_TimeSincePriorHotkey<400) and (A_TimeSincePriorHotkey<>-1)
{


 if class = %ti_class%
 {
  Send {Ctrl Down}c{Ctrl Up}
;copies the currently selected symbol in the TI window to the clipboard

ClipSaved := clipboard   ; Save the entire clipboard to a variable of your choice.
StringSplit, word_array, ClipSaved, %A_Tab%.  ; Omits periods.
;take out the symbol

IfWinExist [IB Account Number] Chart
;if an IB chart window open, activate it

    {
   WinActivate
    }

Send %word_array1% {Enter}
;enter the symbol
Sleep, 250
Send {Enter}
;press Enter
Sleep, 250
Send {Enter}
;press Enter again if needed


 }

}

Return

« Last Edit: March 01, 2015, 08:21:25 pm by 86Meriam »
Trader_Lex

86Meriam

  • Newbie
  • *
  • Posts: 6
  • Karma: +2/-0
Re: TWS macro to link Trade Ideas Pro with Interactive Brokers
« Reply #1 on: February 28, 2015, 06:51:03 pm »
I updated the TWS macro to allow you to generate an IB TWS chart from TI windows using a double-click gesture - in addition to the keyboard short cut.  You could probably modify this to work with any other broker platform.  Just change the line that reads: 

IfWinExist [IB account number] Chart to reflect the window title of your broker's chart window
Trader_Lex

TradeIdeas1

  • Administrator
  • Sr. Member
  • *****
  • Posts: 272
  • Karma: +6/-0
  • You got to know when to hold em, know when to fold
    • Trade-Ideas
Re: TWS macro to link Trade Ideas Pro with Interactive Brokers
« Reply #2 on: June 02, 2015, 05:14:45 pm »
That is very nice and appreciated by people who need that feature :-)

barkoah

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: TWS macro to link Trade Ideas Pro with Interactive Brokers
« Reply #3 on: June 15, 2015, 04:24:22 pm »
That is very nice and appreciated by people who need that feature :-)

pity it doesn't work.
I would be one who appreciate it if it would work.
The least you can do in my opinion is to develop this ahk file to your customers and solve this linking problem with interactive brokers once and for all. its very annoying for me and alot of others subscribers, hope you will jump on that catch and fix it.
thanks in advance.

86Meriam

  • Newbie
  • *
  • Posts: 6
  • Karma: +2/-0
Re: TWS macro to link Trade Ideas Pro with Interactive Brokers
« Reply #4 on: June 27, 2015, 02:20:33 pm »
I am happy to help you to get it working.  You can reach me @ alice.lexington.ma@gmail.com
Trader_Lex

markp

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: TWS macro to link Trade Ideas Pro with Interactive Brokers
« Reply #5 on: October 12, 2015, 04:41:33 pm »
Can you please walk me thru this installation? I have IB and TI... thanks in advance

goldtips

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
  • I am a Financial Adviser
    • We are Provide Live Trading Tips Like  - Gold Tips ,Silver Tips , Crude Oil Tips ,Stocks Tips Etc
Re: TWS macro to link Trade Ideas Pro with Interactive Brokers
« Reply #6 on: November 18, 2016, 01:16:33 am »

SGX Market Hot Stock of the Day :

1.ALLIANCE MINERAL
2.ROWSLEY
3.SPACKMAN
4.GLOBAL LOGISTICS

So Earn More These Stock are profitable for Intraday & Contra Day Trader.

Our [urlhttp://www.equityprofit.com/services/daily-stock-signals-sgx.php]SGX Stock Recommendations[/url] :

1.SGX INTRADAY SIGNAL: BUY NOBLE AT 0.184 TARGET 0.190, 0.196 SL 0.176 …
2.SGX POSITIONAL SIGNAL: BUY NOBLE AT 0.184 TARGET 0.200, 0.220 SL 0.165 …

Get Live Trading Signal With us -  www.equityprofit.com
Keep Touch With us - http://www.mmfsolutions.sg/