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

Re: Exit Coding Help



PureBytes Links

Trading Reference Links

Hello Joseph,

Tuesday, July 15, 2003, 4:44:18 AM, you wrote:

SJE> I could use some assistance coding the following exit for TS2k:

SJE> After entering a long position, I would like to take profits at the high of
SJE> the bar I entered on and take a loss at the low of the bar I entered on.  

SJE> Could someone please show me how to do this?  Thank you very much.

SJE> Joe

Array: exHi[99999](0), exLo[0](0);

If MarketPosition = 1 then begin
   If BarsSinceEntry = 0 then begin
      exHi[0] = H;
      exLo[0] = L;
   end;
   ExitLong("exHigh") exHi[0] Limit;
   ExitLong("exLow") exLo[0] stop;
end;
If MarketPosition = 0 then begin
   exHi[0] = 99999;
   exLo[0] = 0;
end;



-- 
Best regards,
 jon                            mailto:jonmac@xxxxxxxxxxx