通达信顶底捕捉指标公式

n:=3;e2:=10;e3:15;e4:-15;
 MAn:=MA(C,n);MA10:=MA(C,10);MA20:=MA(C,20);MA30:=MA(C,30);MA60:=MA(C,60);
 d1:=(MAn-MA10)/MIN(MAn,MA10);
 d2:=(MAn-MA20)/MIN(MAn,MA20);
 d3:=(MAn-MA30)/MIN(MAn,MA30);
 d5:=(MA20-MA10)/MIN(MA20,MA10);
 d6:=(MA30-MA10)/MIN(MA30,MA10);
 d8:=(MA20-MA30)/MIN(MA20,MA30);
 da:=MA(MAX(MAX(MAX(d1,d2),MAX(d3,d5)),MAX(d6,d8))*100,2);
 db:=MA(MIN(MIN(MIN(d1,d2),MIN(d3,d5)),MIN(d6,d8))*100,2);
 gj:=(2*C+H+L)/4;
顶:=da>10 AND gj>MA30 AND REF(da,1)>MAX(REF(da,2),da);
底:=db<-10 AND gj<MA30 AND REF(db,1)<MIN(REF(db,2),db);
  DRAWTEXT(底 AND COUNT(底,BARSLAST(NOT(db<-10 AND gj<MA30)))=1,db*1.1,'底1'),colormagenta;
 DRAWTEXT(底 AND COUNT(底,BARSLAST(NOT(db<-10 AND gj<MA30)))=2,db*1.1,'底2'),colormagenta;
 DRAWTEXT(底 AND COUNT(底,BARSLAST(NOT(db<-10 AND gj<MA30)))=3,db*1.1,'底3'),colormagenta;
 DRAWTEXT(底 AND COUNT(底,BARSLAST(NOT(db<-10 AND gj<MA30)))=4,db*1.1,'底4'),colormagenta;
 DRAWTEXT(底 AND COUNT(底,BARSLAST(NOT(db<-10 AND gj<MA30)))=5,db*1.1,'底5'),colormagenta;
 DRAWTEXT(底 AND COUNT(底,BARSLAST(NOT(db<-10 AND gj<MA30)))=6,db*1.1,'底6'),colormagenta;
 DRAWTEXT(顶 AND COUNT(顶,BARSLAST(NOT(da>10 AND gj>MA30)))=1,da*1.1,'顶1'),colorcyan;
 DRAWTEXT(顶 AND COUNT(顶,BARSLAST(NOT(da>10 AND gj>MA30)))=2,da*1.1,'顶2'),colorcyan;
 DRAWTEXT(顶 AND COUNT(顶,BARSLAST(NOT(da>10 AND gj>MA30)))=3,da*1.1,'顶3'),colorcyan;
 DRAWTEXT(顶 AND COUNT(顶,BARSLAST(NOT(da>10 AND gj>MA30)))=4,da*1.1,'顶4'),colorcyan;
 DRAWTEXT(顶 AND COUNT(顶,BARSLAST(NOT(da>10 AND gj>MA30)))=5,da*1.1,'顶5'),colorcyan;
 DRAWTEXT(顶 AND COUNT(顶,BARSLAST(NOT(da>10 AND gj>MA30)))=6,da*1.1,'顶6'),colorcyan;
 STICKLINE(db<-10 AND gj<MA30,db,-5,1,0),RGB(0,255,0);
 STICKLINE(da>10 AND gj>MA30,da,5,1,0),RGB(255,0,0);
 STICKLINE(C,5,-5,15,0),RGB(80,80,80);




来函数检测结果如下:
该公式没有未来函数

解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

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

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