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

Re: "sellshort" in TS4 easy language



PureBytes Links

Trading Reference Links

Change SellShort to just "sell"
Change buytocover to just "exitshort"

See what happens next.



----- Original Message -----
From: "jbclem" <jbclem@xxxxxxxxxxxxx>
To: "Omega List" <omega-list@xxxxxxxxxx>
Sent: Thursday, December 26, 2002 1:00 AM
Subject: "sellshort" in TS4 easy language


> I'm trying to verify an indicator and it won't verify because of the
> following words.  I'm supposing that the indicator was written with
TS2000i
> and I would like to know someone would help me translate this into TS4
easy
> language.
>
> "sellshort" is a word not recognized by easy language.  Below is the
actual
> usage(a part of the formula):
>
> If Time > 1500 and Time < 1515 then begin
> If Condition1 = True or Condition4 = true then Buy("LO-L") next bar at
> Value2 stop;
> If Condition2 = True or Condition5 = true then SellShort("LO-S") next bar
at
> Value3 stop;
> End;
>
>
> Another word not verifying is "buytocover". As in:
>
> If Time = 1600 then
> begin
> Sell this bar on Close ;
> Buytocover  this bar on Close ;
> Condition1 = False;
> Condition2 = False;
> Condition4 = False;
> Condition5 = False;
> Condition6 = False;
> Condition7 = False;
> End;
>
> Another one: "MarketPosition"...error is " position information function
not
> allowed in a study".  As in:
>
> If Time > 1520 and Time < 1555 then begin
> Condition6 = H[0] > H[1] and H[1] > H[2] and H[2] > H[3] and L[0] > L[1]
> and L[1] > L[2] and L[2] > L[3];
> Condition7 = H[0] < H[1] and H[1] < H[2] and H[2] < H[3] and L[0] < L[1]
> and L[1] < L[2] and L[2] < L[3];
> If MarketPosition(0) = 1 and OpenPositionProfit < 1 and Condition7 = true
> then Sell next bar at L stop;
> If MarketPosition(0) = -1 and OpenPositionProfit < 1 and Condition6 = true
> then BuyToCover next bar at H stop;
> End;
>
> Without checking further I think "OpenPositionProfit" would probably also
> generate the above error message.
>
> The complete formula is attached.  It came from TradestationWorld.  Is it
> possible to make this work in TS4?
>
> John
>
>
>
>
>
>