MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
DKX:=MA((20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+
16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+
13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+
10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+
7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+
4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,40),LINETHICK2;
MA11:=REF(DKX,1);
MADKX:=MA(DKX,5);
DIF1:=EMA(CLOSE,14)-EMA(CLOSE,28);
DEA1:=EMA(DIF1,9);
MACD1:=(DIF1-DEA1)*2;
长线买点:=CROSS(DKX,MA11) OR CROSS(DIF1,0),STICK,COLORRED,LINETHICK2;
长线卖点:=CROSS(MA11,DKX) OR CROSS(0,DIF1),STICK,COLORGREEN,LINETHICK2;
STICKLINE(长线卖点>0,0,1.5,2,0),COLORGREEN;
STICKLINE(长线买点>0,0,1.5,2,0),COLORRED;
MID1:=(3*CLOSE+LOW+OPEN+HIGH)/6;
DKX1:=(20*MID1+19*REF(MID1,1)+18*REF(MID1,2)+17*REF(MID1,3)+
16*REF(MID1,4)+15*REF(MID1,5)+14*REF(MID1,6)+
13*REF(MID1,7)+12*REF(MID1,8)+11*REF(MID1,9)+
10*REF(MID1,10)+9*REF(MID1,11)+8*REF(MID1,12)+
7*REF(MID1,13)+6*REF(MID1,14)+5*REF(MID1,15)+
4*REF(MID1,16)+3*REF(MID1,17)+2*REF(MID1,18)+REF(MID1,20))/210;
MADKX1:=MA(DKX1,4);
DIF2:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA2:=EMA(DIF2,9);
MACD2:=(DIF2-DEA2)*2;
平衡线:=MA(C,10);
短线买点:=CROSS(DKX1,MADKX1),STICK,COLORBLUE,LINETHICK2;
短线卖点:=CROSS(MADKX1,DKX1) ,STICK,COLORGREEN,LINETHICK2;
STICKLINE(短线卖点>0,3,4.5,2,0),COLORGREEN;
STICKLINE(短线买点>0,3,4.5,2,0),COLORRED;
{
选股公式:
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
DKX:=MA((20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+
16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+
13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+
10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+
7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+
4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,20),LINETHICK2;
MA11:=REF(DKX,1);
MADKX:=MA(DKX,4);
DIF1:=EMA(CLOSE,14)-EMA(CLOSE,28);
DEA1:=EMA(DIF1,9);
MACD1:=(DIF1-DEA1)*2;
长线买点:CROSS(DKX,MADKX);
}