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

Re: EL OpenPositionProfit exit query



PureBytes Links

Trading Reference Links

In-Reply-To: <007b01c13556$495a5180$04fdaec7@xxxx>
Argh! No qualifier... I want to exitlong interbar and thought the stop thing 
would fix but it didn't... I tried changing the OpenPositionProfit to really 
small numbers - like 1! - but it's still not working.  I must be missing 
something fundamental about the way TS works...

Even this doesn't work:

if blah blah blah... then buy this bar at close;
exitlong at entryprice-1 stop:

It's still completely ignoring the first bar after the buy.

Here's the data:

Entry bar:
O 6616
H 6617.5
L 6614
C 6617

It's buying okay at 6617.

Here's the next bar:
O 6561
H 6589
L 6550
C 6580

With the above it should be getting stopped out at the open, shouldn't it? 
As it is, it's exiting at the open of the following bar which is:
O 6580
H 6593
L 6576
C 6588

Now I'm really puzzled. Is it something about buying on the close which 
makes it ignore the next or what...?

Cheers,
Ian

> Without a qualifier, Exitlong will execute at the close of the current 
> bar.
> 
> If you want an exit on open, try Exitlong at Market.
> Or, if you want an intrabar exit, calculate what price corresponds to $500
> OPP and issue a stop.
> 
> SH
> ----- Original Message -----
> From: "Ian Waugh" <ianwaugh@xxxxxxxxxxxxxxxxxxx>
> To: <omega-list@xxxxxxxxxx>
> Cc: <ianwaugh@xxxxxxxxxxxxxxxxxxx>
> Sent: Tuesday, September 04, 2001 7:15 AM
> Subject: EL OpenPositionProfit exit query
> 
> 
> > Can someone help me with this query, please. It's driving me nuts!
> >
> > I'm using 5 min bars and buy on the close of the day. I then want to 
> > exit
> if
> > the OpenPositionProfit is less than, say 500.
> >
> > In some cases, the next day opens way down but instead of exiting on the
> > open (or near to) as I would have expected (OPP being well less than 
> > 500)
> > it's either exiting on the close which is higher than the open or not
> > exiting until the next bar.
> >
> > The pseudo code goes like this:
> >
> > if blah blah blah... then buy this bar at close; {this bit works just
> fine}
> > if OpenPositionProfit<-50 then exitlong;
> >
> > Although I'm using 5min bars, the data is actually 1 min bars so I set 
> > the
> > backtesting Setting to 1min but it still doesn't work. Setting it to 
> > Tick
> > changes the results (even though it's not tick data) but the problem's
> still
> > there.
> >
> > In some cases it actually looks as though it's ignoring this first bar
> > completely.
> >
> > All suggestions most gratefully received...
> >
> > Cheers,
> > Ian
> >
> 
>