PureBytes Links
Trading Reference Links
|
Debbi:
>Just getting use to TS2000i strategies but one thing puzzles me and wondered
>if anyone out there can clarify. I understand the basics of how to code
>buy/sell and the resulting MarketPosition but I'm unsure how to ...
>
>1) detect an un-triggered stop/limit order to avoid duplication.
If you name your exit orders (i.e. ExitLong("XL") at 48.50 stop; -
that's for TS2000i, if you're using TS7 you'd just say Sell("XL")
I think), then each time the statement gets executed it simply
replaces the previous order. I think the same may be true of
un-named order; i.e. you can have only one active un-named order.
>2) cancel an un-triggered stop/limit order and start again.
Same as above. You don't need to cancel an open order, you can
simply replace it. If you want, replacing it with an order to exit
a long position at a price of zero, or exit a short position at a
price of 999999, will effectively cancel the order.
I'm sure others on this list may have better ideas.
--
,|___ Alex Matulich -- alex@xxxxxxxxxxxxxx
// +__> Director of Research and Development
// \
// __) Unicorn Research Corporation -- http://unicorn.us.com
|