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

Re: EL Observations and Questions



PureBytes Links

Trading Reference Links


Try adding the following EL code for your stops:

If BarsSinceEntry(0) >= 0 Then
[ExitLong At My_Price Stop;]

I have found the BarsSinceEntry statement to be a decent workaround in some
situations where I want my stop/loss or profit target exit to be in place
on the very next bar, after I've been filled on the close.

Also, the bouncing tick percentage, which you can adjust, will determine
which stop will be executed first.  If you're wondering how the "bouncing
tick" works, and what the impacts are,  consult the on-line TS or SC help
documentation.  It's usually set to 20% as the default.  You can change it
to whatever you believe to be more representative.

Regards,
Craig





omega-list@xxxxxxxxxx on 01/20/98 03:31:27 PM

To:   omega-list@xxxxxxxxxx
cc:    (bcc: Craig Nelson/NY/SBCM)
Subject:  EL Observations and Questions




I was trying to duplicate the "breakeven" stop in EL with the following:
if maxpositionprofit>=200 then begin
exitlong at entryprice stop;
exitshort at entryprice stop;
end;
Naturally the results weren't the same as with the built-in breakeven stop.
The apparent reason is that the EL-coded stop doesn't apply until the bar
FOLLOWING the entry bar, whereas the built-in stop can get you out on the
same bar. Money management stops encounter the same situation. Isn't there
some way to get a programmed-in stop to do the same thing, that is to be
active on the same bar as the entry?
Along the same line, I ran into some funny stuff with the following:
if condition1 {an inside day or similar} then begin
buy 1 contract at h stop;
sell 1 contract at l stop;
end;
Occasionally there was a situation where both entry stops (both short and
long) would get hit on the same bar. The problem is, there's (apparently)
no way for EL to know which stop got hit first, and last. So coming out of
the bar you might wind up long in the simulation where in reality the sell
entry would have been the most recent and you would have wound up short.
The direction EL chooses in this case seems to be totally random.
If anyone knows how to resolve these little glitches I'd sure like to hear
about it. And perhaps I can return the favor sometime. Thanks!