通達(dá)信 短銀五線主圖 指標(biāo)源碼
短銀五線主圖以短線是銀教學(xué)五條均線為基礎(chǔ)做的主圖指標(biāo):
指標(biāo)后面 “明”代表的是下一個(gè)K線參考的心理價(jià)位(支撐或壓力),“新”代表的是最新收盤價(jià),“高”最高價(jià),“低”是最低價(jià)
"明"是一個(gè)短線指導(dǎo)價(jià)位,股價(jià)只有在"明"之上才說明趨勢(shì)轉(zhuǎn)變,站在"明"之上就容易上漲,再上漲,"明"之下總是反彈,反彈,股價(jià)遠(yuǎn)離了"明"就會(huì)有可能拉回。
①五均線分別是 5日(周)、10日(兩周)、20日(月)、60日(季)、120日(半年)均線;
②加入了暖氣帶(紅色)和冷氣帶(綠色)標(biāo)識(shí);
③圖中紅、黃、綠小圓點(diǎn)為紅綠燈提示;
④其中圖形“▲”代表價(jià)托;圖形“◆”代表價(jià)壓;
(白色-代表月周期,黃色-代表季周期,紅色-代表年周期)
⑤黃色K線為重回五線上陽線;藍(lán)色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);
{③價(jià)托};
D1:=BARSLAST(CROSS(J1,J2));{短上穿中}
D2:=BARSLAST(CROSS(J1,J3));{短上穿長(zhǎng)}
D3:=BARSLAST(CROSS(J2,J3));{中上穿長(zhǎng)}
TT1:=CROSS(J2,J3);{今天中線上穿長(zhǎng)線}
TT2:=D1>=D2 AND D2>=D3;{交叉按指定的先后出現(xiàn)}
TT3:=COUNT(CROSS(J2,J1) OR CROSS(J3,J2) OR CROSS(J3,J1),D1)=0;{中間無夾雜其它交叉}
TT4:=REF(J1<J3 AND J2<J3,D1+1);{短上穿中前一天短、中線在長(zhǎng)線之下};
YJT:=(TT1 AND TT2 AND TT3 AND TT4);{價(jià)托確定};
DRAWTEXT(YJT OR YJZZ,REF(J2,D1),'▲'),COLORWHITE;
{⑤價(jià)托};
DJ1:=BARSLAST(CROSS(J3,J4));{短上穿中}
DJ2:=BARSLAST(CROSS(J3,J5));{短上穿長(zhǎng)}
DJ3:=BARSLAST(CROSS(J4,J5));{中上穿長(zhǎng)}
TTJ1:=CROSS(J4,J5);{今天中線上穿長(zhǎng)線}
TTJ2:=DJ1>=DJ2 AND DJ2>=DJ3;{交叉按指定的先后出現(xiàn)}
TTJ3:=COUNT(CROSS(J4,J3) OR CROSS(J5,J4) OR CROSS(J5,J3),DJ1)=0;{中間無夾雜其它交叉}
TTJ4:=REF(J3<J5 AND J4<J5,DJ1+1);{短上穿中前一天短、中線在長(zhǎng)線之下}
JJT:=(TTJ1 AND TTJ2 AND TTJ3 AND TTJ4);{價(jià)托確定};
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;
{⑦價(jià)托};
NJ1:=BARSLAST(CROSS(J5,J6));{短上穿中}
NJ2:=BARSLAST(CROSS(J5,J7));{短上穿長(zhǎng)}
NJ3:=BARSLAST(CROSS(J6,J7));{中上穿長(zhǎng)}
TNJ1:=CROSS(J6,J7);{今天中線上穿長(zhǎng)線}
TNJ2:=NJ1>=NJ2 AND NJ2>=NJ3;{交叉按指定的先后出現(xiàn)}
TNJ3:=COUNT(CROSS(J6,J5) OR CROSS(J7,J6) OR CROSS(J7,J5),NJ1)=0;{中間無夾雜其它交叉}
TNJ4:=REF(J5<J7 AND J6<J7,NJ1+1);{短上穿中前一天短、中線在長(zhǎng)線之下}
NJT:=(TNJ1 AND TNJ2 AND TNJ3 AND TNJ4);{價(jià)托確定};
DRAWTEXT(NJT OR NJZZ,REF(J6,NJ1),'▲'),COLORRED;
{③價(jià)壓};
DD1:=BARSLAST(CROSS(J2,J1));{短下穿中}
DD2:=BARSLAST(CROSS(J3,J1));{短下穿長(zhǎng)}
DD3:=BARSLAST(CROSS(J3,J2));{中下穿長(zhǎng)}
YY1:=CROSS(J3,J2);{今天中線下穿長(zhǎng)線}
Y④:=DD1>=DD2 AND DD2>=DD3;{交叉按指定的先后出現(xiàn)}
YY3:=COUNT(CROSS(J1,J2) OR CROSS(J2,J3) OR CROSS(J1,J3),DD1)=0;{中間無夾雜其它交叉}
YY4:=REF(J1>J3 AND J2>J3,DD1+1);{短下穿中前一天短、中線在長(zhǎng)線之上};
YJY:=(YY1 AND Y④ AND YY3 AND YY4);{價(jià)壓確定};
DRAWTEXT(YJY OR YSZZ,REF(J2,DD1),'◆'),COLORWHITE;
{⑤價(jià)壓};
DDJ1:=BARSLAST(CROSS(J4,J3));{短下穿中}
DDJ2:=BARSLAST(CROSS(J5,J3));{短下穿長(zhǎng)}
DDJ3:=BARSLAST(CROSS(J5,J4));{中下穿長(zhǎng)}
YYJ1:=CROSS(J5,J4);{今天中線下穿長(zhǎng)線}
YYJ2:=DDJ1>=DDJ2 AND DDJ2>=DDJ3;{交叉按指定的先后出現(xiàn)}
YYJ3:=COUNT(CROSS(J3,J4) OR CROSS(J4,J5) OR CROSS(J3,J5),DDJ1)=0;{中間無夾雜其它交叉}
YYJ4:=REF(J3>J5 AND J4>J5,DDJ1+1);{短下穿中前一天短、中線在長(zhǎng)線之上}
JJY:=(YYJ1 AND YYJ2 AND YYJ3 AND YYJ4);
DRAWTEXT(JJY OR JSZZ,REF(J4,DDJ1),'◆'),COLORYELLOW;
{⑦價(jià)壓};
NDJ1:=BARSLAST(CROSS(J6,J5));{短下穿中}
NDJ2:=BARSLAST(CROSS(J7,J5));{短下穿長(zhǎng)}
NDJ3:=BARSLAST(CROSS(J7,J6));{中下穿長(zhǎng)}
NYJ1:=CROSS(J7,J6);{今天中線下穿長(zhǎng)線}
NYJ2:=NDJ1>=NDJ2 AND NDJ2>=NDJ3;{交叉按指定的先后出現(xiàn)}
NYJ3:=COUNT(CROSS(J5,J6) OR CROSS(J6,J7) OR CROSS(J5,J7),NDJ1)=0;{中間無夾雜其它交叉}
NYJ4:=REF(J5>J7 AND J6>J7,NDJ1+1);{短下穿中前一天短、中線在長(zhǎng)線之上}
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);
附圖: