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

Re: Way out...



PureBytes Links

Trading Reference Links

> I use TS4 so I don't know what advances have been made to functions since.
> However, I have reason to reference Exit names for purposes of print
> statements.
> I do it by creating string variables.
>
> vars:XSTR("");
>
> if soandso then begin
>   exitlong("PT") at profittartget limit;XSTR="PT";
> end;
>
> if soandso then begin
>   exitlong("STP") at stoploss stop;XSTR="SPT";
> end;
>
> if XSTR="PT" then .......
>
> Ian Waugh wrote:
>
> > I'm struggling with a bit of code. Would greatly appreciate assistance
> > from anyone who's been there, done that...
> >
> > I have two exits:
> >
> > exitlong("PT") at profittartget limit;
> > exitlong("STP") at stoploss stop;
> >
> > I want to set a flag *only* if the profit exit is taken. This could be
> > on the next bar or the next time through the code. I'm not expecting to
> > know ahead of time if the PT will be hit. However, this would seem to
> > require knowing which exit was taken. I know how to reference an exit to
> > an entry but is there a way to reference the exit?
> >
> > Ian