开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育
Date   
twsapi: Trader Guard - ES NQ - Does it need a specific IB Build ?
Do we need a specific IB Build ? Latest one ? usually when they update their API some functions do not work properly, could you please clarify? eduardo
Started by Eduardo J Motta @
VB New Sample Code: Auto Select Expiry For Index Products
VB: This code automatically assigns the correct expiry string based on the present date. Primarily for Index Futures products that roll quarterly. Subscribes to the second Thursday rule. Now in the files section: http://groups.yahoo.com/group/twsapi/files/ Project requires: Form1 form Moudle1 module Label1, Label2 Label3 labels Command1 Command button 'Code Starts 'FormCode Option Explicit Private Sub Command1_Click() Label1 = fxExpiry Label3 = "This Contract Rolls On: " & fxRollOverDate _ & vbCrLf _ & fxDaysRemaining & " Days Left" End Sub Private Sub Form_Load() Label2.Caption = _ "INDEX CONTRACT EXPIRY FINDER" & vbCrLf & vbCrLf & _ "This code will properley return the expiry based " & _ "on the present date." & vbCrLf & vbCrLf & _ "It confroms to the standard that contract trading" & _ " rolls over on the second thursday of the month of expiration." & _ vbCrLf & vbCrLf & "Todays Date: " & Date Label1 = fxExpiry Label3 = "This Contract Rolls On: " & fxRollOverDate _ & vbCrLf _ & fxDaysRemaining & " Days Left" End Sub 'Module Code Option Explicit Private m_qtr As Integer Private m_ContractDate As Date Function fxExpiry() As String Dim firstVBday As Integer Dim StartDate As Date m_qtr = DatePart("q", Date) Select Case m_qtr Case 1 StartDate = "3/1/" & Year(Now) firstVBday = Weekday(StartDate) m_ContractDate = fxContractDate(StartDate, firstVBday) Case 2 StartDate = "6/1/" & Year(Now) firstVBday = Weekday(StartDate) m_ContractDate = fxContractDate(StartDate, firstVBday) Case 3 StartDate = "9/1/" & Year(Now) firstVBday = Weekday(StartDate) m_ContractDate = fxContractDate(StartDate, firstVBday) Case 4 StartDate = "12/1/" & Year(Now) firstVBday = Weekday(StartDate) m_ContractDate = fxContractDate(StartDate, firstVBday) End Select fxExpiry = fxNewString() End Function Function fxRollOverDate() As String Dim tempDate As Date 'Call fxExpiry Select Case m_qtr Case 4 If Date > m_ContractDate Then tempDate = fxContractDate("3/1/" & Year(Now) + 1, _ Weekday("3/1/" & Year(Now) + 1)) fxRollOverDate = tempDate Else fxRollOverDate = m_ContractDate End If Case Else fxRollOverDate = m_ContractDate End Select End Function Function fxDaysRemaining() Dim tempDate As Date 'Call fxExpiry Select Case m_qtr Case 4 If Date > m_ContractDate Then tempDate = fxContractDate("3/1/" & Year(Now) + 1, _ Weekday("3/1/" & Year(Now) + 1)) fxDaysRemaining = tempDate - Date Else fxDaysRemaining = m_ContractDate - Date End If Case Else fxDaysRemaining = m_ContractDate - Date End Select End Function Private Function fxContractDate(ByVal dStart As Date, ByVal iDay As Integer) As Date If iDay = 5 Then fxContractDate = dStart + 7 Else Do dStart = dStart + 1 Loop Until Weekday(dStart) = 5 fxContractDate = dStart + 7 End If End Function Private Function fxNewString() As String Dim strYear As String Dim strMonth As String Dim arrMonth(1 To 4) arrMonth(1) = "03": arrMonth(2) = "06" arrMonth(3) = "09": arrMonth(4) = "12" If Date < m_ContractDate Then strMonth = arrMonth(m_qtr) strYear = Year(Date) Else If Date = m_ContractDate Then MsgBox "Contract Rolls Today!" _ & vbCrLf _ & " Liquidity At Issue" _ & vbCrLf _ & "Next Contract Selected" End If If m_qtr < 4 Then strMonth = arrMonth(m_qtr + 1) strYear = Year(Date) Else strMonth = arrMonth(1) strYear = Year(Date) + 1 End If End If fxNewString = strYear & strMonth End Function
Started by marinindextrader @
Trader Guard - ES NQ - 23MB program - get it from website. 2
Trader Guard - ES NQ - 23MB program Is Done !!! and working really GOOD. Ready to be send to people who asked for it.. BUT.. Is to big to be POST here.. or to be send via E-mails. I am going to setup today some free web site with this useful interface for TWS. And I'll POST link HERE ..download from there, please.. Protective mode work awesome.. I tested new version of TraderGuard today on NQ. It is better than older version. If you like version 1.03.01 Try ver. 2.01.04. You want regret it. New features - risk adjustable auto sell with wrong trend - no transmit needed - quick reverse with 1 click - cover short or long with auto cancel pending one - display profit of individual trade - display risk monitoring limit enjoy I'll POST link here TOMMOROW. traderguard@...
Started by traderguard @ · Most recent @
WG: twsapi: java api, maximum number of requests at a time ? 2
I think this is something the API is probably not meant for. I think that IB wants to help their clients to do lots of profitable trades, and that?s why they developed TWS and the API. If you want to get a few hundred tickers at a time, my opinion is that you should subscribe a datafeed somewhere else. eSignal and PCQuote have API?s that might be useful to you. They are specialised on providing real time data. Marcus -----Ursprungliche Nachricht----- Von: usernew [mailto:no_reply@...] Gesendet: Monday, July 01, 2002 11:37 AM An: twsapi@... Betreff: twsapi: java api, maximum number of requests at a time ? I am using the Java API. When I send more than 40 or so requests for ticker info, I get the following exception: Error: Max number of tickers has been reached. Then I tried to do the following: connect; for(i=0, i < 40; i++) send requests; capture info using event handlers; disconnect; connect; for(i=0; i < 40; i++) send requests; capture info using event handlers; disconnect; etc. But the problem is each time there is a connect() call, someone needs to manually click on the "Yes" button on the dialog that asks "Accept incoming connection attempt?" I want to be able to download info on few hundred tickers at a time, what should I do ? Thanks in advance.
Started by Marcus Jellinghaus @ · Most recent @
java api, maximum number of requests at a time ? 2
I am using the Java API. When I send more than 40 or so requests for ticker info, I get the following exception: Error: Max number of tickers has been reached. Then I tried to do the following: connect; for(i=0, i < 40; i++) send requests; capture info using event handlers; disconnect; connect; for(i=0; i < 40; i++) send requests; capture info using event handlers; disconnect; etc. But the problem is each time there is a connect() call, someone needs to manually click on the "Yes" button on the dialog that asks "Accept incoming connection attempt?" I want to be able to download info on few hundred tickers at a time, what should I do ? Thanks in advance.
Started by usernew @ · Most recent @
another java dev here, UNIX/Linux questions... 2
Hello everyone, I'm another professional Java developer more than willing to lend a hand if anyone needs it. I also have more than 5 years of Java dev experience, on all levels but mostly involving UI development, and especially swing...and data vis. :) Also have a good bit of C++ experience. I'm curious about two things as I get started on my own Java project involving IB and their API. First, I think I'm understanding that you have to have TWS running locally and that the socket client checkbox must be checked in order to use the API. Is this correct? It seems it must be true because the API does not offer any login support. Second, does anyone have experience using the Linux/UNIX client or the Linux/UNIX APIs? Love to hear about any potential problems there. Thanks! Randy
Started by rasears @ · Most recent @
twsapi: Trader Guard - ES NQ futures ready app.
I?m unable to download the prog anywhere... ? Can you send it to me via eMail (i have enough space...) Or can you give me the link to download it? ? ? Thanks ? Manuel
Started by Manuel Knospe @
Modifying an order & testing 4
Hi, First post in this forum. I hope this question han't been posted before....... The only thing that I'm really missing is a trailing stop. Anyone managed to code something like that? If so please mail me the code or point me to an example. It would save me huge amounts of time. Finally away from the screen for a few hours :-) I can code a bit in VB6. Level... erm... advanced 'Hello world' ;) But if anyone would be so kind to share a few lines of code that modifies an order I have enough to build on. Is their a way to test without placing real trades? Needless to say a little bug can cost 1000's........ Looking forward to the replies. And to the founder(s) of this group: Great initiative! Kind regards.
Started by ruffstuff123 @ · Most recent @
TWS Error Handling
Does anyone have a comprehensive list of all or most of the possible error strings that are fed through Tws1_errMsg ? It sure would be nice to have a full list and a cross refrence index to handle errors... A library of err text strings if you will that can be refrenced and then acted on if necessary...very much akin to VB's own error handling.... If TwsErr = 11 Then [do stuff] Else [do other stuff] EndIf Scott
Started by marinindextrader @
twsapi: TWS Error Handling
I've made over a hundred trades with the ActiveX and VB. So far the api hasn't thrown any errors. One trade had an invalid order ID and was never executed. There was no error thrown by the API. RCarey
Started by Robert Carey @
LINK to: TraderGuard , IB TWS scalping tool
From the author: "I am not a good trader. I need all the help I can get. There were no good software to protect me... so I made one.. and it work for me. Try it" AMJ http://members.lycos.co.uk/tguard/trading/TraderGuard 2.00.7.exe RE: Addition to your existing IB TWS platform. I designed it for scalpers to profit from every single trend change with "adaptive Automation Engine" monitoring market tick by tick and in real time. You will love it. It will automate your profit collection at the topmost point and also auto-escape from bad point of entry. This is what i like the most.
Started by traderguard @
LINK to: TraderGuard , IB TWS scalping tool
sorry: just go here then: http://members.lycos.co.uk/tguard/trading/
Started by traderguard @
TR : twsapi: Re: LINK to: TraderGuard , IB TWS scalping tool
Message Super....You can only trade GE and if you want to try it for NQ & ES you have to pay 150 USD.... ? I don't trade GE and I am not interested in it. Why didn't you do a demo for NQ or ES with a limit in time ??? ? that would have been far smarter....
Started by Matt @
RE : twsapi: Re: LINK to: TraderGuard , IB TWS scalping tool 2
Message I can't confirm that it is safe so far...The file is huge for what it does which is a bit strange for me... ? Don't like to see software from a guy that doesn't give his idea and use an alias and super hyper marketing :) ? Can someone check the TCP ports that it is using and the files he is using to see if there is not a trojan or a virus in it ? ? Thanks
Started by Matt @ · Most recent @
twsapi: Re: automated login 2
Thanks 'tripack44'. If you dont have time, I dont need documentation, nor 'sanitized' code. If you want, just copy relevant parts of your code and I'll do with it. ? Michel
Started by Michel @ · Most recent @
twsapi: LINK to: TraderGuard , IB TWS scalping tool
I have a feeling you may be playing games with people. Are you?
Started by Shukrainternationals @
twsapi: Re: LINK to: TraderGuard , IB TWS scalping tool 2
Thanks, Traderguard. ? Could someone who tries it post, please?? I'll feel better about running an executable after someone?confirms that it is safe. ? Regards, Aaron Schindler Schindler Trading
Started by Schindler Trading @ · Most recent @
Retrieving Market Depth from TWS
Hi, Does anyone know if it possible to retrieve the data from the TWS market depth window into excel. For example, is it possible to get the cumulative bid/ask quantity down to the fifth level ? Thanks
Started by groogill @
twsapi: Trader Guard - ES NQ - 23MB program - get it from website.
Do you have any instructions.? I loaded it and I'm not sure how to use it.? It appears to enter orders on the TWS but not execute them.? Is it an alert system? ? Quenton Nolte
Started by Quenton Nolte @
Trader Guard - ES NQ - NEW URL link
======== Trader Guard - ES NQ - NEW URL link ======== DOWNLOAD LINK: http://users.lvcm.com/traderguard/TGuardSetup.exe ===================================================== Website at LYCOS is closed by LYCOS admin. reason: To many downloads ! DO NOT USE: http://members.lycos.co.uk/tguard/trading sorry for that..please use right link now. AMJ
Started by traderguard @
Current Image
Image Name
Sat 8:39am