gitee.com/quant1x/engine@v1.8.4/factors/feature_misc_bdl.tdx (about)

     1  TYPICAL_PRICE:=(OPEN+CLOSE+HIGH+LOW)/4;
     2  METHOD:=EMA(TYPICAL_PRICE,N);
     3  APPLY_TO:=TYPICAL_PRICE;
     4  
     5  MYSTDDEV:=SQRT(SUM(POW(APPLY_TO-METHOD,2),N)/N);
     6  MAXB:=HHV(MYSTDDEV,M);
     7  MINB:=LLV(MYSTDDEV,M);
     8  VIX:100*(MYSTDDEV-MINB)/(MAXB-MINB);
     9  10,DOTLINE,COLORGREEN;
    10  50,DOTLINE,COLORYELLOW;