0215紙漿行情回放 vwma變色線指標分享 通達信文華源碼在簡介

SMA30:=SMA(C,30,1);
變色線:SUM((H+L+C)/3*V,34)/SUM(V,34);
//VWAP:(SUM((H+L+C)/3*VOL,35))/SUM(VOL,35);
XCLOSE2:=EMA2((OPEN+HIGH+LOW+CLOSE)/4,3);
PARTLINE1((變色線>=XCLOSE2),變色線),LINETHICK3,COLORGREEN;
PARTLINE1((變色線<XCLOSE2),變色線),LINETHICK3,COLORRED;
N:=14;
P:=3;
TR1:=MAX(MAX((H-L),ABS(REF(CLOSE,1)-H)),ABS(REF(CLOSE,1)-L));
ATR:=MA(TR1,N);
VAR1:=IF(C>=HHV(C,24) AND L>LLV(L,12),1,0);
VAR2:=IF(C<=LLV(C,24) AND H<HHV(H,12),1,0);
VAR3:=HHV(MA(H,2),24)-P*ATR;
VAR4:=LLV(MA(L,2),24)+P*ATR;
SSTOP:=IF(VAR1,VAR3,REF(VAR3,BARSLAST(VAR1=1))),COLORGREEN;
XSTOP:=IF(VAR2,VAR4,REF(VAR4,BARSLAST(VAR2=1))),COLORRED;
//M1:IFELSE(XSTOP>C,XSTOP,NULL),COLORRED;
//M2:IFELSE(C<SSTOP,SSTOP,NULL),COLORGREEN;
LC :=REF(CLOSE,14);
RSI1:=SMA(MAX(CLOSE-LC,0),10,1)/SMA(ABS(CLOSE-LC),10,1)*100;
DRAWICON(CROSS(RSI1,20) AND (C>變色線),L,4);
DRAWICON(CROSS(80,RSI1) AND (C<變色線),H,5);
N:=25;
增倉上漲:OPI>REF(OPI,N) AND VOL>REF(VOL,N) AND C>REF(C,N),COLORRED;
增倉下跌:OPI>REF(OPI,N) AND VOL>REF(VOL,N) AND C<REF(C,N),COLORGREEN;
減倉上漲:OPI<REF(OPI,N) AND VOL<REF(VOL,N) AND C>REF(C,N),COLORRED;
減倉下跌:OPI<REF(OPI,N) AND VOL<REF(VOL,N) AND C<REF(C,N),COLORGREEN;