Re: twsapi: Demo Server Question
Thanks Todd
toggle quoted message
Show quoted text
--- In twsapi@y..., Todd Turner <todd_a_turner@y...> wrote: I use the demo accounts with the standalone TWS all the time:
Login: cdemo for futures and edemo for stocks.
Password: demouser for both --- marinindextrader <marinindextrader@y...> wrote:
To any and all...
I have never used the demo server.
I have always used my accounts...for testing
What is up with the demo server? When I fire up my client side TWS what special user name and password are required to access the demo server?
I have a suspicion that you need to log on through the web based Java platform to access the demo server accounts...I hope I am wrong...
Thanks
Scott
__________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup
|
Re: Please help - VB code --- SEE command4_click
This call:
Private Sub Command4_Click()
Call Tws1.placeOrder(3030, "BUY", 1, "ES", "FUT", "200209", "", "", "GLOBEX", "", "LMT", 0, 0)
End Sub
Is incorrect....
Proper call for limit order:
Call Tws1.placeOrder(3030, "BUY", 1, "ES", "FUT", "200209", _ 0, "", "GLOBEX", "", "LMT", 1000.00, 0)
Strike is of type "float", and must be defined with a numeric value; Not an empty string...
And if you are sending a limit order, you must define a limit price....
I believe you can just leave the currency field blank... "GLOBEX", , "LMT", not sure about this but I think it isn't even looked at unless secType is of type CASH
Scott
|
Re: twsapi: Demo Server Question
I use the demo accounts with the standalone TWS all the time: Login: cdemo for futures and edemo for stocks. Password: demouser for both --- marinindextrader <marinindextrader@...> wrote: To any and all...
I have never used the demo server.
I have always used my accounts...for testing
What is up with the demo server? When I fire up my client side TWS what special user name and password are required to access the demo server?
I have a suspicion that you need to log on through the web based Java platform to access the demo server accounts...I hope I am wrong...
Thanks
Scott
__________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup
|
Re: Please help - VB code --- SEE command4_click
Your IF statements need to define their upper limits just under the threshold of the next limit...otherwise they will all trigger....is that what you wanted?
Example:
If size >= 10 And size < 20 Then Label7.Visible = True Else Label7.Visible = False End If If size >= 20 And size < 30 Then Label8.Visible = True Else Label8.Visible = False End If
|
DAVID it's working U R LifeSAVER.. thank you so much Andrew --- In twsapi@y..., "David" <kotomo@p...> wrote: Private Sub Command4_Click()
Tws1.placeOrder 3030, "BUY", 1, "ES", "FUT", "200209", 0, "", "GLOBEX", "", "LMT", 1025, 0 1025 is the price you wnat to buy or better - be careful with this
as it may work put there the right "YOUR" price
End Sub
----- Original Message ----- From: David To: twsapi@y... Sent: Saturday, June 22, 2002 1:07 PM Subject: Re: twsapi: Please, help
Type mismatch - your declarations of your variables is incorrect - read the rewuirements and check your DIM statements you probably define,say, quantity as long or single and should be integer this is your problem
----- Original Message ----- From: multicen2002 To: twsapi@y... Sent: Saturday, June 22, 2002 1:02 PM Subject: Re: twsapi: Please, help
Run-time Error 13
--- In twsapi@y..., "David" <kotomo@p...> wrote: > what errors do you get ? > ----- Original Message ----- > From: multicen2002 > To: twsapi@y... > Sent: Saturday, June 22, 2002 12:50 PM > Subject: Re: twsapi: Please, help > > > Thank you for trying David. > But again it is not working.. everything else works fine. > > Anybody know how to solve my 1 week long torture with this line ?? > Please, post a sample code line which really works for you and I can > go from there. > > WARM Thank you to You all. > > Andrew > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > ----------------------------------- > bad code line start here > ----------------------------------- > > Private Sub Command4_Click() > > Tws1.placeOrder 3030, "BUY", > 1, "ES", "FUT", "200209", "", "", "GLOBEX", "", "LMT", 0, 0 > > End Sub > > > > > > > --- In twsapi@y..., "David" <kotomo@p...> wrote: > > First, your ORDERID - 1 could be a PROBLEM - generate a larger > number and increase by delta of 10 or more ( still first order may > cause duplicate error - keep trying or increase first and then place > an order) > > after Expire Date - the strike price use 0 > > right use "" instead > > on the exchange not sure - use "GLOBEX" if after the other changes > will not make it work(dont trade ES) > > again for currency use "" > > This should work > > David > > ----- Original Message ----- > > From: multicen2002 > > To: twsapi@y... > > Sent: Saturday, June 22, 2002 12:15 PM > > Subject: twsapi: Please, help > > > > > > Hi, > > I am working on my VB API for IB platform. Thanx to ppl like you, > > everything starting to work just fine. > > BUT.. > > I wasted 1 week trying to send limit order from my box. > > what is wrong with this code ?? > > > > ---------------------------------------- > > code > > ---------------------------------------- > > Private Sub Command4_Click() > > > > Tws1.placeOrder 1, "BUY", 1, "ES", "FUT", "200209",_ > > LastPrice, , "SMART", , "LMT", LastPrice, 0 > > > > End Sub > > > > Please, help .. > > multicen2002@y... > > > > > > > > To unsubscribe from this group, send an email to: > > twsapi-unsubscribe@y... > > > > > > > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service. > > > Yahoo! Groups Sponsor > ADVERTISEMENT > > > > > To unsubscribe from this group, send an email to: > twsapi-unsubscribe@y... > > > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
To unsubscribe from this group, send an email to: twsapi-unsubscribe@y...
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Yahoo! Groups Sponsor ADVERTISEMENT
To unsubscribe from this group, send an email to: twsapi-unsubscribe@y...
Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
|
>?? Private Sub
Command4_Click() > >?? Tws1.placeOrder 3030,
"BUY",? ?? 1, "ES", "FUT", "200209", 0, "", "GLOBEX", "",
"LMT", 1025, 0 1025 is the price you wnat
to buy or better - be careful with this as it may work
put there the right "YOUR" price
>?? End Sub >
toggle quoted message
Show quoted text
----- Original Message -----
Sent: Saturday, June 22, 2002 1:07
PM
Subject: Re: twsapi: Please, help
Type mismatch - your declarations of your variables is
incorrect - read the rewuirements and check your DIM statements
you probably define,say,?quantity as long or single and
should be integer
this is your problem
?
?
----- Original Message -----
Sent: Saturday, June 22, 2002 1:02
PM
Subject: Re: twsapi: Please, help
Run-time Error
13
--- In twsapi@y...,
"David" <kotomo@p...> wrote: >
what errors do you get ? >?? ----- Original Message -----
>?? From: multicen2002 >?? To: twsapi@y... >?? Sent: Saturday,
June 22, 2002 12:50 PM >?? Subject: Re: twsapi: Please,
help > > >?? Thank you for trying
David. >?? But again it is not working.. everything else
works fine. > >?? Anybody know how to solve my 1 week
long torture with this line? ?? >?? Please, post a
sample code line which really works for you and? I can
>?? go from there. > >?? WARM Thank
you to You all. > >?? Andrew >??
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! >??
----------------------------------- >?? bad code line start
here >?? ----------------------------------- >
>?? Private Sub Command4_Click() >
>?? Tws1.placeOrder 3030, "BUY", >?? 1,
"ES", "FUT", "200209", "", "", "GLOBEX", "", "LMT", 0, 0 >
>?? End Sub > > > > >
> >?? --- In twsapi@y..., "David"
wrote: >?? > First, your ORDERID - 1
could be a PROBLEM - generate a larger >?? number and
increase by delta of 10 or more ( still first order may
>?? cause duplicate error - keep trying or increase first
and then place >?? an order) >?? >
after Expire Date - the strike price use 0 >?? >
right? use "" instead >?? > on the exchange not sure
- use "GLOBEX" if after the other changes >?? will not
make it work(dont trade ES) >?? > again for currency use
"" >?? > This should work >?? >
David >?? >?? ----- Original Message -----
>?? >?? From: multicen2002
>?? >?? To: twsapi@y... >??
>?? Sent: Saturday, June 22, 2002 12:15 PM >??
>?? Subject: twsapi: Please, help >?? >
>?? > >?? >?? Hi,
>?? >?? I am working on my VB API for IB
platform. Thanx to ppl like you, >?? >??
everything starting to work just fine. >?? >??
BUT.. >?? >?? I wasted 1 week trying to send
limit order from my box. >?? >?? what is wrong
with this code ?? >?? > >??
>??
---------------------------------------- >??
>?? code >?? >??
---------------------------------------- >??
>?? Private Sub Command4_Click() >?? >
>?? >?? Tws1.placeOrder 1, "BUY", 1, "ES",
"FUT", "200209",_ >?? >?? LastPrice, ,
"SMART", , "LMT", LastPrice, 0 >?? > >??
>?? End Sub >?? > >??
>?? Please, help .. >?? >??
multicen2002@y... >?? > >?? >
>?? > >?? >?? To
unsubscribe from this group, send an email to: >??
>?? twsapi-unsubscribe@y... >?? >
>?? > >?? > >??
>?? Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>?? Service. > >
>???????? Yahoo! Groups
Sponsor
>??????????????
ADVERTISEMENT >?????????????
>???????
>??????? >
>?? To unsubscribe from this group, send an email
to: >?? twsapi-unsubscribe@y... > > >
>?? Your use of Yahoo! Groups is subject to the Yahoo!
Terms of Service.
To unsubscribe from this
group, send an email
to: twsapi-unsubscribe@...
Your use
of Yahoo! Groups is subject to the .
To
unsubscribe from this group, send an email
to: twsapi-unsubscribe@...
Your use of
Yahoo! Groups is subject to the .
|
Please help - VB code --- SEE command4_click
Option Explicit ' contract description vars
Dim id As Long Dim symbol As String Dim secType As String Dim expiry As String Dim strike As Long Dim right As String Dim exchange As String Dim curency As String Dim port As Long
Private Sub Command1_Click() Tws1.reqMktData id, symbol, secType, expiry, strike, right, exchange, curency Label23.ForeColor = vbGreen Label23.Caption = "connected" End Sub
Private Sub Command2_Click() Tws1.cancelMktData id Label23.ForeColor = vbRed Label23.Caption = "disconnected"
End Sub
** BAD CODE **
Private Sub Command4_Click() Call Tws1.placeOrder(3030, "BUY", 1, "ES", "FUT", "200209", "", "", "GLOBEX", "", "LMT", 0, 0) End Sub
Private Sub Form_Load() 'Here I have set all of the values as static constants for demonstration purposes port = 7496 'this is the port number you wrote down id = 1 ' symbol = "ES" secType = "FUT" expiry = "200209" strike = 0 right = "" exchange = "GLOBEX" curency = "" Tws1.Connect "", port 'This must be the very first thing that is called
End Sub
'------------------------------------------------------ ' PRICES '------------------------------------------------------
Private Sub Tws1_tickPrice(ByVal id As Long, ByVal tickType As Long, ByVal price As Single)
'Dim oldprice 'Dim lastprice
'If tickType = LastPriceID Then 'If price > oldprice Then 'Label26.BackColor = vbRed 'End If 'oldprice = price 'End If 'End Sub
'* 'PRICE -last transaction '* Dim LastPrice
If id = 1 Then 'reference the reqMktData call by its id number If tickType = 4 Then LastPrice = price Label1.Caption = Format(LastPrice, "0.00") End If End If
'* 'PRICE - BID '*
Dim BIDPrice If id = 1 Then 'reference the reqMktData call by its id number If tickType = 1 Then BIDPrice = price Label3.Caption = Format(BIDPrice, "0.00") End If End If
'* 'PRICE - ASK '* Dim ASKPrice If id = 1 Then 'reference the reqMktData call by its id number If tickType = 2 Then ASKPrice = price Label4.Caption = Format(ASKPrice, "0.00") End If End If
End Sub
'------------------------------------------------------ ' SIZES '------------------------------------------------------
'* 'SIZE - LAST '*
Private Sub Tws1_tickSize(ByVal id As Long, ByVal tickType As Long, ByVal size As Long)
If id = 1 Then 'reference MUST BE 1 If tickType = 5 Then 'Label2.Caption = Format(size, "000000") Label2.Caption = size End If End If
'* 'SIZE - BID '*
If id = 1 Then 'reference MUST BE 1 If tickType = 0 Then Label5.Caption = size If size > 10 Then Label7.Visible = True Else Label7.Visible = False End If If size > 20 Then Label8.Visible = True Else Label8.Visible = False End If If size > 30 Then Label9.Visible = True Else Label9.Visible = False End If If size > 40 Then Label10.Visible = True Else Label10.Visible = False End If If size > 60 Then Label11.Visible = True Else Label11.Visible = False End If If size > 100 Then Label12.Visible = True Else Label12.Visible = False End If If size > 140 Then Label13.Visible = True Else Label13.Visible = False End If If size > 180 Then Label14.Visible = True Else Label14.Visible = False End If If size > 240 Then Label15.Visible = True Else Label15.Visible = False End If If size > 320 Then Label16.Visible = True Else Label16.Visible = False End If If size > 440 Then Label17.Visible = True Else Label17.Visible = False End If If size > 560 Then Label18.Visible = True Else Label18.Visible = False End If If size > 680 Then Label19.Visible = True Else Label19.Visible = False End If If size > 800 Then Label20.Visible = True Else Label20.Visible = False End If If size > 1200 Then Label21.Visible = True Else Label21.Visible = False End If If size > 2000 Then Label22.Visible = True Else Label22.Visible = False End If End If End If
'* 'SIZE - ASK '*
If id = 1 Then 'reference MUST BE 1 If tickType = 3 Then Label6.Caption = size End If End If End Sub
|
Type mismatch - your declarations of your variables is
incorrect - read the rewuirements and check your DIM statements
you probably define,say,?quantity as long or single and
should be integer
this is your problem
?
?
toggle quoted message
Show quoted text
----- Original Message -----
Sent: Saturday, June 22, 2002 1:02
PM
Subject: Re: twsapi: Please, help
Run-time Error 13
--- In twsapi@y..., "David" <kotomo@p...> wrote: > what errors do you
get ? >?? ----- Original Message ----- >??
From: multicen2002 >?? To: twsapi@y... >?? Sent: Saturday,
June 22, 2002 12:50 PM >?? Subject: Re: twsapi: Please,
help > > >?? Thank you for trying
David. >?? But again it is not working.. everything else works
fine. > >?? Anybody know how to solve my 1 week long
torture with this line? ?? >?? Please, post a sample
code line which really works for you and? I can >??
go from there. > >?? WARM Thank you to You all. >
>?? Andrew >??
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! >??
----------------------------------- >?? bad code line start
here >?? ----------------------------------- >
>?? Private Sub Command4_Click() > >??
Tws1.placeOrder 3030, "BUY", >?? 1, "ES", "FUT", "200209",
"", "", "GLOBEX", "", "LMT", 0, 0 > >?? End Sub >
> > > > > >?? --- In
twsapi@y..., "David" wrote: >?? >
First, your ORDERID - 1 could be a PROBLEM - generate a larger
>?? number and increase by delta of 10 or more ( still first
order may >?? cause duplicate error - keep trying or
increase first and then place >?? an
order) >?? > after Expire Date - the strike price use 0
>?? > right? use "" instead >?? >
on the exchange not sure - use "GLOBEX" if after the other changes
>?? will not make it work(dont trade ES) >??
> again for currency use "" >?? > This should
work >?? > David >?? >?? -----
Original Message ----- >?? >?? From:
multicen2002 >?? >?? To: twsapi@y...
>?? >?? Sent: Saturday, June 22, 2002 12:15
PM >?? >?? Subject: twsapi: Please,
help >?? > >?? > >??
>?? Hi, >?? >?? I am working on my
VB API for IB platform. Thanx to ppl like you, >??
>?? everything starting to work just fine. >??
>?? BUT.. >?? >?? I wasted 1 week
trying to send limit order from my box. >?? >??
what is wrong with this code ?? >?? > >??
>?? ---------------------------------------- >??
>?? code >?? >??
---------------------------------------- >?? >??
Private Sub Command4_Click() >?? > >??
>?? Tws1.placeOrder 1, "BUY", 1, "ES", "FUT", "200209",_
>?? >?? LastPrice, , "SMART", , "LMT",
LastPrice, 0 >?? > >?? >??
End Sub >?? > >?? >?? Please,
help .. >?? >??
multicen2002@y... >?? > >?? >
>?? > >?? >?? To unsubscribe
from this group, send an email to: >?? >??
twsapi-unsubscribe@y... >?? > >?? >
>?? > >?? >?? Your use of
Yahoo! Groups is subject to the Yahoo! Terms of >??
Service. > >
>???????? Yahoo! Groups Sponsor
>??????????????
ADVERTISEMENT >?????????????
>???????
>??????? >
>?? To unsubscribe from this group, send an email
to: >?? twsapi-unsubscribe@y... > > >
>?? Your use of Yahoo! Groups is subject to the Yahoo! Terms
of Service.
To
unsubscribe from this group, send an email
to: twsapi-unsubscribe@...
Your use of
Yahoo! Groups is subject to the .
|
Please, will you overrite my code line to work ?? it is not working - market , limit..NONE thanx David Andrew --- In twsapi@y..., "David" <kotomo@p...> wrote: You have to specify the limit price for the LMT orders - put ther the CurrentAsk to get you in the market now. ----- Original Message ----- From: multicen2002 To: twsapi@y... Sent: Saturday, June 22, 2002 12:50 PM Subject: Re: twsapi: Please, help
Thank you for trying David. But again it is not working.. everything else works fine.
Anybody know how to solve my 1 week long torture with this line ?? Please, post a sample code line which really works for you and I can go from there.
WARM Thank you to You all.
Andrew !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ----------------------------------- bad code line start here -----------------------------------
Private Sub Command4_Click()
Tws1.placeOrder 3030, "BUY", 1, "ES", "FUT", "200209", "", "", "GLOBEX", "", "LMT", 0, 0
End Sub
--- In twsapi@y..., "David" <kotomo@p...> wrote: > First, your ORDERID - 1 could be a PROBLEM - generate a larger number and increase by delta of 10 or more ( still first order may cause duplicate error - keep trying or increase first and then place an order) > after Expire Date - the strike price use 0 > right use "" instead > on the exchange not sure - use "GLOBEX" if after the other changes will not make it work(dont trade ES) > again for currency use "" > This should work > David > ----- Original Message ----- > From: multicen2002 > To: twsapi@y... > Sent: Saturday, June 22, 2002 12:15 PM > Subject: twsapi: Please, help > > > Hi, > I am working on my VB API for IB platform. Thanx to ppl like you, > everything starting to work just fine. > BUT.. > I wasted 1 week trying to send limit order from my box. > what is wrong with this code ?? > > ---------------------------------------- > code > ---------------------------------------- > Private Sub Command4_Click() > > Tws1.placeOrder 1, "BUY", 1, "ES", "FUT", "200209",_ > LastPrice, , "SMART", , "LMT", LastPrice, 0 > > End Sub > > Please, help .. > multicen2002@y... > > > > To unsubscribe from this group, send an email to: > twsapi-unsubscribe@y... > > > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Yahoo! Groups Sponsor ADVERTISEMENT
To unsubscribe from this group, send an email to: twsapi-unsubscribe@y...
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|
You have to specify the limit price for the LMT orders - put
ther the CurrentAsk to get you in the market now.
toggle quoted message
Show quoted text
----- Original Message -----
Sent: Saturday, June 22, 2002 12:50
PM
Subject: Re: twsapi: Please, help
Thank you for trying David. But again it is not
working.. everything else works fine.
Anybody know how to solve my 1
week long torture with this line? ?? Please, post a sample code line
which really works for you and? I can go from there.
WARM
Thank you to You
all.
Andrew !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ----------------------------------- bad
code line start here -----------------------------------
Private Sub
Command4_Click()
Tws1.placeOrder 3030, "BUY", 1, "ES", "FUT",
"200209", "", "", "GLOBEX", "", "LMT", 0, 0
End
Sub
--- In twsapi@y..., "David"
wrote: > First, your ORDERID - 1 could be a PROBLEM - generate a larger
number and increase by delta of 10 or more ( still first order may
cause duplicate error - keep trying or increase first and then place
an order) > after Expire Date - the strike price use 0 >
right? use "" instead > on the exchange not sure - use "GLOBEX" if
after the other changes will not make it work(dont trade ES) > again
for currency use "" > This should work > David >??
----- Original Message ----- >?? From: multicen2002
>?? To: twsapi@y... >?? Sent: Saturday, June
22, 2002 12:15 PM >?? Subject: twsapi: Please, help >
> >?? Hi, >?? I am working on my VB
API for IB platform. Thanx to ppl like you, >?? everything
starting to work just fine. >?? BUT.. >?? I
wasted 1 week trying to send limit order from my box. >?? what
is wrong with this code ?? > >??
---------------------------------------- >?? code
>??
---------------------------------------- >?? Private Sub
Command4_Click() > >?? Tws1.placeOrder 1, "BUY", 1,
"ES", "FUT", "200209",_ >?? LastPrice, , "SMART", , "LMT",
LastPrice, 0 > >?? End Sub > >??
Please, help .. >?? multicen2002@y... > >
> >?? To unsubscribe from this group, send an email
to: >?? twsapi-unsubscribe@y... > > >
>?? Your use of Yahoo! Groups is subject to the Yahoo! Terms
of Service.
To
unsubscribe from this group, send an email
to: twsapi-unsubscribe@...
Your use of
Yahoo! Groups is subject to the .
|
Run-time Error 13 --- In twsapi@y..., "David" <kotomo@p...> wrote: what errors do you get ? ----- Original Message ----- From: multicen2002 To: twsapi@y... Sent: Saturday, June 22, 2002 12:50 PM Subject: Re: twsapi: Please, help
Thank you for trying David. But again it is not working.. everything else works fine.
Anybody know how to solve my 1 week long torture with this line ?? Please, post a sample code line which really works for you and I can go from there.
WARM Thank you to You all.
Andrew !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ----------------------------------- bad code line start here -----------------------------------
Private Sub Command4_Click()
Tws1.placeOrder 3030, "BUY", 1, "ES", "FUT", "200209", "", "", "GLOBEX", "", "LMT", 0, 0
End Sub
--- In twsapi@y..., "David" <kotomo@p...> wrote: > First, your ORDERID - 1 could be a PROBLEM - generate a larger number and increase by delta of 10 or more ( still first order may cause duplicate error - keep trying or increase first and then place an order) > after Expire Date - the strike price use 0 > right use "" instead > on the exchange not sure - use "GLOBEX" if after the other changes will not make it work(dont trade ES) > again for currency use "" > This should work > David > ----- Original Message ----- > From: multicen2002 > To: twsapi@y... > Sent: Saturday, June 22, 2002 12:15 PM > Subject: twsapi: Please, help > > > Hi, > I am working on my VB API for IB platform. Thanx to ppl like you, > everything starting to work just fine. > BUT.. > I wasted 1 week trying to send limit order from my box. > what is wrong with this code ?? > > ---------------------------------------- > code > ---------------------------------------- > Private Sub Command4_Click() > > Tws1.placeOrder 1, "BUY", 1, "ES", "FUT", "200209",_ > LastPrice, , "SMART", , "LMT", LastPrice, 0 > > End Sub > > Please, help .. > multicen2002@y... > > > > To unsubscribe from this group, send an email to: > twsapi-unsubscribe@y... > > > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Yahoo! Groups Sponsor ADVERTISEMENT
To unsubscribe from this group, send an email to: twsapi-unsubscribe@y...
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|
Run-time Error 13 --- In twsapi@y..., "David" <kotomo@p...> wrote: what errors do you get ? ----- Original Message ----- From: multicen2002 To: twsapi@y... Sent: Saturday, June 22, 2002 12:50 PM Subject: Re: twsapi: Please, help
Thank you for trying David. But again it is not working.. everything else works fine.
Anybody know how to solve my 1 week long torture with this line ?? Please, post a sample code line which really works for you and I can go from there.
WARM Thank you to You all.
Andrew !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ----------------------------------- bad code line start here -----------------------------------
Private Sub Command4_Click()
Tws1.placeOrder 3030, "BUY", 1, "ES", "FUT", "200209", "", "", "GLOBEX", "", "LMT", 0, 0
End Sub
--- In twsapi@y..., "David" <kotomo@p...> wrote: > First, your ORDERID - 1 could be a PROBLEM - generate a larger number and increase by delta of 10 or more ( still first order may cause duplicate error - keep trying or increase first and then place an order) > after Expire Date - the strike price use 0 > right use "" instead > on the exchange not sure - use "GLOBEX" if after the other changes will not make it work(dont trade ES) > again for currency use "" > This should work > David > ----- Original Message ----- > From: multicen2002 > To: twsapi@y... > Sent: Saturday, June 22, 2002 12:15 PM > Subject: twsapi: Please, help > > > Hi, > I am working on my VB API for IB platform. Thanx to ppl like you, > everything starting to work just fine. > BUT.. > I wasted 1 week trying to send limit order from my box. > what is wrong with this code ?? > > ---------------------------------------- > code > ---------------------------------------- > Private Sub Command4_Click() > > Tws1.placeOrder 1, "BUY", 1, "ES", "FUT", "200209",_ > LastPrice, , "SMART", , "LMT", LastPrice, 0 > > End Sub > > Please, help .. > multicen2002@y... > > > > To unsubscribe from this group, send an email to: > twsapi-unsubscribe@y... > > > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Yahoo! Groups Sponsor ADVERTISEMENT
To unsubscribe from this group, send an email to: twsapi-unsubscribe@y...
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|
toggle quoted message
Show quoted text
----- Original Message -----
Sent: Saturday, June 22, 2002 12:50
PM
Subject: Re: twsapi: Please, help
Thank you for trying David. But again it is not
working.. everything else works fine.
Anybody know how to solve my 1
week long torture with this line? ?? Please, post a sample code line
which really works for you and? I can go from there.
WARM
Thank you to You
all.
Andrew !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ----------------------------------- bad
code line start here -----------------------------------
Private Sub
Command4_Click()
Tws1.placeOrder 3030, "BUY", 1, "ES", "FUT",
"200209", "", "", "GLOBEX", "", "LMT", 0, 0
End
Sub
--- In twsapi@y..., "David"
wrote: > First, your ORDERID - 1 could be a PROBLEM - generate a larger
number and increase by delta of 10 or more ( still first order may
cause duplicate error - keep trying or increase first and then place
an order) > after Expire Date - the strike price use 0 >
right? use "" instead > on the exchange not sure - use "GLOBEX" if
after the other changes will not make it work(dont trade ES) > again
for currency use "" > This should work > David >??
----- Original Message ----- >?? From: multicen2002
>?? To: twsapi@y... >?? Sent: Saturday, June
22, 2002 12:15 PM >?? Subject: twsapi: Please, help >
> >?? Hi, >?? I am working on my VB
API for IB platform. Thanx to ppl like you, >?? everything
starting to work just fine. >?? BUT.. >?? I
wasted 1 week trying to send limit order from my box. >?? what
is wrong with this code ?? > >??
---------------------------------------- >?? code
>??
---------------------------------------- >?? Private Sub
Command4_Click() > >?? Tws1.placeOrder 1, "BUY", 1,
"ES", "FUT", "200209",_ >?? LastPrice, , "SMART", , "LMT",
LastPrice, 0 > >?? End Sub > >??
Please, help .. >?? multicen2002@y... > >
> >?? To unsubscribe from this group, send an email
to: >?? twsapi-unsubscribe@y... > > >
>?? Your use of Yahoo! Groups is subject to the Yahoo! Terms
of Service.
To
unsubscribe from this group, send an email
to: twsapi-unsubscribe@...
Your use of
Yahoo! Groups is subject to the .
|
Thank you for trying David. But again it is not working.. everything else works fine. Anybody know how to solve my 1 week long torture with this line ?? Please, post a sample code line which really works for you and I can go from there. WARM Thank you to You all. Andrew !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ----------------------------------- bad code line start here ----------------------------------- Private Sub Command4_Click() Tws1.placeOrder 3030, "BUY", 1, "ES", "FUT", "200209", "", "", "GLOBEX", "", "LMT", 0, 0 End Sub --- In twsapi@y..., "David" <kotomo@p...> wrote: First, your ORDERID - 1 could be a PROBLEM - generate a larger number and increase by delta of 10 or more ( still first order may cause duplicate error - keep trying or increase first and then place an order) after Expire Date - the strike price use 0 right use "" instead on the exchange not sure - use "GLOBEX" if after the other changes will not make it work(dont trade ES) again for currency use "" This should work David ----- Original Message ----- From: multicen2002 To: twsapi@y... Sent: Saturday, June 22, 2002 12:15 PM Subject: twsapi: Please, help
Hi, I am working on my VB API for IB platform. Thanx to ppl like you, everything starting to work just fine. BUT.. I wasted 1 week trying to send limit order from my box. what is wrong with this code ??
---------------------------------------- code ---------------------------------------- Private Sub Command4_Click()
Tws1.placeOrder 1, "BUY", 1, "ES", "FUT", "200209",_ LastPrice, , "SMART", , "LMT", LastPrice, 0
End Sub
Please, help .. multicen2002@y...
To unsubscribe from this group, send an email to: twsapi-unsubscribe@y...
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|
First, your ORDERID - 1 could be a PROBLEM - generate a larger
number and increase by delta of 10 or more ( still first order may cause
duplicate error - keep trying or increase first and then place an
order)
after Expire Date - the strike price use 0
right? use "" instead
on the exchange not sure - use "GLOBEX" if after the other
changes will not make it work(dont trade ES)
again for currency use ""
This should work
David
toggle quoted message
Show quoted text
----- Original Message -----
Sent: Saturday, June 22, 2002 12:15
PM
Subject: twsapi: Please, help
Hi, I am working on my VB API for IB platform. Thanx to
ppl like you, everything starting to work just fine. BUT.. I wasted
1 week trying to send limit order from my box. what is wrong with this code
??
---------------------------------------- code
---------------------------------------- Private Sub
Command4_Click()
Tws1.placeOrder 1, "BUY", 1, "ES", "FUT", "200209",_
LastPrice, , "SMART", , "LMT", LastPrice, 0
End Sub
Please,
help .. multicen2002@...
To unsubscribe from
this group, send an email
to: twsapi-unsubscribe@...
Your use of
Yahoo! Groups is subject to the .
|
Hi, I am working on my VB API for IB platform. Thanx to ppl like you, everything starting to work just fine. BUT.. I wasted 1 week trying to send limit order from my box. what is wrong with this code ??
---------------------------------------- code ---------------------------------------- Private Sub Command4_Click()
Tws1.placeOrder 1, "BUY", 1, "ES", "FUT", "200209",_ LastPrice, , "SMART", , "LMT", LastPrice, 0
End Sub
Please, help .. multicen2002@...
|
To any and all...
I have never used the demo server.
I have always used my accounts...for testing
What is up with the demo server? When I fire up my client side TWS what special user name and password are required to access the demo server?
I have a suspicion that you need to log on through the web based Java platform to access the demo server accounts...I hope I am wrong...
Thanks
Scott
|
Why does IB API renumber order id's after internet disconnect?
This message was originally posted on IB's API forum. I Thought it worthy of our archives and discussion.
Posted on Wednesday, June 19, 2002 - 06:26 am:
---------------------------------------------------------------------- ---------- Dear IB,
There is a problem with the ActiveX API/TWS interface after a disruption of the internet connection to IB. To demonstrate this problem using the Excel sheet do this: 1 - Place a stop or limit oder (order status will change to 'Submitted' or 'Presubmitted' depending on ordertype and exchange). Write down the assigned order id. In this example I assume it is 123. 2 - Fake a disruption of your internet connection by unplugging the network cable from your PC till TWS show the grid. 3 - Plug in the cable again, the grid disappears and TWS shows quote updates again. So far so good. 4 - Now try to cancel the order - You get an error "Can't find order with id 123" 5 - If you request open orders you see the order Id has changed (in our case from 123 to 124).
Questions: What is the correct procedure to cancel the order? Why does IB renumber order id's after a disruption of the internet connection?
Note: - This behaviour doesn't match the API documentation for cancelOrder () which tells you to use the ID that was specified previously in the call to placeOrder(). - This also explains the 'Duplicate order id' messages people have been seeing lately. - In the example above we used cancelOrder() but placeOrder() (when changing orders) has the same problem. - We used the most current Release of TWS and the API
Regards, Pieter
|
Re: OCA updateExtended(), extended properties, etc, etc
...thanks for keep us up to date......seriously ...post any and all peculiarities you find with the OCA process... Scott --- In twsapi@y..., "BrianL_98" <brianl_98@y...> wrote: Hi,
If you are still wondering how to place an OCA in VB, I did some testing today and was able to get it to work. Here's what you do: The OCA property has a default value of null (""). Set this property to some other value. Successive order placements using placeOrder () will all be grouped together as OCA orders. When done, you should reset the OCA property to null.
Here's a code snippet that sets two OCA stop orders:
Tws1.oca = "test2" Tws1.placeOrder NextID, "BUY", 1, "ES", _ "FUT", "200209", 0, "", "GLOBEX", "", "STP", 0, 1035 NextID = NextID + 1 Tws1.placeOrder NextID, "SELL", 1, "ES", _ "FUT", "200209", 0, "", "GLOBEX", "", "STP", 0, 1000# NextID = NextID + 1 Tws1.oca = ""
--Brian
--- In twsapi@y..., mickjenks <no_reply@y...> wrote:
Thanks Elliot,
However, I have read the TWS docs and understand the purpose of OCA.
That was never the question. The placeOrder() method doesn't include
in its declaration a variable for sending an OCA identifier, nor does
it allow for TIF or Transmit to be sent with the individual orders. Could someone explain how to implement these properties on an
order to order basis? Thanks
|
Re: updateExtended(), extended properties, etc, etc
Hi, If you are still wondering how to place an OCA in VB, I did some testing today and was able to get it to work. Here's what you do: The OCA property has a default value of null (""). Set this property to some other value. Successive order placements using placeOrder() will all be grouped together as OCA orders. When done, you should reset the OCA property to null. Here's a code snippet that sets two OCA stop orders: Tws1.oca = "test2" Tws1.placeOrder NextID, "BUY", 1, "ES", _ "FUT", "200209", 0, "", "GLOBEX", "", "STP", 0, 1035 NextID = NextID + 1 Tws1.placeOrder NextID, "SELL", 1, "ES", _ "FUT", "200209", 0, "", "GLOBEX", "", "STP", 0, 1000# NextID = NextID + 1 Tws1.oca = "" --Brian --- In twsapi@y..., mickjenks <no_reply@y...> wrote: Thanks Elliot,
However, I have read the TWS docs and understand the purpose of OCA. That was never the question. The placeOrder() method doesn't include in its declaration a variable for sending an OCA identifier, nor does it allow for TIF or Transmit to be sent with the individual orders. Could someone explain how to implement these properties on an order to order basis? Thanks
|