Keyboard Shortcuts
Likes
- Twsapi
- Messages
Search
Extended order attributes and placeOrder() method
mickjenks
Regarding the question in my previous post regarding the
updateExtended() event. To clarify, how does one specify the extended properties such as tif, oca, transmit, etc when placing the order? I don't know how to specify this info with the placeOrder() method so is there another way that this info is specified. I can successfully submit orders from a VB program to TWS, but can yet have the above mentioned extended properties attached to order. Thanks for any help. Mick |
VB and ActiveX....updateExtended() Method????
mickjenks
Anyone know if the updateExtended() method is still part of the
ActiveX/VB? If not, how does one implement the extended order properties such as tif, oca, and transmit? I am new to programming and just trying to work my way through this stuff. Any help is appreciated. |
Re: TWSAPI: General: Anyone know how to refrence a webpage and read it?
Louis
开云体育With VB I'd rather use the winsock control directly.
I found some bugs with the?INET control. I think this
happened in asynchronous mode.
?
Here is a good site on how to use the winsock control :
?
|
Re: DDE Linking Excel Dircectly to Excel across network
marinindextrader
GoldSilverMana: This may help...
From Dale on another board: I'm not sure this is exactly what you want, but have you considered Synmantec's pcAnywhere product? I use it to remotely view and control a PC across town and believe it can perform the same function on a network. Dale From DB on another board: Along the same lines, I use VNC to view several "trading" computers from my laptop. It's free and it does the job. DB --- In twsapi@y..., "goldensilvermana" <kybryan@c...> wrote: I am trying to determine if this is possible, here are somequestions I have.a spreadsheet remotely on another machine that will allow me tomonitor the excel instance connected to TWS. This will enable me to have |
Re: TWSAPI: General: Anyone know how to refrence a webpage and read it?
marinindextrader
Gernot Wrote: "I hope this comments are of some value – or is this
forum just a VB/Excel training camp. In that case I would stop posting." Your posts are totally welcome....... Scott --- In twsapi@y..., gernot.ullrich@t... wrote: David,considerNo way if they use pure Java, because the Java GUI isn't tightlyCan you look inside the java window using perl and parse it? this a bad thing, but it's done by purpose to make the GUIindependent from the OS and to give the application all the control over thedata. most cases illegal), you may add code to split off the desired data.Just for fun I tried it on the IB client long ago. It worked but I wouldnot recommend this to the public.application. Perl certainly is an good tool to read HTML streams and parse textdata because it has so nice pattern matching facilities. It's easy to dothis in Java as well.and read it?copy the content and parse it. Fortunately it is in text format. It is anand read it?the } settlement price for SPoos and Noodles using ensign chartingscripts }. } htmlon } how to do that in VB or C++relying } on a secondary feed or manual entry.quotes every .7 seconds. So I guess the filtering isn't very complex ... |
Re: time stamps
Daniel Rosen
开云体育Scott,
I downloaded and installed QCharts, but can't find the OCX.? Did it come as
part of the install?? If so, what is it called?
?
...
Dan
?
|
AW: TWSAPI: General: Anyone know how to refrence a webpage and read it?
开云体育David, ? >> Can you look inside the java window using perl and parse it? ? No way if they use pure Java, because the Java GUI isn’t tightly integrated with the MS Windowing system.? If the Java App doesn’t provide help it’s even hard to print a Java Panel.? You might consider this a bad thing, but it’s done by purpose to make the GUI independent from the OS and to give the application all the control over the data. ? If you have access to the Java Source of the App (you might try to re-generate it from the binary which is sometimes possible but in most cases illegal), you may add code to split off the desired data.? Just for fun I tried it on the IB client long ago. It worked but I would not recommend this to the public. ? I don’t think it’s a good idea to rely on some output format anyhow, because this layer usually is fastest changing part of any application.? Perl certainly is an good tool to read HTML streams and parse text data because it has so nice pattern matching facilities. It’s easy to do this in Java as well. ? I hope this comments are of some value – or is this forum just a VB/Excel training camp. ?In that case I would stop posting. ? Gernot -----鲍谤蝉辫谤ü苍驳濒颈肠丑别 Nachricht----- ? Richard, dont know Perl but Daniel is spot on for VB and VC.. Now, in Perl can you look at Java Window and parse it? To give you an example - in VB i find JAva window through API's and copy the content and parse it. Fortunately it is in text format. It is an awkward step as you need to focus mouse on that window. Can you look inside the java window using perl and parse it? I just need direction? - if yes i will learn about it. Thanks David ?
|
Re: TWSAPI: General: Anyone know how to refrence a webpage and read it?
Richard Foulk
I haven't used Perl to parse Java. But it's a good tool for parsing
toggle quoted message
Show quoted text
all kinds of text, as in the original question. Richard } Richard, } dont know Perl but Daniel is spot on for VB and VC.. } Now, in Perl can you look at Java Window and parse it? } To give you an example - in VB i find JAva window through API's and copy th } e content and parse it. Fortunately it is in text format. It is an awkward } step as you need to focus mouse on that window. } Can you look inside the java window using perl and parse it? } I just need direction - if yes i will learn about it. } Thanks } David } } ----- Original Message -----
} From: Richard Foulk=20 } To: twsapi@...=20 } Sent: Saturday, June 15, 2002 1:24 AM } Subject: Re: TWSAPI: General: Anyone know how to refrence a webpage and r } ead it? } } } } Does anyone know how to refrence a webpage and read its content } } programatically? } } } } A friend of mine was able to read the CME settlement page and get the } } settlement price for SPoos and Noodles using ensign charting scripts } } } } Here is the site: } } } } . } } html } } } } It apparently is in a delimited format and can be read. Any ideas on } } how to do that in VB or C++ } } } } Useful for including Net change in your spreadsheets, without relying } } on a secondary feed or manual entry. } } } } Scott } } } } I do that stuff in Perl all the time. } } BTW: just got some stuff back from IB ... they say they sample quotes } every .7 seconds. So I guess the filtering isn't very complex ... } } Oh and Noodles? Are you from Jay's Smurf room? :-) } } } Richard |
General: Request for sharing code
Amit Kulkarni
Hello:
I need help in coding a conditional execution in Excel. If one of my OCA orders execute, I need to determine which one and then fire off a stop loss and my main order. I read somebody saying they have code for conditional execution in Excel. Willing to share? I just know Java. Thanks __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup |
Re : General: Anyone know how to refrence a webpage and read it?
Amit Kulkarni
Scott:
Get wget & perl wget -O cmeprices.html " perl html2text cmeprices.html then use this script to remove those HTML tags... And then parse using one of Jan/Feb/Mar/Apr strings... HTH #!/usr/bin/perl ###################################################################### # HTML to text converter Version 1.01 # # Copyright 1999 Frederic TYNDIUK (FTLS) All Rights Reserved. # # E-Mail: tyndiuk@... Script License: GPL # # Created 06/30/99 Last Modified 06/30/99 # # Scripts Archive at: # ###################################################################### # Function : # # Suppress All HTML TAGs in a file. # ###################################################################### ##################### license & copyright header ##################### # # # Copyright (c) 1999 TYNDIUK Frederic # # # # This program is free software; you can redistribute it and/or # # modify it under the terms of the GNU General Public License as # # published by the Free Software Foundation; either version 2 of # # the License, or (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program in the file 'COPYING'; if not, write to # # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, # # Boston, MA 02111-1307, USA, or contact the author: # # # # TYNDIUK Frederic <tyndiuk@...> # # <> # # # ################### end license & copyright header ################### ###################################################################### $Version = "1.01"; $Copyright = "HTML to Text converter v$Version (C) 1999 Frederic TYNDIUK (alias FTLS)\n"; $Copyright .= "Report bugs to tyndiuk\@ftls.org, News and Updates: ;n"; $NameResultFile = $BgColor = ""; $UsePre = $No = 0; # En: Check Args # Fr: Verification des aguments while ($ARGV[0] =~ /^-/) { if (($ARGV[0] eq "-r") || ($ARGV[0] eq "--result")) { shift(@ARGV); if($ARGV[0]) { $NameResultFile = $ARGV[0]; $NameResultFile =~ s/\.txt//;} } if (($ARGV[0] eq "-v") || ($ARGV[0] eq "--version")) { print $Copyright; exit; } if (($ARGV[0] eq "-h") || ($ARGV[0] eq "--help")) { &Usage(); } shift(@ARGV); } if (@ARGV < 1) { &Usage; } while ($ARGV[0] ne "") { $SourceFile = $ARGV[0]; if ($NameResultFile eq "") { $ResultFile = $SourceFile; $ResultFile =~ s/\.\w*//; } else { $ResultFile = $NameResultFile; } if (($No > 0) && ($NameResultFile ne "")) { $ResultFile .= "-".$No; } $No++; $ResultFile .= ".txt"; &html2txt($SourceFile, $ResultFile); shift(@ARGV); } sub html2txt { my($SourceFile, $ResultFile) = @_; my($HTML, @HTMLPage, $SymbLine, $ascii, $html); open(FILE, "$SourceFile") || die("Cannot open HTML source file : $SourceFile, Error $!\n"); @HTMLPage = <FILE>; close(FILE); $HTML = join("", @HTMLPage); ($Head, $HTML) = split(/<\/HEAD>/i, $HTML); $HTML =~ s/ / /g; $HTML =~ s/\s\s*/ /g; $HTML =~ s/<p[^>]*>/\n\n/gi; #<p> -> \n\n $HTML =~ s/<br>|<\/*h[1-6][^>]*>|<li[^>]*>|<dt[^>]*>|<dd[^>]*>|<\/tr[^>]*>/\n/gi; # <br> or <H*> or <li> or </tr> or <dt> or <dd> -> \n $HTML =~ s/(<[^>]*>)*//g; $HTML =~ s/\n\s*\n\s*/\n\n/g; $HTML =~ s/\n */\n/g; foreach $SymbLine (&HTMLSymb) { ($ascii, $html) = split(/\s\s*/,$SymbLine); $HTML =~ s/$html/$ascii/g; } # En: Write result file # Fr: Ecrit le fichier resultat open(COM, ">$ResultFile") || die("Cannot write file $ResultFile, Error $!"); print COM $HTML; close(COM); } sub Usage { print STDERR <<EOF; $Copyright Usage: $0 [Options] HTMLFile... Options: -r File, --result File result file Name (without .txt) -v, --version output version information and exit -h, --help display this help and exit EOF exit 1; } # HTML Codes sub HTMLSymb { return ( "& &", "\" "", "< <", "> >", "? ©", "? ®", "? Æ", "? Á", "? Â", "? À", "? Å", "? Ã", "? Ä", "? Ç", "? Ð", "? É", "? Ê", "? È", "? Ë", "? Í", "? Î", "? Ì", "? Ï", "? Ñ", "? Ó", "? Ô", "? Ò", "? Ø", "? Õ", "? Ö", "? Þ", "? Ú", "? Û", "? Ù", "? Ü", "? Ý", "? á", "? â", "? æ", "? à", "? å", "? ã", "? ä", "? ç", "? é", "? ê", "? è", "? ð", "? ë", "? í", "? î", "? ì", "? ï", "? ñ", "? ó", "? ô", "? ò", "? ø", "? õ", "? ö", "? ß", "? þ", "? ú", "? û", "? ù", "? ü", "? ý", "? ÿ", "  ", "? ¡", "? ¢", "? £", "? ¥", "? ¦", "? §", "? ¨", "? ©", "? ª", "? «", "? ¬", "? ­", "? ®", "? ¯", "? °", "? ±", "? ²", "? ³", "? ´", "? µ", "? ¶", "? ·", "? ¸", "? ¹", "? º", "? »", "? ¼", "? ½", "? ¾", "? ¿", "? ×", "? Þ", "? ÷") } __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup |
Re: TWSAPI: General: Anyone know how to refrence a webpage and read it?
David
开云体育Richard,
dont know Perl but Daniel is spot on for VB and
VC..
Now, in Perl can you look at Java Window and parse
it?
To give you an example - in VB i find JAva window through
API's and copy the content and parse it. Fortunately it is in text format. It is
an awkward step as you need to focus mouse on that window.
Can you look inside the java window using perl and parse
it?
I just need direction? - if yes i will learn about
it.
Thanks
David
?
|
Re: TWSAPI: General: Anyone know how to refrence a webpage and read it?
marinindextrader
RAL room
Futures only here --- In twsapi@y..., Richard Foulk <richard@s...> wrote: } Does anyone know how to refrence a webpage and read its contentthe } settlement price for SPoos and Noodles using ensign chartingscripts }. } htmlon } how to do that in VB or C++relying } on a secondary feed or manual entry.quotes every .7 seconds. So I guess the filtering isn't very complex ... |
Re: TWSAPI: General: Anyone know how to refrence a webpage and read it?
Daniel Rosen
开云体育Its
easy to do. In VB look at the internet transfer control in the docs (ITC).?
Basically you include the ITC on your form and execute something similar
to:
?
dim s
as string
s = inet1.openurl("html")
?
In C++
you would use the wininet dll.? the ITC is an OCX wrapper around the
wininet.dll.?
?
There
are other techniques using the browser as a control and then reading the
contents (mshtml), but these are the easiest techniques in my opinion.?
Once you have the data, parsing is straightforward.
?
...
Dan
?
|
Re: TWSAPI: General: Anyone know how to refrence a webpage and read it?
Richard Foulk
} Does anyone know how to refrence a webpage and read its content
} programatically? } } A friend of mine was able to read the CME settlement page and get the } settlement price for SPoos and Noodles using ensign charting scripts } } Here is the site: } } . } html } } It apparently is in a delimited format and can be read. Any ideas on } how to do that in VB or C++ } } Useful for including Net change in your spreadsheets, without relying } on a secondary feed or manual entry. } } Scott } I do that stuff in Perl all the time. BTW: just got some stuff back from IB ... they say they sample quotes every .7 seconds. So I guess the filtering isn't very complex ... Oh and Noodles? Are you from Jay's Smurf room? :-) Richard |
General: Anyone know how to refrence a webpage and read it?
marinindextrader
Does anyone know how to refrence a webpage and read its content
programatically? A friend of mine was able to read the CME settlement page and get the settlement price for SPoos and Noodles using ensign charting scripts Here is the site: . html It apparently is in a delimited format and can be read. Any ideas on how to do that in VB or C++ Useful for including Net change in your spreadsheets, without relying on a secondary feed or manual entry. Scott |
Re: VB: tickPrice, tickSize...but what about idDetails?
marinindextrader
FollowUp:
I posted this on the IB board: Posted on Thursday, June 13, 2002 - 06:00 pm: ---------------------------------------------------------------------- ---------- Would be really great if IB TAC could expand the array on reqMktData to include most of all of the input. That way a third function could be written to extract back the input data on an id basis. Imagine a scenario whereby what symbol is selected in a certain control, changes the symbol displayed in a grid. In order to populate a cell with expiry for instance, one needs to create an array at reqMktCall that mirrors the calls arguements. In a situation where one uses various ranges of the id spectrum, it becomes cumbersome to sift through the array and extract back out the relevant information when "rolling" through symbols.... tickPrice and tickType should have another sister: tickSpecs(long id, string, symbol, string secType, string expiry, float strike, string right, string exchange, string currency) reqMktData returns a dynamic array whose dimension is defined by the number of unique instances to the call. It returns size and price in this order: bidsize, bidprice, asksize, asksize, lastprice, lastsize. reqMktData(6, # of id's called) appears to be how the array is demensioned I would like that first demension expanded to record the initial calls parameters... Then a code line like the following would populate the relevant cells automatically, substantially reducing application overhead... Tws1_tickSpec(.......) hFlexGrid(1).TextMatrix(id, 3 + tickType) = spec End Sub Thats my gripe... Other than that...Everything is perfect...LOL Scott |
VB: tickPrice, tickSize...but what about idDetails?
marinindextrader
Anyone figure if at all you can pull the ancillary details of a
ticker out reqMarket Data? In other words return the exchange, secType, expiry, strike, right, and currency for the ticker? Sure would make it easier than maintaining an internal array for each ticker id's spec's tickPrice and tickType should have another sister: tickSpecs(long id, string, symbol, string secType, string expiry, float strike, string right, string exchange, string currency) Thats my gripe... Scott |
Re: VB: What is the best structure for the following scenario
marinindextrader
I am an optomist...I agree
Got have a Pet around here....we can name him Proggie Proggie TWSAPI....sounds Italian Sit Proggie!....good boy LOL --- In twsapi@y..., Mohsen Atallah <optequity@y...> wrote: I think the idea is great. You need not take all the code. If it iscriteria rapidly creating a trading solution the infra-structure of which wasrather then reinventing the wheel.trading wrote:system using vb.net. Other are looking for a position-trading improved."That should be one of the great features of this board (i.e., InputOlder versions are retained...as a history to an evolution. acomes from traders and programmers...eventually the project is participate inviable tool, and the evolution continues. theits developement. It is freeware of the best sort. Shaped by Open.minds and experiences of many...freely diseminated. Source Code new part.shapes and directions....perhaps merges back in totality or all thoughthose who wish to contribute, and free in totality. cellunlikely in reality.... project...new updates added...broader examples depicted... |
Re: VB: What is the best structure for the following scenario
Mohsen Atallah
I think the idea is great. You need not take all the code. If it is
modular enough, each one of us can plug his / her own formula or criteria rapidly creating a trading solution the infra-structure of which was already tested by different people in varying scenarios. You can concentrate though on your own trading techniques and research, rather then reinventing the wheel. --- qnolte <q1@...> wrote: A problem with this single approach is that we may have different __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup |
DDE Linking Excel Dircectly to Excel across network
goldensilvermana
I am trying to determine if this is possible, here are some questions
I have. Here what I would like to accomplish: Have TWS running with a spreadsheet monitoring data with conditional orders. I want to run a spreadsheet remotely on another machine that will allow me to monitor the excel instance connected to TWS. This will enable me to have alarms set remotely and have the ability to send changes from one excel instance to another. #2 less desired option have DDE server to link between them Would appreciate any help on this goal. Kent |