最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 飞狐适应均线主图指标公式

    正文概述    2024-04-14 15:38:43  

    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 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,'持 股'),COLORRED,SHIFT1;
    DRAWTEXT(ISLASTBAR AND T2,DD,'持 币'),COLORGREEN,SHIFT1;
    DRAWTEXT(ISLASTBAR AND T3,DD,'观 望'),COLORBLUE,SHIFT1;


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 飞狐适应均线主图指标公式 加入收藏