Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
- Twsapi
- Messages
Search
Re: twsapi: Modifying an order & testing
marinindextrader
There is nothing in the files section that specifically deals with
trailing stops...though I can asure you that someday not to long from now it will As TonkaDad said there is a demo server To log in: Username for equities demo: edemo Username for commodities demo: cdemo And in both of the above cases the password is: demouser As to your trailing stop question: It is my understanding that this can be handled in a few different ways: Method A: Have no server sided order and have an order on your client side that is ready to execute. You track the security price on your side, then if and when certain price events occur, you do one of two things: modify the ready order, or go ahead and send it Method B: Have a standing order on the server, and if and when price events occur one of two things happens. You do nothing and the standing order is executed on the server side (you got stopped out), Or, You resubmit the order with modifications using the identical id # (not positive about this one), and the server sided order is modified (an event occured that triggered your modified order to send). Method C: Have a standing order on the server side, and when events occur either one of two things happen. The order triggers (you were stopped out), or you cancel the order and resubmit a new order with your new parameters based on a price action event. I havn't explored the nuts and bolts of it yet...but that is how I believe it is played out. Which method one chooses is a matter of prefrence and the liquidity of the market you trade. Scott --- In twsapi@y..., "Bruce Hawkins" <hawkinsk001@h...> wrote: I to would like to know how to place trailing stops.about half way down it should say "Files" there is some code there. Also Jaba puttogether a simple project that you can download look at post 189. connect to. Service. |
Re: twsapi: Modifying an order & testing
开云体育I to would like to know how to place trailing
stops.
?
If you go to
on the left about half way down
it should say "Files" there is some code there.
Also Jaba put together a simple project that you can download look at post
189.
?
As far as testing before you go live IB has a demo
that you can connect to.
?
Good luck,
?
Tonkadad
|
Modifying an order & testing
ruffstuff123
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. |
IB TWS API Thread at WL.
techguy1313
Hi, I'm Techguy:
I started an IB Automation thread at Wealth Lab, under the Automation Category. Click here to read it. It may have some value to you, and will certainly expose my limited programming ability - but there may be some good information there for you as well. Some of you may know me from elsewhere - other forums - same guy. If you are in the Seattle or Portland area, we have a group of Trader Programmers that meet regularly: Here is the contact info: The PDX and Seatac Wealth Lab User Groups are now centralized at the Yahoo Groups area. Members can post, view the calendar, upload files, chat, and generally keep themselves informed of the PDX WLUG happenings. Membership is by moderator acceptance. Content is un-moderated. All Backtesting / Trading suite Users / Programmers / Developers are invited to attend (Tradestation, AMI, SmartQuant, Wealth Lab, C++ Users, etc. . . are invited to attend and participate in the meetings - if for nothing else comradiere) This User Group strives to meet monthly, and address topics of interest to Trader Programmers. Emphasis is on the use of Wealth Lab for Trading strategy testing and as use of a decision engine for Trading automation. For a brief synopsis of the groups and more about what we are all about go here: A link to Wealth Lab is located on the page above. For the sister SeaTac group membership request go here: For the Portland Oregon Wealth Lab User Group (PDX_WLUG) go here: |
Re: twsapi: Market Making App
fanjacks
Odd lots do not have to be represented in the NBBO. They do haveto trade if given the opportunity though.So does this mean that I can put a buy and a sell order inside the spread, and if the orders are odd lots, they are effectively invisible, at least on the level 1? I'm thinking there must be a huge disadvantage to this, like full lots are given execution priority (at that level), or it would be too advantagous. FYI, I know IB forbids you from making markets in options. II tried it out on my account it indeed, it does work for stocks. There's a specific regulation in the options market that forbids opening two opposit positions on the same option (something to that effect). I dont' think it exists for stocks, unless someone knows better. I have seen similar programs in the forex market (where the market makers are real A**holes, more so than any equity MM can ever be). I'm surprised that they aren't more prevasive in the equity market, or at least, I know they exist but they are never advertised. Does anyone know the reason? Cheers, JS |
Re: twsapi: Market Making App
Odd lots do not have to be represented in the NBBO. They do have to
trade if given the opportunity though. FYI, I know IB forbids you from making markets in options. I wouldn't be surprised to see something similiar in stocks. I know back in the old days it was not legal for complete automation, even on a fully certed OTC dealer desk. Good luck. Aaron SchindlerIB for a long while. I'm thinking about writing a fully automatedhave to admit, although I would have no problem writing the softwaretest 10- share sell/buy on a NASDAQ stock inside the bid/ask spread, itto hear from people with similar interest, and get a move on thisService. |
Re: How to get - Account Number
marinindextrader
That was an excellent question
toggle quoted message
Show quoted text
--- In twsapi@y..., bee_jay_61 <no_reply@y...> wrote:
--- In twsapi@y..., multicen2002 <no_reply@y...> wrote:I have 2 accounts.I am not sure, but isn?t the account number display in the window |
Re: How to get - Account Number
marinindextrader
Anyone know how to get account number >>?
I think you need to control this yourself and keep a cross refrence with which instance you are calling the connect from. In this case you need to either capture the port and compare it when you call it, or better yet keep an array that mirrors your API object array interms of indecies Such as a Long, 2 dimensional array that has as many lead indecie as you have API objects and as many columns as you feel fit to include...2 in this case...that would look something like this Dim arrAccount() ReDim arrAccount(UBound(TWS1), 1) arrAccount(0,0) = 7496 arrAccount(0,1) = 'some account number arrAccount(UBound(arrAccount),0) = 7497 arrAccount(UBound(arrAccount),1) = 'some other account number Then when you call any TWS you can refrence the array as well and return the account number easily based on the index API object. You could add a third element to the array and make the array variant and put a string value in the third slot such as "Stocks" or "Futures" to further expand its utility. Hope this helps as well Scott PS I will be exploring this subject in depth some time in the coming couple of weeks and will be posting example code... Unless of course you beat me to it --- In twsapi@y..., "marinindextrader" <marinindextrader@y...> wrote: This is an interesting question, and one I was intending at someyour program you can call the connection from a seperate instance of thecall direct.. |
Re: How to get - Account Number
marinindextrader
This is an interesting question, and one I was intending at some
toggle quoted message
Show quoted text
point to explore. Based on a cursory review of the methods and calls, there is no way to retrieve an account number. But on a little deeper look I believe I have a solution for you. Apparentley the TWS platform remembers the socket port you called with the account you called. In other words you must log onto to each account from a different socket port with seperate instance of TWS, and then from within your program you can call the connection from a seperate instance of the Active X componenet for each account. An array of controls would do the job... TWS1(0).Connect "", 7496 TWS1(1).Connect "", 7497 or perhaps just renaming the controls TWS1.Connect "", 7496 TWS2.Connect "", 7497 I am an array kind of guy so I would go the array route... Lastley, perhaps you dont even need the second instance and can call direct.. TWS1.Connect "", 7496 TWS1.Connect "", 7497 But this looks like your asking for trouble and corupted data...IMHO Either Way.... From there, you can then refrence your calls and segregate returns based on the source of the call TWS1(0).reqMktData(da dee da) TWS1(1).reqMktData(da dee da) Thats how I see it. Again, I havn't explored this in detail and perhaps I am wrong. Give that a shot and then report back here what you find so we can all benefit from your experience. Scott Owner TWSAPI --- In twsapi@y..., bee_jay_61 <no_reply@y...> wrote:
--- In twsapi@y..., multicen2002 <no_reply@y...> wrote:I have 2 accounts.I am not sure, but isn?t the account number display in the window |
Re: How to get - Account Number
bee_jay_61
--- In twsapi@y..., multicen2002 <no_reply@y...> wrote:
I have 2 accounts.I am not sure, but isn?t the account number display in the window caption of the "Account"-Window? If so, than I would read the Window Caption. |
Re: twsapi: Trader Guard - ES NQ futures ready app.
Shukrainternationals
开云体育Can anybody tell me what is the web site address of twsapi
group? (NOT the email address).
Thanks.
?
|
Re: twsapi: Market Making App
Schindler Trading
开云体育Hi JS,
?
I'd like to adapt your program to the futures markets I trade
through Interactive Brokers.? Unfortunately, unless you write your code in
C++, I won't be able to contribute much to the project.? But if you do get
your code working, I'd be happy to pay you something nominal for a copy of
it.
?
Regards,
Aaron Schindler
?
?
|
Re: COM error trying to connect.
houdinihound
Tried that as well (Python allows either) but no luck.
Thanks anyway. JC --- In twsapi@y..., "marinindextrader" <marinindextrader@y...> wrote: In VB this (tws.connect('', 7496)) Would be:no difference. |
stockwatchpro
Found this on silicon investor IB board. I tried stockwatchpro along
with IB today, works pretty good. I wish IB removed BEST routing restriction on its API. --------------------------------------------------------- Stock Watch Pro 2.3 with IB TWS integration just got released. Orders can be initiated from Stock Watch Pro as follows: - QuoteSheets (double-clicking on bid or ask) - Level II or Island book (double-clicking on a market maker) - Charts (from the right-click menu) - From alerts when they trigger. SWP formula language allows you to define any condition and associate an order with it. Stock Watch Pro website: For integration details see |
Re: twsapi: Trader Guard - ES NQ futures ready app.
Shukrainternationals
toggle quoted message
Show quoted text
|
Re: Trader Guard - ES NQ futures ready app.
traderguard
"Download it from twsapi file area.
I'll post it here within 3 days"!!! SUNDAY 30 2002 - please be patient. if you inpatient e-mail request to me for OLDER version beta. I'll be happy to send you a copy. New version is better.. with quick reverse, quick -cancel-reorder and more. Just 3 more days.. It is good stuff. I promise you will get to try it Thank You. --- In twsapi@y..., traderguard <no_reply@y...> wrote: Addition to your existing IB TWS platform. I designed it forscalpers to profit from every single trend change with "adaptive Automation |
Re: twsapi: Trader Guard - ES NQ futures ready app.
houdinihound
On the left, in a frame is a blue lined box with links like this:
Home Messages Post Chat Files Photos Bookmarks ------------------- (blue star) = owner (yellow star) = moderator (smiley) = online Click on the files link in this blue box. HTH, JC --- In twsapi@y..., "Shukrainternationals" <shukrainternationals@c...> wrote: I do not see any "Files" link on my screen. I received your emailin the following format. How can I go to your web site from this email to go to that 'Files" link? This happened to me once earlier. Can I be in your web site whenever I get an email from you like the following one. Thanks.days" from here by clicking on the Files link on the left sidebarwhat idays > (finishing GUI design only)Service. |
Re: COM error trying to connect.
marinindextrader
In VB this (tws.connect('', 7496)) Would be:
tws.connect "",7496 [Double Quotes not single quotes] Other than that don't know no pYthons Scott --- In twsapi@y..., "houdinihound" <houdinihound@y...> wrote: Hi,Also the app is running (build 769.1) and logged in to EDEMO account.It is also set to accept connections. |
to navigate to use esc to dismiss