代碼分享 通達(dá)信持股線轉(zhuǎn)文華主圖公式

均價(jià):=(0.618*(0.809*C+0.191*O)+0.382*(IF(H=C,C,H)+IF(L=C,C,L))/2);
AMOUNT:=C*V;
CAPITAL:=OPI;
LJ:=(AMOUNT/(V*100)+均價(jià))/2;
HS1:=SUMBARS(V,CAPITAL*0.382),LINETHICK1;
HS2:=SUMBARS(V,CAPITAL*1.618),LINETHICK1;
HSC:=3*MA(LJ,HS1)-2*MA(LJ,HS2),COLORDD8758;
價(jià)線:=(WMA(HSC,1)*0.618+(WMA(HSC,3)+WMA(HSC,6))/2+WMA(HSC,8)*0.382)/2,COLOR1318FF;
HSV:=3*MA(V/CAPITAL*100,HS1)-2*MA(V/CAPITAL*100,HS2),COLORWHITE;
換手線:=(WMA(HSV,1)*0.618+(WMA(HSV,3)+WMA(HSV,6))/2+WMA(HSV,8)*0.382)/2,COLORMAGENTA;
資金線:=(SUM(AMOUNT,5)*0.618+(SUM(AMOUNT,11)+SUM(AMOUNT,15))/2+SUM(AMOUNT,21)*0.382)/2;
量線:=(SUM(V,5)*0.618+(SUM(V,11)+SUM(V,15))/2+SUM(V,21)*0.382)/2;
牛熊線:(WMA(資金線/(量線*100),5)*0.618+(WMA(資金線/(量線*100),11)+WMA(資金線/(量線*100),15))/2+WMA(資金線/(量線*100),21)*0.382)/2*100;
//PARTLINE((HSC>價(jià)線 OR HSV>換手線) AND C>持股線,持股線),COLOR1318FF,LINETHICK2;
IF(牛熊線<=REF(牛熊線,1),牛熊線,NULL),LINETHICK3,COLORGREEN;
IF(牛熊線>REF(牛熊線,1),牛熊線,NULL),LINETHICK3,COLORRED;