当前位置:首页 > 通达信 > 正文

【通达信分享源码】精品指标公式-落袋为安主图源码

2023-01-02未知 编 辑:掌上指标


公式源码:
 
{买卖区}
 
买线:=EMA(C,2); 
 
卖线:=EMA(SLOPE(C,21)*20+C,42); 
 
STICKLINE(买线>=卖线,REFDATE(HHV(H,0),DATE),REFDATE(LLV(L,0),DATE),5,0),COLOR000055;
 
STICKLINE(买线<卖线,REFDATE(HHV(H,0),DATE),REFDATE(LLV(L,0),DATE),5,0),COLOR663300;  
 
DRAWNUMBER(ISLASTBAR, C,C),COLORMAGENTA;
 
{BS点提示}
 
{VAR1:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));
 
VAR2:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));
 
VAR3:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));
 
DRAWBMP(CROSS(VAR2,MA(VAR3,6)),(LOW - (LOW*0.01)),'BUY1');
 
DRAWBMP(CROSS(MA(VAR3,6),VAR1),(HIGH+(HIGH*0.03)),'SELL1');}
 
{落带为安-顶、压、支、底线}
 
DRAWRECTREL(0,5,1000,1,RGB(200,300,500));
 
DRAWRECTREL(0,202,1000,195,RGB(0,50,50));
 
DRAWRECTREL(0,498,1000,495,RGB(100,500,300));
 
DRAWRECTREL(0,808,1000,800,RGB(00,50,50));
 
DRAWRECTREL(0,1000,1000,995,RGB(200,300,500));
 
 
 
趋势射线21: DRAWLINE(H=HHV(H,21),H,L=LLV(L,21),L,0),COLORC100FF;
 
射线21上涨: DRAWLINE(L=LLV(L,21),L,H=HHV(H,21),L,0),COLORC100FF;
 
趋势射线35: DRAWLINE(H=HHV(H,35),H,L=LLV(L,35),L,0),COLORWHITE;
 
射线35上涨: DRAWLINE(L=LLV(L,35),L,H=HHV(H,35),L,0),COLORWHITE;
 
趋势射线49: DRAWLINE(H=HHV(H,49),H,L=LLV(L,49),L,0),COLORYELLOW;
 
射线49上涨: DRAWLINE(L=LLV(L,49),L,H=HHV(H,49),L,0),COLORYELLOW;
 
 
 
{安全建仓区}
 
RSV:=(CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100;
 
K:=SMA(RSV,3,1);
 
D:=SMA(K,3,1);
 
TJ:=D<10; 
 
TJ1:=D>90;
 
上边线:IF(BARSLAST(TJ),REF(HIGH,BARSLAST(TJ)),DRAWNULL),COLORWHITE;
 
下边线:IF(BARSLAST(TJ),REF(LOW,BARSLAST(TJ)),DRAWNULL),COLORMAGENTA;
 
安全带:STICKLINE(D,上边线*0.996,下边线*1.005,8,0),COLORBROWN;
 
STICKLINE(C>O,O,C,3,1),COLORRED;
 
STICKLINE(C>O,H,C,0,0),COLORRED;
 
STICKLINE(C>O,L,O,0,0),COLORRED;
 
STICKLINE(C<O,O,C,3,0),COLORCYAN;
 
STICKLINE(C<O,H,L,0,1),COLORCYAN;
 
STICKLINE(TJ,O,C,2,0),COLORFF00FF;
 
STICKLINE(TJ1,O,C,2,0),COLORGREEN;
 
{地域板块、所属行业、所属概念,主图显示}
 
DRAWTEXT_FIX(ISLASTBAR ,0.10,0.01,1,DYBLOCK),COLORYELLOW;
 
DRAWTEXT_FIX(ISLASTBAR ,0.18,0.01,1,HYBLOCK),COLORYELLOW;
 
DRAWTEXT_FIX(ISLASTBAR ,0.36,0.01,1,GNBLOCK),COLORWHITE;
 
{买卖信号灯}
 
降:=HHV(EMA(C,3),5),COLORCYAN;
 
升:=LLV(EMA(C,3),5),COLORRED;
 
走势:=EMA(C,3),COLORYELLOW;
 
线上多:IF(走势<降,降,DRAWNULL),COLORCYAN,LINETHICK2;{CIRCLEDOT}
 
线下空:IF(走势>升,升,DRAWNULL),COLORMAGENTA,LINETHICK3;
 
SJTJ:=DATE<1590301;
 
X1:=(C+L+H)/3; 
 
X2:=EMA(X1,6); 
 
X3:=EMA(X2,5); 
 
STICKLINE(X2>=X3 AND SJTJ,LOW,HIGH,0,1),COLORRED; 
 
STICKLINE(X2>=X3 AND SJTJ,CLOSE,OPEN,3.2,2),COLORRED; 
 
STICKLINE(X2<X3 AND SJTJ,LOW,HIGH,0,1),COLORCYAN;
 
STICKLINE(X2<X3 AND SJTJ,CLOSE,OPEN,3.2,2),COLORCYAN;
 
STICKLINE(CROSS(X3,X2) AND SJTJ,OPEN,CLOSE,3.2,0),COLORCYAN;
 
STICKLINE(CROSS(X2,X3) AND SJTJ,OPEN,CLOSE,3.2,0),COLORRED; 
 
STICKLINE((CLOSE>OPEN) AND (X2<X3) AND SJTJ,CLOSE,OPEN,3.2,2)COLORCYAN;
 
STICKLINE((CLOSE>OPEN) AND (X2>=X3) AND SJTJ,CLOSE,OPEN,3.2,2)COLORRED;
 
STICKLINE((CLOSE<OPEN) AND (X2<X3) AND SJTJ,CLOSE,OPEN,3.2,0)COLORCYAN;
 
STICKLINE((CLOSE<OPEN) AND (X2>=X3) AND SJTJ,CLOSE,OPEN,3.2,0)COLORRED;
 
{涨停板立体K线} 
 
A:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)>=9.8/100;
 
STICKLINE(A AND CLOSE=OPEN AND HIGH=LOW,REF(CLOSE,1),H,0,0),COLORGREEN,LINETHICK1;
 
B:=(REF(CLOSE,1)-CLOSE)/CLOSE>=9.8/100;
 
STICKLINE(B AND CLOSE=OPEN AND HIGH=LOW,REF(CLOSE,1),H,0,0),COLORGREEN,LINETHICK1; 
 
STICKLINE(B,H,L,0,0),COLORGREEN,LINETHICK1;
 
STICKLINE(B,O,C,3.5,0),COLOR008800;
 
STICKLINE(B,O,C,2,0),COLOR00AA00;
 
STICKLINE(B,O,C,1,0),COLOR00CC00;
 
STICKLINE(B,O,C,0.2,0),COLOR00FF00;
 
STICKLINE(A,H,L,0,0),COLORYELLOW,LINETHICK1;
 
STICKLINE(A,O,C,3.5,0),COLOR008888;
 
STICKLINE(A,O,C,2,0),COLOR00AAAA;
 
STICKLINE(A,O,C,1,0),COLOR00CCCC;
 
STICKLINE(A,O,C,0.2,0),COLOR00FFFF; 
大家都爱看
查看更多热点新闻
点击进入掌上指标资源网-下载各类指标