开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育
Date

Re: twsapi: parameter list for orderstatus?

Michel
 

开云体育

It works for me (I use VB 5) but I pass parameters 'ByVal' in the order status event.
?
Michel.

-----Mensaje original-----
De: cyberbri_2000 [mailto:no_reply@...]
Enviado el: jueves, 04 de julio de 2002 21:45
Para: twsapi@...
Asunto: twsapi: parameter list for orderstatus?

I'm getting an error in VB 6 that says the declaration does not match
the event description.

From the object browser I got this info and coded the sub like this...

Sub tws1_orderStatus(id As Long, status As String, filled As Long,
remaining As Long, price As Single)
'orderstatus event
End Sub


This is from the user guide...
void orderStatus(long id, String status, long filled, long remaining,
float price, permId)


I tried to add permId to the declaration and other combinations but
that didn't work.? Anyone have a working orderstatus declaration??
Not sure what I'm doing wrong.

Thanx,
Brian



To unsubscribe from this group, send an email to:
twsapi-unsubscribe@...



Your use of Yahoo! Groups is subject to the .


Re: twsapi: Re: Ways of filtering bad quotes from TWS

Michel
 

开云体育

I dont know how you handle your quotes and sizes so I can't help.
The way in which I handle them is through the use of a 'one shoot' timer of 200 ms. In my tickPrice event I update a variable LastPrice = price and enable the timer. In my tickSize event I update a variable LastSize = size and also enable the timer if it is not. Then in the Timer.Timer event I disable the timer and do the job with LastPrice and LastSize.
This way I allow a 200ms. time window after every price or size event to wait for the second event (size or price) to update the other variable and if the second event dont comes, simply the other variable is unchanged when I use them in my Timer.timer event.
?
Michel.

[Michel]??-----Mensaje original-----
De: mbluhm2001 [mailto:mbluhm2001@...]
Enviado el: jueves, 04 de julio de 2002 21:35
Para: twsapi@...
Asunto: twsapi: Re: Ways of filtering bad quotes from TWS

Tbanks for the reply. Thanks what I'm doing with the 0 price quotes,
throwing them away. I didn't mention that I'm also getting what seems
to be quotes that non zero but incorrect. So I'm trying to filter them
with some type of algrothrim so I don't get caught executing a bad
trade. I also wanted to make sure that its not something I'm doing
incorrectly with my interface to TWS.

Thanks,
Mark


parameter list for orderstatus?

cyberbri_2000
 

I'm getting an error in VB 6 that says the declaration does not match
the event description.

From the object browser I got this info and coded the sub like this...

Sub tws1_orderStatus(id As Long, status As String, filled As Long,
remaining As Long, price As Single)
'orderstatus event
End Sub


This is from the user guide...
void orderStatus(long id, String status, long filled, long remaining,
float price, permId)


I tried to add permId to the declaration and other combinations but
that didn't work. Anyone have a working orderstatus declaration?
Not sure what I'm doing wrong.

Thanx,
Brian


twsapi: Re: Ways of filtering bad quotes from TWS

mbluhm2001
 

Tbanks for the reply. Thanks what I'm doing with the 0 price quotes,
throwing them away. I didn't mention that I'm also getting what seems
to be quotes that non zero but incorrect. So I'm trying to filter them
with some type of algrothrim so I don't get caught executing a bad
trade. I also wanted to make sure that its not something I'm doing
incorrectly with my interface to TWS.

Thanks,
Mark


--- In twsapi@y..., "Michel" <migurull@t...> wrote:
Yes, I sometimes get quotes and/or sizes =0 for a litle moment buy I
dont
understand your problem: 'if lastPrice = 0 then... exit sub'

Michel.
-----Mensaje original-----
De: mbluhm2001 [mailto:mbluhm2001@y...]
Enviado el: jueves, 04 de julio de 2002 19:37
Para: twsapi@y...
Asunto: twsapi: Re: Ways of filtering bad quotes from TWS


I guess I will reply to myself and ask a different question:

Is anyone else getting bad quotes, i.e. quotes == 0 from the TWS
interface. If not, it seems I must be doing something wrong.

Thanks,
Mark


--- In twsapi@y..., "mbluhm2001" <mbluhm2001@y...> wrote:
> I have been getting a price quote of zero for some of the stock
> tickers throughout the trading day. So I decided to put in a
filter
> and wanted to see if anyone else had any better ideas. The way
I'm
> trying it is the following:
>
> IF
> the current price quote is greater than or less than the
previous
> quote by X% and the error counter is less than Y
>
> THEN
> throw away the quote and increment the error counter
>
> ELSE
> use the price quote and clear the error counter
>
> The idea is to set some min and max % (i'm starting with 5%)
that
the
> quote can be outside the previous quote. But to handle gaps, if
the
> quote is out of range Y number of times (i'm starting with 5)
then
use
> that new quote. Also I don't allow quotes that are a value of
zero
> either.
>
> Any thoughts would be helpful.
>
> Thanks,
> Mark


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.


Re: twsapi: Re: Ways of filtering bad quotes from TWS

Michel
 

开云体育

Yes, I sometimes get quotes and/or sizes =0 for a litle moment buy I dont understand your problem: 'if lastPrice = 0 then... exit sub'
?
Michel.

-----Mensaje original-----
De: mbluhm2001 [mailto:mbluhm2001@...]
Enviado el: jueves, 04 de julio de 2002 19:37
Para: twsapi@...
Asunto: twsapi: Re: Ways of filtering bad quotes from TWS

I guess I will reply to myself and ask a different question:

Is anyone else getting bad quotes, i.e. quotes == 0 from the TWS
interface. If not, it seems I must be doing something wrong.

Thanks,
Mark


--- In twsapi@y..., "mbluhm2001" wrote:
> I have been getting a price quote of zero for some of the stock
> tickers throughout the trading day. So I decided to put in a filter
> and wanted to see if anyone else had any better ideas. The way I'm
> trying it is the following:
>
> IF
>?? the current price quote is greater than or less than the previous
> quote by X% and the error counter is less than Y
>
> THEN
>?? throw away the quote and increment the error counter
>
> ELSE
>?? use the price quote and clear the error counter
>
> The idea is to set some min and max % (i'm starting with 5%) that
the
> quote can be outside the previous quote. But to handle gaps, if the
> quote is out of range Y number of times (i'm starting with 5) then
use
> that new quote.? Also I don't allow quotes that are a value of zero
> either.
>
> Any thoughts would be helpful.
>
> Thanks,
> Mark



To unsubscribe from this group, send an email to:
twsapi-unsubscribe@...



Your use of Yahoo! Groups is subject to the .


twsapi: Re: Help! Cancel order

jaba_z
 

Hey Bruce, and I thought that the project I put on my pitiful website
was good enough... :)

regards
Jaba

--- In twsapi@y..., "marinindextrader" <marinindextrader@y...> wrote:
"Flyin an airplane is really simple too if you know how to do it. LOL"

Yep....its the landings that are tricky....

Scott



--- In twsapi@y..., "Bruce Hawkins" <hawkinsk001@h...> wrote:
Flyin an airplane is really simple too if you know how to do it. LOL

Thanks for pointing me in the right direction I will see if I can
figure this out.

Have a safe holiday.

Bruce
----- Original Message -----
From: mk_trading_911
To: twsapi@y...
Sent: Thursday, July 04, 2002 7:00 AM
Subject: twsapi: Re: Help! Cancel order


Bruce, it's really simple.

existingId = Cells(ActiveCell.row, 13).value

it means that existingId get's loaded with whatever there is in
the
column 13 of the active row on the spreadsheet. then it passes
that
number to tws1.cancelOrder, and it cancels it.

Since you don't have spreadsheet, you need to store that ID
number
when you send your buy/sell order for execution. Or, a bit more
complicated, request open orders, get their IDs and use one of
them
to cancel that order.

MK

--- In twsapi@y..., "Bruce Hawkins" <hawkinsk001@h...> wrote:
> First of all thanks for the response, here is the code in Excel
>
> Sub cancelOrder()
> clearError
>
> ' get existing id
> Dim existingId As Long
> existingId = Cells(ActiveCell.row, 13).value
>
> ' cancel order
> Sheet5.Tws1.cancelOrder (existingId)
> End Sub
>
> Maybe I did not make it clear but I am trying to come up with a
stand alone program, that being said in the code above there
> is references to sheets and cells which don't exist in my prog.
I
am not sure what to put in there place.
>
> Thanks,
>
> Bruce
> ----- Original Message -----
> From: mk_trading_911
> To: twsapi@y...
> Sent: Thursday, July 04, 2002 6:21 AM
> Subject: twsapi: Re: Help! Cancel order
>
>
> Open the workbook, and press Alt-F11. Visual Basic for
Applications
> should appear. All the code for cancelling an order is on
sheet2
> (Orders).
>
> What part of the code do you have a problem with, exactly?
> MK
>
> --- In twsapi@y..., "Bruce Hawkins" <hawkinsk001@h...> wrote:
> > Thanks for the response, and if I was a little more savy
regarding
> VB what you sent would be helpful.
> >
> > I have looked at user's guide and Excel code trying to come
up
with
> what I need and I can't figure it out.
> >
> > But thanks anyway.
> >
> > Bruce
> > ----- Original Message -----
> > From: mk_trading_911
> > To: twsapi@y...
> > Sent: Thursday, July 04, 2002 6:04 AM
> > Subject: twsapi: Re: Help! Cancel order
> >
> >
> > Either: store in your application's globals the ID number
of
the
> > orders you are sending, and their status, or extract them
from
> TWS
> > (Tws1.reqOpenOrders). Once you know the ID, then use:
> > Tws1.cancelOrder (orderId). It's all in the Excel
spreadsheet
VBA
> > Macros, and user's manual.
> > I hope this helps.
> >
> > MK
> >
> >
> > --- In twsapi@y..., "Bruce Hawkins" <hawkinsk001@h...>
wrote:
> > > I have been struggling with this for 2 days, does
anyone
have
> VB
> > code for canceling a pending order. I 've tried 6
> > > ways from Sunday to make it work and I am totally lost.
> > >
> > > Thanks,
> > >
> > > Bruce
> >
> >
> > 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.
>
>
> Yahoo! Groups Sponsor
>
>
> 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.


Charts from IB data feed

caspertype2001
 

Opps heres the URL



jclarke at hotpop.com


Charts using IB data

caspertype2001
 

Autotrader gives you

Charting using the IB data feed, ie futures, stocks, options.
Indicators EMA,SMA,TMA,WMA, MACD, CCI, REI, ADX, BBands, KBands, RSI,
williams and StochRSI, stochastics and more..

Highly flexible charts and unlimited charts onscreen all from TWS API.

Historical updating of futures data automatically from CME website.
Optimising of tick feeds in favourite parameters. Overnight On/Off.

Integration with TWAPI to execute trades manually using single clicks
to buy and sell.

In the future I am adding auto-trailing stops and strategies using
easy language.

I have a free seven day demo.

Regards
James Clarke

jclarke at hotpop.com (change the at to an @ for antispam).


Re: twsapi: TraderGuard is now 4.56MB - check TWSAPI file area.

Manuel Knospe
 

开云体育

Is there in any way the possibility to expand your program to connect it to TradeStation2000i to execute fully automated orders?
If so please mail me privately...
?
Thanks in advance
?
MK
?

----- Original Message -----
Sent: Wednesday, July 03, 2002 9:18 PM
Subject: twsapi: TraderGuard is now 4.56MB - check TWSAPI file area.

TraderGuard is recompiled as you asked.

You can test it with ANY symbol you want !
I also removed dapt.database from program to lower its size to 4.56MB
Just type any symbol into "symbol" text field and click connect.

You can download it from FILES area.. It is for as long as Scott will
allow it.

If not there please, use this link to get it.


:)) AMJ



To unsubscribe from this group, send an email to:
twsapi-unsubscribe@...



Your use of Yahoo! Groups is subject to the .


twsapi: Re: Help! Cancel order

marinindextrader
 

"Flyin an airplane is really simple too if you know how to do it. LOL"

Yep....its the landings that are tricky....

Scott



--- In twsapi@y..., "Bruce Hawkins" <hawkinsk001@h...> wrote:
Flyin an airplane is really simple too if you know how to do it. LOL

Thanks for pointing me in the right direction I will see if I can
figure this out.

Have a safe holiday.

Bruce
----- Original Message -----
From: mk_trading_911
To: twsapi@y...
Sent: Thursday, July 04, 2002 7:00 AM
Subject: twsapi: Re: Help! Cancel order


Bruce, it's really simple.

existingId = Cells(ActiveCell.row, 13).value

it means that existingId get's loaded with whatever there is in
the
column 13 of the active row on the spreadsheet. then it passes
that
number to tws1.cancelOrder, and it cancels it.

Since you don't have spreadsheet, you need to store that ID
number
when you send your buy/sell order for execution. Or, a bit more
complicated, request open orders, get their IDs and use one of
them
to cancel that order.

MK

--- In twsapi@y..., "Bruce Hawkins" <hawkinsk001@h...> wrote:
> First of all thanks for the response, here is the code in Excel
>
> Sub cancelOrder()
> clearError
>
> ' get existing id
> Dim existingId As Long
> existingId = Cells(ActiveCell.row, 13).value
>
> ' cancel order
> Sheet5.Tws1.cancelOrder (existingId)
> End Sub
>
> Maybe I did not make it clear but I am trying to come up with a
stand alone program, that being said in the code above there
> is references to sheets and cells which don't exist in my prog.
I
am not sure what to put in there place.
>
> Thanks,
>
> Bruce
> ----- Original Message -----
> From: mk_trading_911
> To: twsapi@y...
> Sent: Thursday, July 04, 2002 6:21 AM
> Subject: twsapi: Re: Help! Cancel order
>
>
> Open the workbook, and press Alt-F11. Visual Basic for
Applications
> should appear. All the code for cancelling an order is on
sheet2
> (Orders).
>
> What part of the code do you have a problem with, exactly?
> MK
>
> --- In twsapi@y..., "Bruce Hawkins" <hawkinsk001@h...> wrote:
> > Thanks for the response, and if I was a little more savy
regarding
> VB what you sent would be helpful.
> >
> > I have looked at user's guide and Excel code trying to come
up
with
> what I need and I can't figure it out.
> >
> > But thanks anyway.
> >
> > Bruce
> > ----- Original Message -----
> > From: mk_trading_911
> > To: twsapi@y...
> > Sent: Thursday, July 04, 2002 6:04 AM
> > Subject: twsapi: Re: Help! Cancel order
> >
> >
> > Either: store in your application's globals the ID number
of
the
> > orders you are sending, and their status, or extract them
from
> TWS
> > (Tws1.reqOpenOrders). Once you know the ID, then use:
> > Tws1.cancelOrder (orderId). It's all in the Excel
spreadsheet
VBA
> > Macros, and user's manual.
> > I hope this helps.
> >
> > MK
> >
> >
> > --- In twsapi@y..., "Bruce Hawkins" <hawkinsk001@h...>
wrote:
> > > I have been struggling with this for 2 days, does
anyone
have
> VB
> > code for canceling a pending order. I 've tried 6
> > > ways from Sunday to make it work and I am totally lost.
> > >
> > > Thanks,
> > >
> > > Bruce
> >
> >
> > 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.
>
>
> Yahoo! Groups Sponsor
>
>
> 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.


Re: Ways of filtering bad quotes from TWS

marinindextrader
 

I only access a futures account so I cant say more than the commodity
quotes I get seem fine...

Why dont you post the symbols your having problems with and perhaps a
few other members with stock accounts can see if they can duplicate
your problem...

Scott

--- In twsapi@y..., "mbluhm2001" <mbluhm2001@y...> wrote:
I guess I will reply to myself and ask a different question:

Is anyone else getting bad quotes, i.e. quotes == 0 from the TWS
interface. If not, it seems I must be doing something wrong.

Thanks,
Mark


--- In twsapi@y..., "mbluhm2001" <mbluhm2001@y...> wrote:
I have been getting a price quote of zero for some of the stock
tickers throughout the trading day. So I decided to put in a
filter
and wanted to see if anyone else had any better ideas. The way
I'm
trying it is the following:

IF
the current price quote is greater than or less than the
previous
quote by X% and the error counter is less than Y

THEN
throw away the quote and increment the error counter

ELSE
use the price quote and clear the error counter

The idea is to set some min and max % (i'm starting with 5%) that
the
quote can be outside the previous quote. But to handle gaps, if
the
quote is out of range Y number of times (i'm starting with 5)
then
use
that new quote. Also I don't allow quotes that are a value of
zero
either.

Any thoughts would be helpful.

Thanks,
Mark


Re: Ways of filtering bad quotes from TWS

mbluhm2001
 

I guess I will reply to myself and ask a different question:

Is anyone else getting bad quotes, i.e. quotes == 0 from the TWS
interface. If not, it seems I must be doing something wrong.

Thanks,
Mark


--- In twsapi@y..., "mbluhm2001" <mbluhm2001@y...> wrote:
I have been getting a price quote of zero for some of the stock
tickers throughout the trading day. So I decided to put in a filter
and wanted to see if anyone else had any better ideas. The way I'm
trying it is the following:

IF
the current price quote is greater than or less than the previous
quote by X% and the error counter is less than Y

THEN
throw away the quote and increment the error counter

ELSE
use the price quote and clear the error counter

The idea is to set some min and max % (i'm starting with 5%) that
the
quote can be outside the previous quote. But to handle gaps, if the
quote is out of range Y number of times (i'm starting with 5) then
use
that new quote. Also I don't allow quotes that are a value of zero
either.

Any thoughts would be helpful.

Thanks,
Mark


Re: twsapi: Re: Help! Cancel order

 

开云体育

Flyin an airplane is really simple too if you know how to do it. LOL
?
Thanks for pointing me in the right direction I will see if I can figure this out.
?
Have a safe holiday.
?
Bruce

----- Original Message -----
Sent: Thursday, July 04, 2002 7:00 AM
Subject: twsapi: Re: Help! Cancel order

Bruce, it's really simple.

existingId = Cells(ActiveCell.row, 13).value

it means that existingId get's loaded with whatever there is in the
column 13 of the active row on the spreadsheet. then it passes that
number to tws1.cancelOrder, and it cancels it.

Since you don't have spreadsheet, you need to store that ID number
when you send your buy/sell order for execution. Or, a bit more
complicated, request open orders, get their IDs and use one of them
to cancel that order.

MK

--- In twsapi@y..., "Bruce Hawkins" wrote:
> First of all thanks for the response, here is the code in Excel
>
> Sub cancelOrder()
>???? clearError
>????
>???? ' get existing id
>???? Dim existingId As Long
>???? existingId = Cells(ActiveCell.row, 13).value
>
>???? ' cancel order
>???? Sheet5.Tws1.cancelOrder (existingId)
> End Sub
>
> Maybe I did not make it clear but I am trying to come up with a
stand alone program, that being said in the code above there
> is references to sheets and cells which don't exist in my prog. I
am not sure what to put in there place.
>
> Thanks,
>
> Bruce
>?? ----- Original Message -----
>?? From: mk_trading_911
>?? To: twsapi@y...
>?? Sent: Thursday, July 04, 2002 6:21 AM
>?? Subject: twsapi: Re: Help! Cancel order
>
>
>?? Open the workbook, and press Alt-F11. Visual Basic for
Applications
>?? should appear. All the code for cancelling an order is on sheet2
>?? (Orders).
>
>?? What part of the code do you have a problem with, exactly?
>?? MK
>
>?? --- In twsapi@y..., "Bruce Hawkins" wrote:
>?? > Thanks for the response, and if I was a little more savy
regarding
>?? VB what you sent would be helpful.
>?? >
>?? > I have looked at user's guide and Excel code trying to come up
with
>?? what I need and I can't figure it out.
>?? >
>?? > But thanks anyway.
>?? >
>?? > Bruce
>?? >?? ----- Original Message -----
>?? >?? From: mk_trading_911
>?? >?? To: twsapi@y...
>?? >?? Sent: Thursday, July 04, 2002 6:04 AM
>?? >?? Subject: twsapi: Re: Help! Cancel order
>?? >
>?? >
>?? >?? Either: store in your application's globals the ID number of
the
>?? >?? orders you are sending, and their status, or extract them
from
>?? TWS
>?? >?? (Tws1.reqOpenOrders). Once you know the ID, then use:
>?? >?? Tws1.cancelOrder (orderId). It's all in the Excel spreadsheet
VBA
>?? >?? Macros, and user's manual.
>?? >?? I hope this helps.
>?? >
>?? >?? MK
>?? >
>?? >
>?? >?? --- In twsapi@y..., "Bruce Hawkins" wrote:
>?? >?? >? I have been struggling with this for 2 days, does anyone
have
>?? VB
>?? >?? code for canceling a pending order. I 've tried 6
>?? >?? > ways from Sunday to make it work and I am totally lost.
>?? >?? >
>?? >?? > Thanks,
>?? >?? >
>?? >?? > Bruce
>?? >
>?? >
>?? >???????? 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.
>
>
>???????? Yahoo! Groups Sponsor
>??????????
>
>?? 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 .


twsapi: Re: Help! Cancel order

 

Bruce, it's really simple.

existingId = Cells(ActiveCell.row, 13).value

it means that existingId get's loaded with whatever there is in the
column 13 of the active row on the spreadsheet. then it passes that
number to tws1.cancelOrder, and it cancels it.

Since you don't have spreadsheet, you need to store that ID number
when you send your buy/sell order for execution. Or, a bit more
complicated, request open orders, get their IDs and use one of them
to cancel that order.

MK

--- In twsapi@y..., "Bruce Hawkins" <hawkinsk001@h...> wrote:
First of all thanks for the response, here is the code in Excel

Sub cancelOrder()
clearError

' get existing id
Dim existingId As Long
existingId = Cells(ActiveCell.row, 13).value

' cancel order
Sheet5.Tws1.cancelOrder (existingId)
End Sub

Maybe I did not make it clear but I am trying to come up with a
stand alone program, that being said in the code above there
is references to sheets and cells which don't exist in my prog. I
am not sure what to put in there place.

Thanks,

Bruce
----- Original Message -----
From: mk_trading_911
To: twsapi@y...
Sent: Thursday, July 04, 2002 6:21 AM
Subject: twsapi: Re: Help! Cancel order


Open the workbook, and press Alt-F11. Visual Basic for
Applications
should appear. All the code for cancelling an order is on sheet2
(Orders).

What part of the code do you have a problem with, exactly?
MK

--- In twsapi@y..., "Bruce Hawkins" <hawkinsk001@h...> wrote:
> Thanks for the response, and if I was a little more savy
regarding
VB what you sent would be helpful.
>
> I have looked at user's guide and Excel code trying to come up
with
what I need and I can't figure it out.
>
> But thanks anyway.
>
> Bruce
> ----- Original Message -----
> From: mk_trading_911
> To: twsapi@y...
> Sent: Thursday, July 04, 2002 6:04 AM
> Subject: twsapi: Re: Help! Cancel order
>
>
> Either: store in your application's globals the ID number of
the
> orders you are sending, and their status, or extract them
from
TWS
> (Tws1.reqOpenOrders). Once you know the ID, then use:
> Tws1.cancelOrder (orderId). It's all in the Excel spreadsheet
VBA
> Macros, and user's manual.
> I hope this helps.
>
> MK
>
>
> --- In twsapi@y..., "Bruce Hawkins" <hawkinsk001@h...> wrote:
> > I have been struggling with this for 2 days, does anyone
have
VB
> code for canceling a pending order. I 've tried 6
> > ways from Sunday to make it work and I am totally lost.
> >
> > Thanks,
> >
> > Bruce
>
>
> 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.


Yahoo! Groups Sponsor


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.


Re: twsapi: Re: Help! Cancel order

 

开云体育

First of all thanks for the response, here is the code in Excel
?
Sub cancelOrder()
??? clearError
???
??? ' get existing id
??? Dim existingId As Long
??? existingId = Cells(ActiveCell.row, 13).value
?
??? ' cancel order
??? Sheet5.Tws1.cancelOrder (existingId)
End Sub
?
Maybe I did not make it clear but I am trying to come up with a stand alone program, that being said in the code above there
is references to sheets and cells which don't exist in my prog. I am not sure what to put in there place.
?
Thanks,
?
Bruce

----- Original Message -----
Sent: Thursday, July 04, 2002 6:21 AM
Subject: twsapi: Re: Help! Cancel order

Open the workbook, and press Alt-F11. Visual Basic for Applications
should appear. All the code for cancelling an order is on sheet2
(Orders).

What part of the code do you have a problem with, exactly?
MK

--- In twsapi@y..., "Bruce Hawkins" <hawkinsk001@h...> wrote:
> Thanks for the response, and if I was a little more savy regarding
VB what you sent would be helpful.
>
> I have looked at user's guide and Excel code trying to come up with
what I need and I can't figure it out.
>
> But thanks anyway.
>
> Bruce
>?? ----- Original Message -----
>?? From: mk_trading_911
>?? To: twsapi@y...
>?? Sent: Thursday, July 04, 2002 6:04 AM
>?? Subject: twsapi: Re: Help! Cancel order
>
>
>?? Either: store in your application's globals the ID number of the
>?? orders you are sending, and their status, or extract them from
TWS
>?? (Tws1.reqOpenOrders). Once you know the ID, then use:
>?? Tws1.cancelOrder (orderId). It's all in the Excel spreadsheet VBA
>?? Macros, and user's manual.
>?? I hope this helps.
>
>?? MK
>
>
>?? --- In twsapi@y..., "Bruce Hawkins" wrote:
>?? >? I have been struggling with this for 2 days, does anyone have
VB
>?? code for canceling a pending order. I 've tried 6
>?? > ways from Sunday to make it work and I am totally lost.
>?? >
>?? > Thanks,
>?? >
>?? > Bruce
>
>
>???????? 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 .


twsapi: Re: Help! Cancel order

 

Open the workbook, and press Alt-F11. Visual Basic for Applications
should appear. All the code for cancelling an order is on sheet2
(Orders).

What part of the code do you have a problem with, exactly?
MK

--- In twsapi@y..., "Bruce Hawkins" <hawkinsk001@h...> wrote:
Thanks for the response, and if I was a little more savy regarding
VB what you sent would be helpful.

I have looked at user's guide and Excel code trying to come up with
what I need and I can't figure it out.

But thanks anyway.

Bruce
----- Original Message -----
From: mk_trading_911
To: twsapi@y...
Sent: Thursday, July 04, 2002 6:04 AM
Subject: twsapi: Re: Help! Cancel order


Either: store in your application's globals the ID number of the
orders you are sending, and their status, or extract them from
TWS
(Tws1.reqOpenOrders). Once you know the ID, then use:
Tws1.cancelOrder (orderId). It's all in the Excel spreadsheet VBA
Macros, and user's manual.
I hope this helps.

MK


--- In twsapi@y..., "Bruce Hawkins" <hawkinsk001@h...> wrote:
> I have been struggling with this for 2 days, does anyone have
VB
code for canceling a pending order. I 've tried 6
> ways from Sunday to make it work and I am totally lost.
>
> Thanks,
>
> Bruce


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.


Re: twsapi: Re: Help! Cancel order

 

开云体育

Thanks for the response, and if I was a little more savy regarding VB what you sent would be helpful.
?
I have looked at user's guide and Excel code trying to come up with what I need and I can't figure it out.
?
But thanks anyway.
?
Bruce

----- Original Message -----
Sent: Thursday, July 04, 2002 6:04 AM
Subject: twsapi: Re: Help! Cancel order

Either: store in your application's globals the ID number of the
orders you are sending, and their status, or extract them from TWS
(Tws1.reqOpenOrders). Once you know the ID, then use:
Tws1.cancelOrder (orderId). It's all in the Excel spreadsheet VBA
Macros, and user's manual.
I hope this helps.

MK


--- In twsapi@y..., "Bruce Hawkins" wrote:
>? I have been struggling with this for 2 days, does anyone have VB
code for canceling a pending order. I 've tried 6
> ways from Sunday to make it work and I am totally lost.
>
> Thanks,
>
> Bruce



To unsubscribe from this group, send an email to:
twsapi-unsubscribe@...



Your use of Yahoo! Groups is subject to the .


Re: Help! Cancel order

 

Either: store in your application's globals the ID number of the
orders you are sending, and their status, or extract them from TWS
(Tws1.reqOpenOrders). Once you know the ID, then use:
Tws1.cancelOrder (orderId). It's all in the Excel spreadsheet VBA
Macros, and user's manual.
I hope this helps.

MK


--- In twsapi@y..., "Bruce Hawkins" <hawkinsk001@h...> wrote:
I have been struggling with this for 2 days, does anyone have VB
code for canceling a pending order. I 've tried 6
ways from Sunday to make it work and I am totally lost.

Thanks,

Bruce


Re: twsapi: TraderGuard

Eduardo J Motta
 

I downloaded the Beast, but never run the executable.

You actually do not need to run the interface to see an image o fit.

the guy already placed a link to his web page ? where you can see what is
does look like.

Buy looking at it I noticed there was no place to place number of
shares/contracts to Buy or sell, but this might well be inside one of its
menu.

hope this helps,

Eduardo

-----Original Message-----
From: Richard Foulk [mailto:richard@...]
Sent: Thursday, July 04, 2002 3:44 AM
To: twsapi@...
Subject: Re: twsapi: TraderGuard


Someone that's already taken the risk and loaded up that package
should get a screen dump and post it so the group actually gets
something useful out of this.

I was going to do it but couldn't bring myself to take the risk.

(Safe computing rule #1: Never run software of questionable origin.)


Thanks

Richard


To unsubscribe from this group, send an email to:
twsapi-unsubscribe@...



Your use of Yahoo! Groups is subject to


Re: automated login

 

--- In twsapi@y..., "Michel" <migurull@t...> wrote:
Hi,

Does somebody know some way to run the TWS application unattended?
What I need is:
1- Avoid the login screen, passing parameters (UserName and
Password) from
my calling application.
I think that handling UI automation inside the application is superior
to anything you could do with VB or WinTask.

So, I just uploaded a file called AutoLoginWrapper.java. It is the
source for a tiny program that registers code to look for the Login
window opening, starts TWS, finds the Login button, and "presses" it.
All of this inside the Java VM that is running TWS.

Eventually, I will get around to making it automatically accept
incoming connections as well. I'll also post a binary version and
some instructions on how to use it for those who can't figure it out.