PureBytes Links
Trading Reference Links
|
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
|