What you need is a One Cancells all order. I use BT. When my order is executed, it sets a <close at Target> and <Close at Stop> with one Cancells other order.
--- In [email protected], "Padhu" <[EMAIL PROTECTED]> wrote: > > hi, > > Hoping somone on this list can shed some light on this. > > //// Forex trading using Amibroker using TWS API > Buy=some_rule; //Not as good as Japanese Forex Trader > Buy_level=valuewhen(buy,c,1); > > exit1=buylevel+exit1_offset; > exit2=Trailingstop of 30 pips with initial stop at breakeven (Buy_level) ( Initial stop loss set for 30 pips trailing below entry when long is entered) > > If ibc.isconnected() > > placeorder( for 2 lots) > sell lot1 at exit1 > upon exit1 send order with exit2 condition. > > Any ideas on how to do this?. > Thanks. > > Cheers,Padhu >
