以下是通达信涨跌幅度的妙用公式源码和截图
通达信涨跌幅度的妙用公式源码:
M1:=5;
M2:=10;
M3:=20;
M4:=60;
M5:=120;
M6:=250;
MA1:MA(CLOSE,M1);
MA2:MA(CLOSE,M2);
MA3:MA(CLOSE,M3);
MA4:MA(CLOSE,M4);
MA5:MA(CLOSE,M5);
MA6:MA(CLOSE,M6);
紫色:STICKLINE(C REF(C,1)*1.095,C,O,3,0),COLORFF00FF;
跌停蓝色:STICKLINE(REF(C,1) C*1.095,C,O,3,0),COLORBLUE;
涨跌幅度:=(C-OPEN)/OPEN*100;
涨幅度:=IF(涨跌幅度 =0,涨跌幅度,0),NODRAW;
跌幅度:=IF(涨跌幅度 0,涨跌幅度,0),NODRAW;
涨幅:SUM(涨幅度,N),COLORRED;
跌幅:SUM(跌幅度,N),COLORGREEN;
0,COLORGRAY;
DIF12:=(Ema(CLOSE,12)-EMA(CLOSE,26))/((EMA(CLOSE,12)+EMA(CLOSE,26))/2)*1000;
DEA12:=EMA(DIF12,9);
kdIF12:=3*(DIF12-DEA12);
KDEA12:=SMA(KDIF12,5,2);
微分DIF:=KDIF12*5,COLORWHITE,LINETHICK1;
微分DEA:=KDEA12*5,COLORYELLOW,LINETHICK1;
2:2*(微分DIF-微分DEA),COLORBLacK;
MAMACD:=MA(MACD2,3),,COLORBLACK;
stICKLINE(MACD2 REF(MACD2,1)ANDMACD2 0,0,MACD2,1,0),COLORRED;
STICKLINE(MACD2 =REF(MACD2,1)ANDMACD2 0,0,MACD2,1,0),COLORYELLOW;
STICKLINE(MACD2 REF(MACD2,1)ANDMACD2 0,0,MACD2,1,0),COLORCYAN;
STICKLINE(MACD2 =REF(MACD2,1)ANDMACD2 0,0,MACD2,1,0),COLORMAGENTA;
STICKLINE(MAMACD 1*REF(MAMACD,1),MAMACD,MACD2,3,0),COLORBLUE;
STICKLINE(MAMACD 1*REF(MAMACD,1),MAMACD,MACD2,3,0),COLORLIRED;
微分DIF2:KDIF12*5,COLORRED,LINETHICK1;
微分DEA2:KDEA12*5,COLORMAGENTA,LINETHICK1;
NOTEXT强:IF(微分DIF2 MA(微分DIF2,2),微分DIF2,DRAWNULL),COLORGREEN;
NOTEXT弱:IF(微分DEA2 MAX(微分DEA2,REF(微分DEA2,1)),微分DEA2,DRAWNULL),COLORYELLOW;
DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*300,COLORWHITE,DOTLINE;
DEA:=EMA(DIF,9),COLORYELLOW,DOTLINE;
DIF普:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA普:=EMA(DIF,9);
MACD:=(DIF普-DEA普)*2,COLORSTICK;
A1:=BArslAST(REF(crOSS("MACD.DIF","MACD.DEA"),1));
B1:=REF(C,A1+1) CANDREF("MACD.DIF",A1+1) "MACD.DIF"ANDCROSS("MACD.DIF","MACD.DEA");
{DRAWTEXT(B1 0,DIF*0.7,'↙MACD底背'),COLORFF00FF;}
C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));
D1:=REF(C,C1+1) CANDREF("MACD.DIF",C1+1) "MACD.DIF"ANDCROSS("MACD.DEA","MACD.DIF");
{DRAWTEXT(D1 0,DIF*1.2,'↙MACD顶离'),COLORBLUE;}{MACD顶}
JC:=DEA-DIF;
绿柱面积:=IF(MACD 0,SUM(MACD,BARSLAST(JC 0)),0);
红柱面积:=IF(MACD 0,SUM(MACD,BARSLAST(JC 0)),0);
本次最低价:=LLV(L,BARSLAST(JC
本次最高价:=HHV(H,BARSLAST(JC
X1:=IF(MACD 0,BARSLAST(CROSS(DIF,DEA)),0);
前次绿柱面积:=REF(绿柱面积,X1+1);
前次最低价:=REF(本次最低价,X1+1);
Y1:=IF((绿柱面积 0ANDAbs(绿柱面积)0,BARSLAST(CROSS(DEA,DIF)),0);
前次红柱面积:=REF(红柱面积,X2+1);
前次最高价:=REF(本次最高价,X2+1);
Y2:=IF((红柱面积 0AND红柱面积 前次红柱面积AND本次最高价 前次最高价),1,0);
RS2:=MACD 0ANDREF(MACD,1) 0ANDC 前次最高价ANDABS(红柱面积)CANDDEA 0ANDREF(MACD高,C1+1) MACD高ANDCROSS("MACD.DEA","MACD.DIF");
{DRAWTEXT(E 0,DIF*1.1,'↙柱顶背'),COLORRED;}
F:=REF(C,A1+1) CANDDEA 0ANDREF(MACD高,A1+1) MACD高ANDCROSS("MACD.DIF","MACD.DEA");
{DRAWTEXT(F 0,DIF*0.9,'↙柱底背'),COLORYELLOW;}
通达信涨跌幅度的妙用公式截图