以下是通达信主图红山绿水公式源码(无源码的请下载附件导入)
LL:LLV(MA(L,10),LLV(MA(L,30),MA(L,120))),COLORYELLOW;
HH:HHV(MA(H,10),HHV(MA(H,30),MA(H,120))),COLORGREEN;
涨停:=IF(REF(C,1)*1.1-C<0.01 ,1,0);
STICKLINE(涨停,OPEN,CLOSE,8,0),COLORMAGENTA;
SS:=LLV(LLV(L,60),LLV(LLV(L,120),LLV(L,250))),COLORWHITE;
DF:=EMA(CLOSE,12) - EMA(CLOSE,26),COLORWHITE;
DA:=EMA(DF,9),COLORLIBLUE;
MACD:=2*(DF-DA),NODRAW;
STICKLINE(DA>0 AND MACD>0 AND MACD>REF(MACD,1),SS,SS+MACD,8,0) ,COLORRED;
STICKLINE(DA>0 AND MACD>0 AND MACD<REF(MACD,1),SS,SS+MACD,8,0) ,COLORLIBLUE;
STICKLINE(DA>0 AND MACD<0 AND MACD>REF(MACD,1) ,SS,SS-MACD,8,0),COLORGREEN;
STICKLINE(DA>0 AND MACD<0 AND MACD<REF(MACD,1) ,SS,SS-MACD,8,0),COLORGREEN;
STICKLINE(DA<0 AND MACD>0 AND MACD>REF(MACD,1),SS,SS-MACD,8,0) ,COLORRED;
STICKLINE(DA<0 AND MACD>0 AND MACD<REF(MACD,1),SS,SS-MACD,8,0) ,COLORLIBLUE;
STICKLINE(DA<0 AND MACD<0 AND MACD>REF(MACD,1) ,SS,SS+MACD,8,0),COLORGREEN;
STICKLINE(DA<0 AND MACD<0 AND MACD<REF(MACD,1) ,SS,SS+MACD,8,0),COLORGREEN;
7877005.gif
|