上收:=C;
上開:=O;
上高:=H;
上低:=L;
上箱頂:MA(REF(HHV(上收,21),1),4),COLORFF00FF,LINETHICK2;
下箱底:MA(REF(LLV(上收,21),1),5),COLOR00FF00 ,LINETHICK2 ;
趨勢生命線:MA(CLOSE,55),LINETHICK0,COLORFF0000;
FF:=EMA(CLOSE,2);
MA15:=EMA(CLOSE,21);
AA:=(CLOSE - MA15);
STICKLINE((MA15 > REF(MA15,1)),MA15,MA15,3.5,5),LINETHICK2,COLORRED;
STICKLINE((MA15 < REF(MA15,1)),MA15,MA15,3.5,5),LINETHICK2,COLOR00FF00;
STICKLINE(C< 下箱底 AND C<=O,C,O,3.5,0),COLOR00FFFF;
STICKLINE(C< 下箱底 AND C>O,C,O,3.5,0),COLOR00FFFF;
STICKLINE(C< 下箱底 AND C<=O,C,O,1.5,0),COLOR00FFFF;
STICKLINE(C< 下箱底 AND C<=O,H,L,0,0),COLOR00FFFF;
STICKLINE(C< 下箱底 AND C>O,C,H,0,0),COLOR00FFFF;
STICKLINE(C< 下箱底 AND C>O,O,L,0,0),COLORRED;
短線精靈:=(上開+上高+上低)/3;
遍地黃金:=EMA(短線精靈,2);
黃金遍地:遍地黃金,COLOR808088,LINETHICK0;
買進價:=((C-REF(MA(C,6),1))/6+MA(C,6))*1.03;
買進條件:=CROSS(C,買進價) AND 買進價>REF(買進價,1);
STICKLINE(買進條件 AND FF>下箱底 AND C>REF(下箱底,1),L,L*0.998,5,0),COLOR00FFFF,LINETHICK2;
STICKLINE(C>=買進價 AND C>=O,C,O,3.5,0),COLORRED;
STICKLINE(C>=買進價 AND C>=O,C,O,0.2,0),COLOR00FFFF;
STICKLINE(C>=買進價 AND C>=O,C,O,0.2,0),COLOR00FFFF;
STICKLINE(C>=買進價 AND C>=O,H,L,0,0),COLOR00FFFF;
STICKLINE(C>買進價 AND C<=O,H,L,0,0),COLOR00FF00;
VAR1:=(上收-LLV(上低,27))/(HHV(上高,27)-LLV(上低,27))*100;
VAR2:=SMA(VAR1,3,1);
VAR3:=SMA(VAR2,3,1);
VAR4:=SMA(VAR3,3,1);
DRAWTEXT(FILTER((CROSS(VAR3,VAR4) AND VAR3< 40),34),下箱底,'買進'),COLORF00FF0;
DRAWTEXT(FILTER((CROSS(VAR4,VAR3) AND VAR4>75),34) ,上箱頂*1.02,'賣岀'),COLORF0F000;