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

Re: old-school easylanguage question


  • To: "secaseba" <secaseba@xxxxxxxxxx>
  • Subject: Re: old-school easylanguage question
  • From: "Philip Lane" <philtronics@xxxxxxxxxxx>
  • Date: Sat, 27 Dec 2008 06:58:27 -0800
  • Organization: Philtronics Worldwide Enterprises

PureBytes Links

Trading Reference Links

Thanks SC,

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

Best regards,
Phil

----- Original Message ----- From: "SC" <secaseba@xxxxxxxxxx>
To: "Philip Lane" <philtronics@xxxxxxxxxxx>
Cc: <omega-list@xxxxxxxxxx>
Sent: Friday, December 26, 2008 8:37 PM
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