A:=AMOUNT/V/100;
VARA:=EMA((((A-EMA(A,13))/EMA(A,13))*(0-100)),5);
操盤線:=EMA(((VARA/10)+EMA(A,10)),3);
行情線:=EMA(A,3);
重心:=(C+0.618*REF(C,1)+0.382*REF(C,2)+0.236*REF(C,3)+0.146*REF(C,4))/2.382;
趨勢線:EMA(((SLOPE(C,22)*20)+C),55),coloryellow,LINETHICK2;
紅升:IF(重心>=趨勢線,趨勢線,DRAWNULL),colorred,LINETHICK2;
藍降:IF(重心<趨勢線,趨勢線,DRAWNULL),colorgreen,LINETHICK2;
STICKLINE(行情線<操盤線,H,L,0,1),colorgreen;
STICKLINE(行情線<操盤線,C,O,2,1),colorgreen;
STICKLINE(行情線>=操盤線,H,L,0,1),colorred;
STICKLINE(行情線>=操盤線,C,O,2,1),colorred;
DA:=(EMA(C,1)+EMA(C,2)+EMA(C,3)+EMA(C,4))/4;
DB:=(EMA(C,10)+EMA(C,20)+EMA(C,40)+EMA(C,80))/4;
DRAWTEXT(CROSS(DA-DB,0),L*0.98,'★B'),colorred;
JH:=SMA(MAX(C-REF(C,1),0),5,1)/SMA(ABS(C-REF(C,1)),5,1)*100;
DRAWTEXT(CROSS(84,JH),H*1.02,'☆S'),colorgreen;
買點:=CROSS(DA-DB,0) AND C>趨勢線 AND 行情線>=操盤線;
STICKLINE(買點,L,L*0.96,2,0),coloryellow;
DRAWTEXT(買點,L*0.95,'買點'),colorred;