开云体育

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

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.

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
----- Original Message -----
From: ruffstuff123
To: twsapi@y...
Sent: Saturday, June 29, 2002 10:05 AM
Subject: twsapi: Modifying an order & testing


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.



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.

Join [email protected] to automatically receive all group messages.