Tradestation User Group Germany (http://www.tradernet.org/wbb/index.php)
|- Posts aus dem alten Userforum (http://www.tradernet.org/wbb/board.php?boardid=15)
|-- EL code für Standard Deviation Stop (http://www.tradernet.org/wbb/threadid.php?boardid=15&threadid=431)


Geschrieben von _ulrich am 01.07.2001, 21:10:

  EL code für Standard Deviation Stop

hallo, kenn jemand den el code für den sdv stop von cynthia kase? habe schon das problem einen true range für mehr als einen tag zu erzeugen der dann rückwärts über die vergangen bar läuft um den true range wert zu bestimmen. true range ist in diesem fall das höchste hoch der letzten (n) tage abzüglich des tiefsten tiefs. wobei 1 tag kein poblem ist ich aber 2 oder 3 tage benutzen möchte.

daraus einen durchschitt für die letzten 30 werte diese true range bilden möchte und dann mit der passen den sdev damit den ausstiegspunkt (stop) festlegen kann. anbei die orginal beschreibung. ich habe damit das wochenende verbacht ohnen nur nennens werte ansätzt zu stande gebracht zu haben. für ideen und anregungen wäre ich sehr dankbar.

Standard Deviation Stop

As a sound statistical measurement of risk, the standard deviation can be used to determine stop-loss levels. In a method called the Dev-stop, Cynthia Kase uses the following steps to create stop-loss levels for both long and short positions:

1. Calculate the true range (TR) of the past 2 trading days using the highest high and lowest low of the 2-day period.
2. Calculate the moving average ATR of TR (in step 1), using 30 periods for intraday charts and 20 periods for daily charts.
3. Calculate the standard deviation of the true ranges in step 1 using the same period as in step 2.
4. The stop-loss values are DDEV = ATR + (ƒ*SDEV), where ƒ = 1, 2.06 to 2.25, and 3.20 to 3.50, and where the larger values of the pairs correct for skew and the larger numbers allow for larger risk.
5. The dev-stop for long positions is Trade high - DDEV; the dev-stop for short positions is Trade low + DDEV.

This method adjusts for volatility using standard statistical measurement and is applied to the extreme profit of a trade to prevent unnecessary loss of equity.


Geschrieben von _micha am 10.07.2001, 15:10:

  RE: EL code für Standard Deviation Stop

heya,

{***************************************}
Input:Mult(1);{multiplier from step4}
vars: TR(0), ATR(0), Dev1(0), SLoss(0);
tr=(highest(h, 2)-lowest(l, 2));
atr=average(tr, 20);{use 30 for intraday}
dev1=stddev(tr, 20);{use 30 for intraday}
sloss=atr+mult*dev1;
exitlong maxcontractprofit-sloss stop;
exitshort maxcontractprofit+sloss stop;
{**************************************}
nicht verified. lass mal hörn obs geht.

micha

Powered by: Burning Board 1.1.1 © 2001 by WoltLab