[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strategy



PureBytes Links

Trading Reference Links

Debbi:

>thanks Alex. do I have this right?
>
>duplication won't happen, the un-triggered order will simply get replaced,
>only one can exist at any time.

One of the same name can exist at the same time.  You can place
several orders to happen on the next bar: buy limit, buy stop, sell
limit, sell stop, exitlong, exitshort.  All these are different, and
they would all need different names to coexist on the next bar.  You
can also set multiple orders of the same type for the next bar (i.e.
four sell entry orders) provided you gave them all different names.

>if you want to tell if an un-triggered order is sitting out there, you have
>to code this yourself, no such thing as "UntriggeredPosition"?

It's what Dennis said in another message.  Orders are only good for
the next bar.  They expire by themselves.  You have to keep placing
the order on every bar to keep it active.

If you place an order, you can test whether it got filled on the
next bar using MarketPosition, providing you're only trading one
position per direction, not pyramiding.

>to cancel an un-triggered order, simply create an order with a price that
>will guarantee execution - but won't this affect the results or the screen
>image?

I meant guarantee NON-execution.  But orders only last for 1 bar,
so it's not necessary to cancel them.  Here's a paragraph from the
TS2000i EasyLanguage manual:

     Canceling Orders

     As a general rule, all stop and limit orders are canceled at
     the close of the bar. For example, if a trading strategy is
     applied to a daily price chart, and a buy limit order is placed
     on Monday, then the order is active throughout the Tuesday bar.
     This limit order is canceled at the close of the session on
     Tuesday if the target price of the limit order is not met by
     the market. This applies to intra-day charts as well.

-Alex