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

Re: EasyLanguage: Executing stop orders in a system



PureBytes Links

Trading Reference Links

First, you can not scale out of a single entry this way.  TS won't let you.
You need to use multiple entries and exit each one separately.  

Second, your Condition2 statement is doing exactly what it is supposed to
do.  It exits all current contracts.


At 03:06 AM 3/14/99 -0500, you wrote:
>The folowing code is executed only once when an entry condition is met
>
>*******
>if Condition1 then
>begin
>      Buy("B") 3 contracts on Close;
>      Exitlong("R1") 1 contracts at (Close - 1.50) stop;
>      Exitlong("R2") 1 contracts at (Close - 2.50) stop;
>      Exitlong("R3") 1 contracts at (Close - 4.25) stop;
>end
>
>if Condition2 then
>    Exitlong("C") CurrentContracts contracts on close;
>*****
>I do not know why TS4.0 is not executing exit order the right way e.g.
>
>when Close at entry = $50.00 it should exit as folows:
>1 contract at $48.50
>1 contract at $47.50
>1 contract at $45.75
>
>but instead it exites all contracts when the Condition2 is met and it is way
>below stop levels e.g. $42.00 eqals -$8.00
>
>the system log looks like this
>07/01/97    $50.00    3    B
>08/15/97    $42.00    3    C
>
>when it should look like this
>07/01/97    $50.00    3    B
>07/07/97    $48.50    1    R1
>07/10/97    $47.50    1    R2
>07/01/97    $45.75    1    R3
>
>What am I doing wrong?
>
>Thank Andrew
>
>
>

William Brower
Publisher of TS Express 
Email: 1000mileman@xxxxxxxxxxxxxx
Web: http://www.insideedgesystems.com