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

Re: CL_anchoring a limit order to the closing price of a specific bar



PureBytes Links

Trading Reference Links


Inputs:
Price(C),
Length(10),
Mult_Val(5);

Var:
Trigger(FALSE);


If Price > Average(Price, Length) + (3 * Mult_Val) and
    Trigger = FALSE Then begin

    Buy next bar at close - 10 points limit;
    Trigger = TRUE;

End;


If Price < Average(Price, Length) then begin

    ExitLong next bar at market;
    Trigger = FALSE;

End;




----- Original Message -----
From: matt carroll <carrollm@xxxxxxxxxx>
To: <code-list@xxxxxxxxxxxxx>; <omega-list@xxxxxxxxxx>
Sent: Thursday, July 22, 1999 8:07 PM
Subject: CL_anchoring a limit order to the closing price of a specific bar


> I am trying anchor a limit order to the first bar that meeets the criteria
> for the included system to go long/short.  For example: if the system
> generates a short order after bar 5, I wish for the sytem to place a limit
> order of: Sell at(closing price of bar 5 + 10 points)limit.  This criteia
> may or may not be met by the next bar.  If not, I wish for the order to
stay
> open until the criteria based on bar 5 is met.  The system currently
> references the current bar of the system which may or may not be the bar
> that first met the criteria of the system.  Any help is appreciated.
>
> Matt
> -----------------------------
> inputs:length(10);
>
> Value1 = Average(Close,length);
> Value2 = 5
>
> Value3 = Value1 + (3 * Value2);
>
> If Close > Value3 Then Buy next bar at close - 10 points limit;
>
> If Close < Average(Close,length) then ExitLong next bar at market;
>
> End;
>
>
>
> - Subscription Information link -
> http://www.markbrown.com/list.htm
>