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

Re[2]: old-school easylanguage question



PureBytes Links

Trading Reference Links

Hello Philip,
Sorry I can't test that code for you at the moment my Tradestation
computer is having boot problems, from memory when I was testing that
exit with various entries I don't recall ever having an entry on the
same bar as the exit.
Probably my entries were not in the same range as the exits.
You could create two line indicators, one showing your entry values
and the other that shows your exit values, if the entry values are
below the exit values for a long trade TS will exit and buy right back
in on the same bar.
Best regards,
SC

PL> Thanks SC,

PL> But I don't think this does exactly what I need - or maybe I'm missing the 
PL> point?.  Trying to find a way to lock out additional trades within the bar, 
PL> once the "intended" trade (an exit) has happened.  You would think 
PL> BarsSinceExit or something would do it.  But apparently TS doesn't update 
PL> BarsSinceExit and the like until the "end" of the bar, after the extra trade 
PL> has already happened. Does the Ask. Mr. Easylanguage book cover this kind of 
PL> stuff?

PL> Best regards,
PL> Phil

PL> ----- Original Message ----- 
PL> From: "SC" <secaseba@xxxxxxxxxx>
PL> To: "Philip Lane" <philtronics@xxxxxxxxxxx>
PL> Cc: <omega-list@xxxxxxxxxx>
PL> Sent: Friday, December 26, 2008 8:37 PM
PL> Subject: Re: old-school easylanguage question


>> Hello Philip,
>> My version of the TS4 built in $Risk Stop
>> If MarketPosition(0)=1 then ExitLong at MaxPositionProfit(0)-stp limit;
>> If MarketPosition(0)=-1 then ExitShort at MaxPositionProfit(0)+stp stop;
>>
>> You should be able to add your AvgTrueRange calc. into the stp amount.
>> Best regards
>> SC
>>
>> PL> How to prevent a round trip on a stops on a daily bar?  I can't 
>> remember the
>> PL> trick.  Barssinceentry doesn't do it.
>> PL> Here's a picture and some code:
>> PL> http://www.gigascanner.com/002.gif
>> PL> {if (in=0 or in=-1) then begin}
>> PL> buy ("long") 10000/c shares value17 stop;
>> if (high >>= value17) then in=1;
>> PL> if (in=1 and barssinceentry>1) then exitlong
>> PL> value17/(1+factor*AvgTrueRange(5)/100) stop;
>> PL> if (low <= value17/(1+factor*AvgTrueRange(5)/100) and 
>> barssinceentry>-1)
>> PL> then in = 0;
>> PL> Thank you,
>> PL> Phil
>>