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

Re: EL Help Please



PureBytes Links

Trading Reference Links

>TS 4.0 Build 19.6
>Market:  S&P future
>Compression:  1 Minute

>As an example:
>The system generates a buy order at 1150.00 on the close of a bar.

>The next bar doesn't get to 1150.00 so the order isn't filled.
>The next bar goes through 1150.00 but no entry is indicated.
>
>I would like the code to leave the order price in the market until it is hit.

The following should do what you want.

var: buyPrice(0);

if ... then begin
   { buy signal, set buy price }
    buyPrice = 1150;
end;

if buyPrice <> 0 then begin
   { buy signal set, this order is given every bar until filled
     or buyPrice is set to 0 (which cancels the order }
   buy 1 contract at buyPrice limit;
end;

if marketposition = 1 then begin
   { cancel buy signal }
   buyPrice = 0;
end;
>
>Any help or direction would be greatly appreciated. TIA
>
>Rod Wheeler
>