{周期放大開關(guān):1為普通模式,0為放大模式}
倍數(shù):=
IF(PERIOD=11,1,{年}
IF(PERIOD=10,4,{季}
IF(PERIOD=9,6, {多日}
IF(PERIOD=8,10,{多分鐘}
IF(PERIOD=7,12,{月}
IF(PERIOD=6,5, {周}
IF(PERIOD=5,5, {日}
IF(PERIOD=4,4, {60F}
IF(PERIOD=3,8, {30F}
IF(PERIOD=2,4, {15F}
IF(PERIOD=1,6, {5F}
IF(PERIOD=0,5, {1F}
1))))))))))));
N1:=IF(周期放大,12,12*倍數(shù));
N2:=IF(周期放大,26,26*倍數(shù));
N3:=IF(周期放大,9,9*倍數(shù));
DIFF:EMA(CLOSE,N1) - EMA(CLOSE,N2),COLORWHITE,NODRAW;
DEA:EMA(DIFF,N3),COLORYELLOW,NODRAW;
MACD: (DIFF-DEA)*2,COLORSTICK,NODRAW;
紅柱面積:IF(MACD>0,SUM(MACD,BARSLAST(MACD<0)),0),NODRAW,COLORRED;
綠柱面積:ABS(IF(MACD<0,SUM(MACD,BARSLAST(MACD>0)),0)),NODRAW,COLORLIGREEN;
MACD面積:=IF(MACD>0,紅柱面積,綠柱面積),NODRAW,COLORFFFF00;
位置:=MAX(HHV(DIFF,100),ABS(LLV(DIFF,100)));
{柱變與交叉臨界}
開盤價格:=O,COLORYELLOW,NODRAW;
收盤價格:=C,COLORYELLOW,NODRAW;
最高價格:=H,COLORYELLOW,NODRAW;
最低價格:=L,COLORYELLOW,NODRAW;
振幅:=(H-L)/REF(C,1)*100,COLORYELLOW,NODRAW;
柱變臨界:REF((EMA(CLOSE,12)*1134-EMA(CLOSE,26)*910-DEA*702)/224,1),COLORLIMAGENTA,NODRAW;
交叉臨界:351/28*(EMA(REF(DIFF,1),9)-11/13*EMA(REF(C,1),12)+25/27*EMA(REF(C,1),26)),COLORLIMAGENTA,NODRAW;
明日柱變臨界:
明日交叉臨界:351/28*(EMA(DIFF,9)-11/13*EMA(C,12)+25/27*EMA(C,26)),COLORLIBLUE,NODRAW;
{MACD重建-避免遮擋}
STICKLINE(MACD>0,0,MACD,1,0),COLORRED;
STICKLINE(MACD<0,0,MACD,1,0),COLORGREEN;
STICKLINE(MACD>0 ANDMACD<=REF(MACD,1),0,MACD,1,0),COLORYELLOW;
STICKLINE(MACD<0 ANDMACD>=REF(MACD,1),0,MACD,1,0),COLORWHITE;
NOTEXTDIFF:EMA(CLOSE,N1) - EMA(CLOSE,N2),COLORWHITE;
NOTEXTDEA:EMA(DIFF,N3),COLORYELLOW;
{數(shù)顯開關(guān):1為打開,0為關(guān)閉}
DRAWNUMBER(數(shù)顯開關(guān)=1 ANDLONGCROSS(DEA,DIFF,3),位置*0.8,REF(紅柱面積,1)),COLORRED;
DRAWNUMBER(數(shù)顯開關(guān)=1 ANDLONGCROSS(DIFF,DEA,3),0-位置*0.5,REF(綠柱面積,1)),COLORGREEN;
NOTEXTLMH: DRAWNUMBER(數(shù)顯開關(guān)=1 AND ISLASTBAR ANDMACD>0,位置*0.8,紅柱面積),COLORRED;
NOTEXTLML: DRAWNUMBER(數(shù)顯開關(guān)=1 AND ISLASTBAR ANDMACD<0,0-位置*0.5,綠柱面積),COLORGREEN;
聯(lián)系客服