股资源-股票学习站-学炒股-股票课程-炒股教程-分析选股指标-入门基础知识

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 短银五线主图(源码、贴图)


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2024-3-10 20:20:06
短银五线主图(源码、贴图)介绍

短银五线主图(源码、贴图)

短银五线主图以短线是银教学五条均线为基础做的主图指标:
指标后面 “明”代表的是下一个K线参考的心理价位(支撑或压力),“新”代表的是最新收盘价,“高”最高价,“低”是最低价
"明"是一个短线指导价位,股价只有在"明"之上才说明趋势转变,站在"明"之上就容易上涨,再上涨,"明"之下总是反弹,反弹,股价远离了"明"就会有可能拉回。
①五均线分别是 5日(周)、10日(两周)、20日(月)、60日(季)、120日(半年)均线;
②加入了暖气带(红色)和冷气带(绿色)标识;
③图中红、黄、绿小圆点为红绿灯提示;
④其中图形“▲”代表价托;图形“◆”代表价压;
(白色-代表月周期,黄色-代表季周期,红色-代表年周期)
⑤黄色K线为重回五线上阳线;蓝色K线为重回五线下阴线。

JJ:=CLOSE;
J1:=MA(JJ,5);
J2:=MA(JJ,10);
J3:=MA(JJ,20);
J4:=MA(JJ,40);
J5:=MA(JJ,60);
J6:=MA(JJ,120);
J7:=MA(JJ,240);
DRAWBAND(J5,RGB(118,10,10),J6,RGB(10,108,10));
DRAWKLINE(H,O,L,C);
周:J1,LINETHICK1,COLORWHITE;
两周:J2,LINETHICK1,COLORYELLOW;
月:J3,LINETHICK2,COLORMAGENTA;
季:J5,LINETHICK2,COLORGREEN;
半年:J6,LINETHICK2,COLORBLUE;

明:(J1+C+REF(J1,1))/3,LINETHICK0;
新:C,LINETHICK0;
高:H,LINETHICK0;
低:L,LINETHICK0;

WXJDZ:=MAX(MA(C,5),MAX(MAX(MA(C,10),MA(C,20)),MAX(MA(C,60),MA(C,120))));
WXD1Y:=CROSS(C,WXJDZ);
STICKLINE(WXD1Y AND C>O,C,O,2,1),COLORMAGENTA;
STICKLINE(WXD1Y AND COUNT(WXD1Y,30)=1 AND C>O,C,O,2,1),COLORYELLOW;
WXJDD:=MIN(MA(C,5),MIN(MIN(MA(C,10),MA(C,20)),MIN(MA(C,60),MA(C,120))));
WXD1S:=CROSS(WXJDD,C);
STICKLINE(WXD1S AND C<O,C,O,2,0),COLORGREEN;
STICKLINE(WXD1S AND COUNT(WXD1S,30)=1 AND C<O,C,O,2,0),COLORBLUE;

{金蜘蛛}
YJZZ:=CROSS(J1,J3) AND CROSS(J1,J2) AND CROSS(J2,J3);
JJZZ:=CROSS(J3,J4) AND CROSS(J3,J5) AND CROSS(J4,J5);
NJZZ:=CROSS(J5,J6) AND CROSS(J5,J7) AND CROSS(J6,J7);
{死蜘蛛}
YSZZ:=CROSS(J3,J1) AND CROSS(J2,J1) AND CROSS(J3,J2);
JSZZ:=CROSS(J4,J3) AND CROSS(J5,J3) AND CROSS(J5,J4);
NSZZ:=CROSS(J6,J5) AND CROSS(J7,J5) AND CROSS(J7,J6);
{③价托};
D1:=BARSLAST(CROSS(J1,J2));{短上穿中}
D2:=BARSLAST(CROSS(J1,J3));{短上穿长}
D3:=BARSLAST(CROSS(J2,J3));{中上穿长}
TT1:=CROSS(J2,J3);{今天中线上穿长线}
TT2:=D1>=D2 AND D2>=D3;{交叉按指定的先后出现}
TT3:=COUNT(CROSS(J2,J1) OR CROSS(J3,J2) OR CROSS(J3,J1),D1)=0;{中间无夹杂其它交叉}
TT4:=REF(J1<J3 AND J2<J3,D1+1);{短上穿中前一天短、中线在长线之下};
YJT:=(TT1 AND TT2 AND TT3 AND TT4);{价托确定};
DRAWTEXT(YJT OR YJZZ,REF(J2,D1),'▲'),COLORWHITE;
{⑤价托};
DJ1:=BARSLAST(CROSS(J3,J4));{短上穿中}
DJ2:=BARSLAST(CROSS(J3,J5));{短上穿长}
DJ3:=BARSLAST(CROSS(J4,J5));{中上穿长}
TTJ1:=CROSS(J4,J5);{今天中线上穿长线}
TTJ2:=DJ1>=DJ2 AND DJ2>=DJ3;{交叉按指定的先后出现}
TTJ3:=COUNT(CROSS(J4,J3) OR CROSS(J5,J4) OR CROSS(J5,J3),DJ1)=0;{中间无夹杂其它交叉}
TTJ4:=REF(J3<J5 AND J4<J5,DJ1+1);{短上穿中前一天短、中线在长线之下}
JJT:=(TTJ1 AND TTJ2 AND TTJ3 AND TTJ4);{价托确定};
DRAWTEXT(JJT OR JJZZ,REF(J4,DJ1),'▲'),COLORYELLOW;
ZXJD:=IF(COUNT(JJT,60)=1 AND L<=LLV(L,10) AND L<=REF(J4,DJ1) AND VOL<MA(VOL,5) AND MA(VOL,5)<=MA(VOL,10) AND VOL<MA(VOL,60)/2,1,0);
DRAWTEXT(ZXJD,L,'〓'),COLORWHITE;
{⑦价托};
NJ1:=BARSLAST(CROSS(J5,J6));{短上穿中}
NJ2:=BARSLAST(CROSS(J5,J7));{短上穿长}
NJ3:=BARSLAST(CROSS(J6,J7));{中上穿长}
TNJ1:=CROSS(J6,J7);{今天中线上穿长线}
TNJ2:=NJ1>=NJ2 AND NJ2>=NJ3;{交叉按指定的先后出现}
TNJ3:=COUNT(CROSS(J6,J5) OR CROSS(J7,J6) OR CROSS(J7,J5),NJ1)=0;{中间无夹杂其它交叉}
TNJ4:=REF(J5<J7 AND J6<J7,NJ1+1);{短上穿中前一天短、中线在长线之下}
NJT:=(TNJ1 AND TNJ2 AND TNJ3 AND TNJ4);{价托确定};
DRAWTEXT(NJT OR NJZZ,REF(J6,NJ1),'▲'),COLORRED;
{③价压};
DD1:=BARSLAST(CROSS(J2,J1));{短下穿中}
DD2:=BARSLAST(CROSS(J3,J1));{短下穿长}
DD3:=BARSLAST(CROSS(J3,J2));{中下穿长}
YY1:=CROSS(J3,J2);{今天中线下穿长线}
Y④:=DD1>=DD2 AND DD2>=DD3;{交叉按指定的先后出现}
YY3:=COUNT(CROSS(J1,J2) OR CROSS(J2,J3) OR CROSS(J1,J3),DD1)=0;{中间无夹杂其它交叉}
YY4:=REF(J1>J3 AND J2>J3,DD1+1);{短下穿中前一天短、中线在长线之上};
YJY:=(YY1 AND Y④ AND YY3 AND YY4);{价压确定};
DRAWTEXT(YJY OR YSZZ,REF(J2,DD1),'◆'),COLORWHITE;
{⑤价压};
DDJ1:=BARSLAST(CROSS(J4,J3));{短下穿中}
DDJ2:=BARSLAST(CROSS(J5,J3));{短下穿长}
DDJ3:=BARSLAST(CROSS(J5,J4));{中下穿长}
YYJ1:=CROSS(J5,J4);{今天中线下穿长线}
YYJ2:=DDJ1>=DDJ2 AND DDJ2>=DDJ3;{交叉按指定的先后出现}
YYJ3:=COUNT(CROSS(J3,J4) OR CROSS(J4,J5) OR CROSS(J3,J5),DDJ1)=0;{中间无夹杂其它交叉}
YYJ4:=REF(J3>J5 AND J4>J5,DDJ1+1);{短下穿中前一天短、中线在长线之上}
JJY:=(YYJ1 AND YYJ2 AND YYJ3 AND YYJ4);
DRAWTEXT(JJY OR JSZZ,REF(J4,DDJ1),'◆'),COLORYELLOW;
{⑦价压};
NDJ1:=BARSLAST(CROSS(J6,J5));{短下穿中}
NDJ2:=BARSLAST(CROSS(J7,J5));{短下穿长}
NDJ3:=BARSLAST(CROSS(J7,J6));{中下穿长}
NYJ1:=CROSS(J7,J6);{今天中线下穿长线}
NYJ2:=NDJ1>=NDJ2 AND NDJ2>=NDJ3;{交叉按指定的先后出现}
NYJ3:=COUNT(CROSS(J5,J6) OR CROSS(J6,J7) OR CROSS(J5,J7),NDJ1)=0;{中间无夹杂其它交叉}
NYJ4:=REF(J5>J7 AND J6>J7,NDJ1+1);{短下穿中前一天短、中线在长线之上}
NJY:=(NYJ1 AND NYJ2 AND NYJ3 AND NYJ4);
DRAWTEXT(NJY OR NSZZ,REF(J6,NDJ1),'◆'),COLORRED;
{红绿灯}
CNT:=BARSCOUNT(C);
DRAWPRICE:=IF(CNT>=60,(HHV(H,60)+LLV(L,60))/2,(HHV(H,CNT)+LLV(L,CNT))/2);
GDJ:=IF(CNT>=120,C>MAX(J5,J6) AND C>=J1 AND C>=J2 AND C>=J3,
IF(CNT>=60,C>MAX(MAX(MAX(J1,J2),J3),J5),
IF(CNT>=20,C>MAX(MAX(J1,J2),J3),
IF(CNT>=10,C>MAX(J1,J2),
IF(CNT>=5,C>J1,
IF(CNT>=3,C>MA(C,CNT-1),IF(CNT=1,C>O,C>REF(C,1))))))));
RDJ:=IF(CNT>=120,C<MIN(J5,J6),
IF(CNT>=60,C<J5,
IF(CNT>=20,C<J3,
IF(CNT>=10,C<J2,
IF(CNT>=5,C<J1,
IF(CNT>=3,C<=MA(C,CNT-1),IF(CNT=1,C<O,C<=REF(C,1))))))));
HDJ:=NOT(GDJ) AND NOT(RDJ);
IF(HDJ,IF(CNT>=120,J6,IF(CNT>=60,J5,IF(CNT>=20,J3,IF(CNT>=10,J2,J1)))),DRAWNULL),COLORYELLOW,CIRCLEDOT,LINETHICK3;
IF(GDJ,IF(CNT>=120,J6,IF(CNT>=60,J5,IF(CNT>=20,J3,IF(CNT>=10,J2,J1)))),DRAWNULL),COLORGREEN,CIRCLEDOT,LINETHICK3;
IF(RDJ,IF(CNT>=120,J6,IF(CNT>=60,J5,IF(CNT>=20,J3,IF(CNT>=10,J2,J1)))),DRAWNULL),COLORRED,CIRCLEDOT,LINETHICK3;

WXSS:=C>MAX(J1,MAX(J2,MAX(J3,MAX(J5,J6)))) AND (C>O OR C>REF(C,1));
STICKLINE(WXSS AND (NOT(REF(WXSS,1))),O,C,1,0),COLORYELLOW;
STICKLINE(WXSS AND (NOT(REF(WXSS,1))),H,L,0,0),COLORYELLOW;
WXSX:=C<=MIN(J1,MIN(J2,MIN(J3,MIN(J4,MIN(J5,J6))))) AND (C<=O OR C<=REF(C,1));
STICKLINE(WXSX AND (NOT(REF(WXSX,1))),O,C,1,0),COLORBLUE;
STICKLINE(WXSS AND (NOT(REF(WXSS,1))),H,L,0,0),COLORYELLOW;


{副图-五线第一阳}
WXJDZ:=MAX(MA(C,5),MAX(MAX(MA(C,10),MA(C,20)),MAX(MA(C,60),MA(C,120))));
SXJDZ:=MAX(MA(C,5),MAX(MAX(MA(C,10),MA(C,20)),MA(C,60)));
WXD1Y:=CROSS(C,WXJDZ);
SXD1Y:=CROSS(C,SXJDZ);
(WXD1Y AND COUNT(WXD1Y,30)=1) OR (SXD1Y AND COUNT(SXD1Y,20)=1) AND ((C-REF(C,1))/REF(C,1)>=0.03);
 


 




 



gd13915

回复

举报

QQ|

GMT+8, 2024-12-28 08:34

快速回复 返回顶部 返回列表