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

Re: EL help please



PureBytes Links

Trading Reference Links

Of course you can link an exit to an entry. All you
have to do is follow this format:

Buy ("MyEntry") yada yada yada;

ExitLong ("MyExit") from entry ("MyEntry") yada yada
yada;

H 

--- Gary Fritz <fritz@xxxxxxxx> wrote:
> > How can I distinguish between positions? 
> > I want #2 to exit only with #1 and #3 to exit only
> with #4. 
> > How do I label entries in EL? 
> 
> You can't.  At least, you can't label them in a way
> that controls the 
> exits.  You can label them e.g. buy("Buy#1") at
> close, but that's 
> only useful in the trade-by-trade report.  (Actually
> it's also useful 
> if you want TS to prevent multiple long or short
> positions for any 
> one signal.)  ANY sell or exitlong will exit the
> position.
> 
> Probably the easiest way to do this is to record
> which positions 
> you're in, and only exit those positions if you're
> IN those 
> positions.  For example:
> 
>  1)  If Go  crosses above HIT then begin
>        buy at close;
>        Buy1 = True;
>        end;
>  2)  If Buy1 and Go crosses below HIT then begin
>        exitlong;
>        Buy1 = False;
>        end;
> 
> > Also I forgot how to exit after 5 pts.
> 
> Use a limit order.  Since you also want it to exit
> only from the #3 
> entry, you'll have to use a similar flag as I used
> above.  Here it's 
> a little bit trickier because you're not exiting at
> the close, so you 
> can't just clear the flag when you exit.  You'll
> have to detect when 
> the limit gets hit and clear the Buy3 flag at that
> time.  (You'd also 
> want to clear it for any other exit condition, e.g.
> a MM stop.)
> 
> Usually you'd use EntryPrice as the base for your
> 5.0 point profit 
> target, but since you'll have multiple entries, you
> need to record 
> the entry price for THIS buy signal.
> 
>  3)  If Go[1] crosses below LIT and Go crosses above
> LIT then begin
>        buy at close;
>        Buy3 = True;
>        Buy3Ent = Close;
>        end;
>      if Buy3 and High > Buy3Ent+5.0 then Buy3 =
> False;  { Limit hit }
>      If Buy3 then exitlong at Buy3Ent + 5.0 limit;
> 
> BTW, if it's possible for your entry condition to
> happen again while 
> you're in a position, you'll probably want to make
> sure you're not 
> already in a type 3 long before you buy again, e.g.:
> 
>  3)  If Buy3 = False 
>        and Go[1] crosses below LIT and Go crosses
> above LIT then begin
> 
> If you don't do this, your Buy3Ent value will get
> reset to the new 
> Close value, even though you might not actually go
> long there (if 
> you've told TS to allow only one long entry per
> signal).
> 
> Gary
> 
>