长短结合 指标出现错误,无法通过_道迪拓金

超前MACD改成大智慧指标

超前MACD改成大智慧指标

股票公式网

编写条件:

编写方法:

 网友求助:

多空线:0,COLORYELLOW,LINETHICK9;

A1:=EMA(EMA(CLOSE,7),2)-EMA(EMA(CLOSE,21),2);

B1:=EMA((0.668*REF(A1,1)+0.333*A1),1);

短多:IF(A1>=B1,A1,B1),LINETHICK3,COLORLIMAGENTA;

短空:B1,LINETHICK3,COLORGREEN;

STICKLINE(B1<0 AND B1<REF(B1,1),B1*0.7,0,0.05,0),COLORLIBLUE;

STICKLINE(B1<0 AND B1>REF(B1,1),B1*0.7,0,0.05,0),COLORYELLOW;

STICKLINE(B1>REF(B1,1) AND B1>0,B1*0.7,0,0.05,0),COLORRED;

STICKLINE(B1<REF(B1,1) AND B1>0,B1*0.7,0,0.05,0),COLORGREEN;

LC:=REF(CLOSE,1);

RSI1:=SMA(MAX(CLOSE-LC,0),2,1)/SMA(ABS(CLOSE-LC),2,1)*100;

RSI2:=SMA(MAX(CLOSE-LC,0),3,1)/SMA(ABS(CLOSE-LC),3,1)*100;

RSI3:=SMA(MAX(CLOSE-LC,0),4,1)/SMA(ABS(CLOSE-LC),4,1)*100;

RSI4:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;

RSI5:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;

RSI6:=SMA(MAX(CLOSE-LC,0),7,1)/SMA(ABS(CLOSE-LC),7,1)*100;

RSI7:=SMA(MAX(CLOSE-LC,0),8,1)/SMA(ABS(CLOSE-LC),8,1)*100;

RSI8:=SMA(MAX(CLOSE-LC,0),9,1)/SMA(ABS(CLOSE-LC),9,1)*100;

RSI9:=SMA(MAX(CLOSE-LC,0),10,1)/SMA(ABS(CLOSE-LC),10,1)*100;

RSI10:=SMA(MAX(CLOSE-LC,0),11,1)/SMA(ABS(CLOSE-LC),11,1)*100;

RSI11:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;

RSI12:=SMA(MAX(CLOSE-LC,0),13,1)/SMA(ABS(CLOSE-LC),13,1)*100;

RSI13:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100;

RSI14:=SMA(MAX(CLOSE-LC,0),15,1)/SMA(ABS(CLOSE-LC),15,1)*100;

RSI15:=SMA(MAX(CLOSE-LC,0),16,1)/SMA(ABS(CLOSE-LC),16,1)*100;

RSI16:=SMA(MAX(CLOSE-LC,0),17,1)/SMA(ABS(CLOSE-LC),17,1)*100;

RSI17:=SMA(MAX(CLOSE-LC,0),18,1)/SMA(ABS(CLOSE-LC),18,1)*100;

RSI18:=SMA(MAX(CLOSE-LC,0),19,1)/SMA(ABS(CLOSE-LC),19,1)*100;

RSI19:=SMA(MAX(CLOSE-LC,0),20,1)/SMA(ABS(CLOSE-LC),20,1)*100;

RSI21:=SMA(MAX(CLOSE-LC,0),21,1)/SMA(ABS(CLOSE-LC),21,1)*100;

短线RSI:=(RSI1+RSI2+RSI3+RSI4+RSI5)/5,COLORWHITE;

中线RSI:=(RSI6+ RSI7+ RSI8+ RSI9+ RSI10+ RSI11+ RSI12+ RSI13+ RSI14+ RSI15+ RSI16+ RSI17+ RSI18+ RSI19+ RSI21)/15,COLORYELLOW;

A:=CROSS(短线RSI,中线RSI);

B:=CROSS(中线RSI,短线RSI);

DRAWICON(A,短空,1);

DRAWICON(B,短空,12);

DRAWTEXT(CROSS(短线RSI,50),B1*0.7,'买');

DRAWTEXT(CROSS(50,短线RSI),B1*0.7,'卖');
 
解答如下:
多空线:0,COLORYELLOW,LINETHICK7;

A1:=EMA(EMA(CLOSE,7),2)-EMA(EMA(CLOSE,21),2);

B1:=EMA((0.668*REF(A1,1)+0.333*A1),1);

短多:IF(A1>=B1,A1,B1),LINETHICK3;

短空:B1,LINETHICK3,COLORGREEN;

STICKLINE(B1<0 AND B1<REF(B1,1),B1*0.7,0,0.05,0),COLORCYAN;

STICKLINE(B1<0 AND B1>REF(B1,1),B1*0.7,0,0.05,0),COLORYELLOW;

STICKLINE(B1>REF(B1,1) AND B1>0,B1*0.7,0,0.05,0),COLORRED;

STICKLINE(B1<REF(B1,1) AND B1>0,B1*0.7,0,0.05,0),COLORGREEN;

LC:=REF(CLOSE,1);

RSI1:=SMA(MAX(CLOSE-LC,0),2,1)/SMA(ABS(CLOSE-LC),2,1)*100;

RSI2:=SMA(MAX(CLOSE-LC,0),3,1)/SMA(ABS(CLOSE-LC),3,1)*100;

RSI3:=SMA(MAX(CLOSE-LC,0),4,1)/SMA(ABS(CLOSE-LC),4,1)*100;

RSI4:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;

RSI5:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;

RSI6:=SMA(MAX(CLOSE-LC,0),7,1)/SMA(ABS(CLOSE-LC),7,1)*100;

RSI7:=SMA(MAX(CLOSE-LC,0),8,1)/SMA(ABS(CLOSE-LC),8,1)*100;

RSI8:=SMA(MAX(CLOSE-LC,0),9,1)/SMA(ABS(CLOSE-LC),9,1)*100;

RSI9:=SMA(MAX(CLOSE-LC,0),10,1)/SMA(ABS(CLOSE-LC),10,1)*100;

RSI10:=SMA(MAX(CLOSE-LC,0),11,1)/SMA(ABS(CLOSE-LC),11,1)*100;

RSI11:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;

RSI12:=SMA(MAX(CLOSE-LC,0),13,1)/SMA(ABS(CLOSE-LC),13,1)*100;

RSI13:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100;

RSI14:=SMA(MAX(CLOSE-LC,0),15,1)/SMA(ABS(CLOSE-LC),15,1)*100;

RSI15:=SMA(MAX(CLOSE-LC,0),16,1)/SMA(ABS(CLOSE-LC),16,1)*100;

RSI16:=SMA(MAX(CLOSE-LC,0),17,1)/SMA(ABS(CLOSE-LC),17,1)*100;

RSI17:=SMA(MAX(CLOSE-LC,0),18,1)/SMA(ABS(CLOSE-LC),18,1)*100;

RSI18:=SMA(MAX(CLOSE-LC,0),19,1)/SMA(ABS(CLOSE-LC),19,1)*100;

RSI19:=SMA(MAX(CLOSE-LC,0),20,1)/SMA(ABS(CLOSE-LC),20,1)*100;

RSI21:=SMA(MAX(CLOSE-LC,0),21,1)/SMA(ABS(CLOSE-LC),21,1)*100;

短线RSI:=(RSI1+RSI2+RSI3+RSI4+RSI5)/5;

中线RSI:=(RSI6+ RSI7+ RSI8+ RSI9+ RSI10+ RSI11+ RSI12+ RSI13+ RSI14+ RSI15+ RSI16+ RSI17+ RSI18+ RSI19+ RSI21)/15;

A:=CROSS(短线RSI,中线RSI);

B:=CROSS(中线RSI,短线RSI);

DRAWICON(A,短空,1);

DRAWICON(B,短空,12);

DRAWTEXT(CROSS(短线RSI,50),B1*0.7,'买');

DRAWTEXT(CROSS(50,短线RSI),B1*0.7,'卖');

 

{股票资源馆:www.lixiangluntan.com专业和谐高端炒股软件--公式编写交流--加QQ751161480--}股票公式网

把薛斯通道上穿白线的预警

把薛斯通道上穿白线的预警

大智慧策略终端/职业股民首选分析软件:支持ACE数据,支持L2行情全推数据,支持股票池,超赢数据,价格低廉,支持月季费年费。:

下载地址:https://share.weiyun.com/LPoU0GHu