以下是通达信波动率副图公式源码和截图
通达信江恩波动率副图公式源码:
DV:=CONST(IF(ISLASTBAR,HHV(V,200),DRAWNULL));
LBD:=SUM(EMA(V-MA(V,20),3),3);
JBD:=SUM(EMA(C-MA(C,20),3),3);
量波动:(LBD-LLV(LBD,200))/(HHV(LBD,200)-LLV(LBD,200))*DV;
价波动:(JBD-LLV(JBD,200))/(HHV(JBD,200)-LLV(JBD,200))*DV;
N:=17;
GDFZ0:=C;
GDFZ1:=H;
GDFZ2:=L;
TYA:=((((((((((GDFZ2+GDFZ1)+GDFZ0)+REF(GDFZ0,1))+REF(GDFZ2,1))+REF(GDFZ1,1))+REF(GDFZ0,2))+REF(GDFZ2,2))+REF(GDFZ1,2))/9));
HDA:=(((((HHV(TYA,(17*2))+REF(HHV(TYA,(17*2)),1))+REF(HHV(TYA,(17*2)),2))+REF(HHV(TYA,(17*2)),3))+REF(HHV(TYA,(17*2)),4))/5);
LDA:=(((((LLV(TYA,(17*2))+REF(LLV(TYA,(17*2)),1))+REF(LLV(TYA,(17*2)),2))+REF(LLV(TYA,(17*2)),3))+REF(LLV(TYA,(17*2)),4))/5);
A1:=(REF(HDA,1)=(HHV(TYA,((2*N)+0))));
B1:=(FILTER(A1,N));
HD:=(FILTER(B1,N));
A2:=(REF(LDA,1)=(LLV(TYA,((2*N)+0))));
B2:=(FILTER(A2,N));
LD:=(FILTER(B2,N));
A:=(REF(HDA,BArslAst(HD)));
B:=(REF(LDA,BARSLAST(LD)));
T1:=((BARSLAST(HD) BARSLAST(LD))AND(NOT(HD)));
T2:=((BARSLAST(HD) BARSLAST(LD))AND(NOT(LD)));
BF:=IF(T1,A,A);
HH:=ma(BF,1);
BG:=IF(T2,B,B);
LL:=MA(BG,1);
HH1:=(BARSLAST((GDFZ0 (REF(HH,1)*1.003))));
LL1:=(BARSLAST((GDFZ0 (REF(LL,1)*0.997))));
IF((HH1 LL1),LL,DRAWNULL),,COLOR00FFFF;
IF((HH1 LL1),HH,DRAWNULL),LINETHICK2,COLORFFFFFF;
DRAWICON(crOSS(HH1,LL1),HH,2);
DRAWICON(CROSS(LL1,HH1),LL,1);
STICKLINE((HH1 LL1),OPEN,CLOSE,3,0),COLORRED;
STICKLINE((HH1 LL1),HIGH,LOW,0,0),COLORRED;
STICKLINE((HH1 LL1),OPEN,CLOSE,3,0),COLORFF00FF;
STICKLINE((HH1 LL1),HIGH,LOW,0,0),COLORFF00FF;
A11:=IF((REF(CLOSE,7) REF(CLOSE,6)),64,0);
A22:=IF((REF(CLOSE,6) REF(CLOSE,5)),32,0);
A33:=IF((REF(CLOSE,5) REF(CLOSE,4)),16,0);
A44:=IF((REF(CLOSE,4) REF(CLOSE,3)),8,0);
A55:=IF((REF(CLOSE,3) REF(CLOSE,2)),4,0);
A66:=IF((REF(CLOSE,2) REF(CLOSE,1)),2,0);
A77:=IF((REF(CLOSE,1) CLOSE),1,0);
TT:=(A11+A22+A33+A44+A55+A66+A77);
A1:=IF((REF(CLOSE,7) REF(CLOSE,6)),1,0);
A2:=IF((REF(CLOSE,6) REF(CLOSE,5)),2,0);
A3:=IF((REF(CLOSE,5) REF(CLOSE,4)),4,0);
A4:=IF((REF(CLOSE,4) REF(CLOSE,3)),8,0);
A5:=IF((REF(CLOSE,3) REF(CLOSE,2)),16,0);
A6:=IF((REF(CLOSE,2) REF(CLOSE,1)),32,0);
A7:=IF((REF(CLOSE,1) CLOSE),64,0);
ZY:=(A1+A2+A3+A4+A5+A6+A7);
红波:EMA(ZY,3),COLORRED,LINETHICK1;
白波:EMA(TT,3);
{MA5:=MA(C,5);
A51:=REF(MA5,1)*0.98;
A52:=REF(MA5,2)*0.98;
B52:=BARSLAST(REF(C,2) =REF(MA5,2)ANDREF(C,1) REF(MA5,1))+2;
B51:=BARSLAST(REF(C,2) =REF(MA5,2)ANDREF(C,1) REF(MA5,1))+1;
DZ:=IF((REF(C,2) =REF(MA5,2))AND(REF(C,1) REF(MA5,1)),IF(REF(MA5,2) REF(MA5,1),A51,A52),IF(BARSSINCE(REF(C,2) =REF(MA5,2)ANDREF(C,1) REF(MA5,1)) 0,IF(REF(MA5,B52) REF(MA5,B51),REF(MA5,B51)*0.98,REF(MA5,B52)*0.98),REF(MA5,1)));
A:=LLV(REF(LOW,1),2)+(HHV(REF(HIGH,1),2)-LLV(REF(LOW,1),2))/2,COLORGREEN;
ZDF:=(C-REF(C,1))/REF(C,1)*100;STICKLINE(ZDF 9.8,O,C,3,0),COLOR0000FF;
吸筹1:(REF(C,1) REF(DZ,1)ANDC =DZANDC
吸筹2:(REF(C,1) REF(A,1)ANDC
吸筹次数1:COUNT(吸筹1,20);
吸筹次数2:COUNT(吸筹2,20);
SR1:=REF(HIGH,10)=HHV(HIGH,2*10+1);
SR2:=FILTER(SR1,10);
SR3:=BACKSET(SR2,10+1);
HDD:=FILTER(SR3,10);
前高:=REF(H,BARSLAST(HDD));
前高:CROSS(C,前高);
过左峰:=突破前高;
突破次数:COUNT(过左峰,30);}
{AA11:=REF(EMA(C,14),1);
A1X:=(EMA(C,14)-AA11)/AA11*100,NODRAW;
CYA:=WINNER(C)*100;
CYB:=EMA(CYA,10);
AS:=CYA-CYB;
A1A:=MA(AS,10);
粉嫩:CROSS(A1X,0)ANDCROSS(AS,A1A);
粉嫩次数:COUNT(粉嫩,10);}
2;
13.8;
20;
60;
80;
120;
通达信江恩波动率副图公式截图