I have only this of TS2000. (sorry Google Translator)
Frank
-----------------------------
INPUT: LENGTH (21), CONST(4);
vaR: SWITCH(1), TR(0), ARC(0), SAR(0),HISIC(0),LOSIC(0);
TR= VOLATILITY (LENGTH);
ARC= TR* CONST;
IF CURRENTbar = length then begin
hisic=typicalprice;
losic=typicalprice;
if h>= xaverage (h,length-1) [1] then begin
hisic= highest(typicalprice,length);
Sar=hisic-arc;
switch= 1;
end;
if l <= xaverage (l,length-1) [1] then begin
losic= lowest (typicalprice,length);
sar = losic +arc;
switch=0;
end;
end;
if switch =1 then begin
if typicalprice>hisic then hisic=typicalprice;
sar=hisic - arc;
if typicalprice< sar then begin
switch=0;
losic=typicalprice;
sar = losic + arc;
end;
end;
if switch=0 then begin
if typicalprice< losic then losic=typicalprice;
sar= losic +arc;
if typicalprice> sar then begin
switch=1;
hisic=typicalprice;
saR=HISIC- ARC;
END;
END;
IF C > SAR { AND C[1] < SAR } THEN begin
Plot1(SAR,"V1");
if _DStoc(10)<6 then begin
setplotcolor(1,cyan);
alert ("L O N G - E N T R Y" +" "+ numtostr((high+low)/2,2));
end;
end;
IF C < SAR { AND C[1] > SAR} THEN begin
Plot2(sar,"V1");
if _DStoc(10)>94 then begin
setplotcolor(2,magenta);
alert ("S H O R T - E N T R Y" +" "+ numtostr((high+low)/2,2));
end;
end;
--------------------------------------