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

Re: Anchoring price to entry bar



PureBytes Links

Trading Reference Links

At 6:44 PM +1000 7/1/98, robert wrote:

>Would someone help me out with a bit of EL code?
>
>I'm trying to set my initial stop to below the Low of a swinglow bar which
>occurred the day before I enter long. I thought the code AT$ before a price
>would indicate that price for the entry day.
>
>I've tried this (but TS4 ignores my command to exit):
>
>If C>Average(C,20) and C<C[1] and C[1]<C[2] then
>
>         Buy("Entry1") tomorrow at H{of today} + 1 point stop;
>
>If MarketPosition= 1 then exitlong("EntryStop") from entry("Entry1") AT$
>Low[1] Stop;


Why not just save the value of the low from the previous day in a variable
("ExitPt"):


If C>Average(C,20) and C<C[1] and C[1]<C[2] then begin
    Buy("Entry1") tomorrow at H{of today} + 1 point stop;
    ExitPt = L[1];
end;

ExitLong("EntryStop") at ExitPt Stop;


Bob Fulks