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

Re: EL OpenPositionProfit exit query



PureBytes Links

Trading Reference Links

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
>