长短线“RSI”+顶底背离(飞狐)

长短线“rsi”+顶底背离,是自己根据“RSI”指标的走势编写的。指标中“加”“减”是根据短线“RSI”运算而得;指标中“进场”“出局”是根据中线“RSI”运算而得。参数是对照几个个股历史数据而确定。当“加”和“进场”同时出现或相继出现时,是最好介入时机;当“减”和“出局”同时或相继出现时风险极大。指标中提示标出“RSI1”、“RSI2”的顶底背离,顶底背离有未来函数,仅作为参考。

DRAWGBK(1, COLORRGB(100,50,0), COLORRGB(100,100,0),0);
LC:=REF(CLOSE,1);
RSI1:SMA(MAX(CLOSE-LC,0),6,1)/SMA(Abs(CLOSE-LC),6,1)*100,LINETHICK1,COLORRED;
RSI2:SMA(MAX(CLOSE-LC,0),24,1)/SMA(ABS(CLOSE-LC),24,1)*100,LINETHICK2,COLORGREEN;
R1:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;
R2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
VAR1:=4*SMA(R1,5,1)-3*SMA(SMA(R1,5,1),3.2,1),COLORYELLOW,LINETHICK1;
VAR2:=24,COLORGREEN,LINETHICK0;
IF(crOSS(VAR1,VAR2),10,0),STICK,COLORRED;
DRAWTEXT(CROSS(VAR1,VAR2),10,'加'), COLOReeFF00;
VAR3:= 4*SMA(R1,5,1)-3*SMA(SMA(R1,5,1),3,1);
STICKLINE(CROSS(80,VAR3),100,90,3,0),colorfff666;
DRAWTEXT(CROSS(80,VAR3),100,'减'), COLOReeFF00;
VAR4:= 4*SMA(R2,5,1)-3*SMA(SMA(R2,5,1),3,1);
STICKLINE(CROSS(72,VAR4),110,100,3,0),STICK,COLORRED;
DRAWTEXT(CROSS(72,VAR4),110,'出局'), COLOReeFF00;
VAR5:=4*SMA(R2,5,1)-3*SMA(SMA(R2,5,1),3.2,1),COLORYELLOW,LINETHICK1;
VAR6:=38,COLORGREEN,LINETHICK0;
IF(CROSS(VAR5,VAR6),15,0),STICK,COLORRED;
DRAWTEXT(CROSS(VAR5,VAR6),18,'进场'), COLOReeFF00;
AA:=REF(RSI1,3)=HHV(RSI1,2*3+1);
BB:=BacKSET(AA,3+1);
CC:=FILTER(BB,3) AND RSI1=HHV(RSI1,3+1);
A1:=BArslAST(REF(CC,1));
顶背离:=REF(CLOSE,A1+1)<CLOSE AND REF(RSI1,A1+1)>RSI1 AND CC;
DRAWLINE(CC,RSI1,FILTER(顶背离>0,5),RSI1,0),COLORCYAN,LINETHICK2;
AA2:=REF(RSI1,3)=LLV(RSI1,2*3+1);
BB2:=BACKSET(AA2,3+1);
CC2:=FILTER(BB2,3) AND RSI1=LLV(RSI1,3+1);
AA2A:=BARSLAST(REF(CC2,1));
底背离:=REF(C,AA2A+1)>CLOSE AND REF(RSI1,AA2A+1)<RSI1 AND CC2;
DRAWLINE(CC2,RSI1,FILTER(底背离>0,5),RSI1,0),COLORMAGENTA,LINETHICK2;
DRAWTEXT(顶背离,RSI1*1.02,' -顶背'),COLORMAGENTA;
DRAWTEXT(底背离,RSI1*1.05,' -底背'),COLORMAGENTA;
AA00:=REF(RSI2,3)=HHV(RSI2,2*3+1);
BB00:=BACKSET(AA00,3+1);
CC00:=FILTER(BB00,3) AND RSI2=HHV(RSI2,3+1);
A11:=BARSLAST(REF(CC00,1));
顶背离:=REF(CLOSE,A11+1)<CLOSE AND REF(RSI2,A11+1)>RSI2 AND CC00;
DRAWLINE(CC00,RSI2,FILTER(顶背离>0,5),RSI2,0),COLORGREEN,LINETHICK2;
AA22:=REF(RSI2,3)=LLV(RSI2,2*3+1);
BB22:=BACKSET(AA22,3+1);
CC22:=FILTER(BB22,3) AND RSI2=LLV(RSI2,3+1);
AA22A:=BARSLAST(REF(CC22,1));
底背离:=REF(C,AA22A+1)>CLOSE AND REF(RSI2,AA22A+1)<RSI2 AND CC22;
DRAWLINE(CC22,RSI2,FILTER(底背离>0,5),RSI2,0),COLORRED,LINETHICK2;
DRAWTEXT(顶背离,RSI2*1.02,' -顶背'),COLORMAGENTA;
DRAWTEXT(底背离,RSI2*1.05,' -底背'),COLORMAGENTA;
100,LINEDOT;
80,LINEDOT;
50,LINEDOT;
20,LINEDOT;
0,LINEDOT;




未来函数检测结果如下:
该公式包含未来函数:BACKSET
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  指标公式网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 浙ICP备2024071487号-2 指标公式网别名指标网仅为互联网文章,所有指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。指标公式网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图