软件名称:[B]考夫曼自适应均线[/B]
软件类型:国产软件
运行环境:Win9X/2000/XP/2003/
软件语言:简体中文
授权方式:解密版
软件大小:2.00 KB
官方主页:Home Page
更新时间:2009-05-11 14:09:13
软件简介:
{考夫曼自适应均线}
input: n(9,1,60), p(2,1,60), Q(30,1,60);
Direction:=CLOSE - REF( CLOSE , N ) ;
XX:=ABS( CLOSE - REF( CLOSE , 1 ) ) ;
Volatility:=SUM( XX , N ) ;
ER:=ABS( Direction / Volatility ) ;
FastC:= 2 / ( p + 1 ) ;
SlowC:= 2 / ( q + 1 ) ;
SSC:=ER * ( FastC - SlowC ) + SlowC ;
Constant :SSC * SSC , Linethick0 ;
YY:=REF( Close , 1 ) + Constant * ( CLOSE - REF( Close , 1 ) ) ;
AA:=IF( SUM( 1 , 0 )= N + 1 , YY , 0 ) ;
BB:=BarsLast( AA>0 ) ;
DD:=REF( C , BB ) ;
CC:CLOSE , Linethick0 ;
for m=N + 2 to DATACOUNT DO
DD[m]:=DD[m - 1] + Constant[m] * ( CC[m] - DD[m - 1] );
AMA:DD;
T1:=DD>REF(DD,1);
T3:=NOT(T1) AND abs(DD-ref(DD,1))/DD*10000<N;
T2:=NOT(T1 OR T3);
PARTLINE(T1,DD),COLORRED,LINETHICK2;
PARTLINE(T2,DD),COLORGREEN,LINETHICK2;
PARTLINE(T3,DD),COLORBLUE,LINETHICK2;
DRAWTEXT(ISLASTBAR AND T1,DD,'持\n股'),COLORRED,SHIFT1;
DRAWTEXT(ISLASTBAR AND T2,DD,'持\n币'),COLORGREEN,SHIFT1;
DRAWTEXT(ISLASTBAR AND T3,DD,'观\n望'),COLORBLUE,SHIFT1;
[url=http://www.70822.com/soft/sort013/sort02/down-4774.html]考夫曼自适应均线[/url]