首页 > 股票投资 > 股票技术指标公式 > 正文

股票技术指标公式——趋势轨迹pk角度突破线

来源:【赢家江恩】责任编辑:fanxiaonan添加时间:2017-01-24 10:02:08
  在股票技术指标的应用中,想要捕捉走势良好的个股,首先要判断股票的趋势轨迹,然后寻找股价的突破点位,由此趋势轨迹指标以及角度突破线指标就应运而生,下面赢家财富网就通过股票技术指标公式源码展现给大家。

  【趋势轨迹指标】

  主要是通过技术指标macd、kdj、rsi等的走势变化,寻找个股的趋势轨迹,从中分析个股的买卖点位置,具体的源码公式如下:

  SHORT:=12;

  LONG:=26;

  M:=9;

  DIFF := EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);

  DEA_:= EMA(DIFF,M);

  MACD_ := 2*(DIFF-DEA_),COLORSTICK;

  MACD:MACD_,colorwhite;

  DIF:DIFF,colorwhite;

  DEA:DEA_,coloryellow;

  A1:=BARSLAST(REF(CROSS(DIFF,DEA_),1));

  B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)

  A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));

  B2:=REF(C,A2+1)>C AND REF("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3) AND CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));

  A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));

  B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));

  C1:=BARSLAST(REF(CROSS(DEA_,DIFF),1));

  D1:=REF(C,C1+1)DIFF AND CROSS(DEA_,DIFF);

  C2:=BARSLAST(REF(CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3)),1));

  D2:=REF(C,C2+1)"KDJ.K"(9,3,3) AND CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3));

  C3:=BARSLAST(REF(CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));

  D3:=REF(C,C3+1)"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));

  MACD底背:IF(B1>0,-0.1,0),colorred,POINTDOT;

  KDJ底背:IF(B2>0,-0.1,0),COLORFF00FF,POINTDOT;

  RSI底背:IF(B3>0,-0.1,0),coloryellow,POINTDOT;

  MACD顶背:IF(D1>0,0.1,0),COLOR00FF00,POINTDOT;

  KDJ顶背:IF(D2>0,0.1,0),COLORFFCC66,POINTDOT;

  RSI顶背:IF(D3>0,0.1,0),colorwhite,POINTDOT;

  STICKLINE(MACD_>REF(MACD_,1) AND MACD_>0,0,MACD_,0,0),colorred;

  STICKLINE(MACD_<=REF(MACD_,1) AND MACD_>0,0,MACD_,0,0),coloryellow;

  STICKLINE(MACD_

  STICKLINE(MACD_>=REF(MACD_,1) AND MACD_<0,0,MACD_,0,0),colormagenta;

  STICKLINE(C>0,0,0,50,1),colorblue;

  PARTLINE(DIFF,DIFF>MA(DIFF,2),colorred,DIFF

  PARTLINE(DEA_,DEA_>MA(DEA_,2),colormagenta,DEA_

  A:=REF(DIFF,1)REF(DIFF,1);

  B:=REF(DIFF,1)>REF(DIFF,2) AND REF(DIFF,2)>REF(DIFF,3) AND DIFF

  买:IF(CROSS(DIFF,DEA_),DIFF,NULL),CIRCLEDOT,colorred;

  卖:IF(CROSS(DEA_,DIFF),DIFF,NULL),CIRCLEDOT,colorgreen;

  如图平安银行的趋势轨迹指标中的走势形态,从最低点16.16开始向上拉升,然后在从17.49元的高点下跌回落,包含一个上涨趋势一个下跌趋势,在上涨中作买入,在下跌迹象出现的时候,及时卖出获利。

平安银行趋势轨迹

  【角度突破线】

  当股价向上运行突破下跌角度线,是上涨的信号:

  JD:=15;

  T20:=20;

  T40:=40;

  X_1:=FILTERX(CURRBARSCOUNT>20 AND CURRBARSCOUNT<120 AND HIGH=HHV(HIGH,120),100);

  X_2:=BARSLAST(X_1);

  X_3:=REF(HIGH,X_2);

  X_4:=10/TAN(JD*3.1416/180);

  X_5:=X_3*0.1/X_4;

  L15:IF(RANGE(X_2,(-1),100),X_3-X_5*X_2,DRAWNULL),colormagenta;

  X_6:=IF(X_2=T20,(X_3-HIGH)/T20,DRAWNULL);

  X_7:=IF(CURRBARSCOUNT=1 AND X_2>T20,REF(X_6,X_2-T20),DRAWNULL);

  X_8:=CONST(X_7);

  X_9:=IF(RANGE(X_2,(-1),100),X_3-X_8*X_2,DRAWNULL);

  X_10:=IF(CURRBARSCOUNT<10,CONST(X_9),DRAWNULL);

  L20:IF(EVERY(LOW>X_9,10),DRAWNULL,X_9),colorgreen;

  STICKLINE(X_2=T20,LLV(LOW,T20)*0.95,X_3,0,0),colorligray;

  X_11:=IF(X_2=T40,(X_3-HIGH)/T40,DRAWNULL);

  X_12:=IF(CURRBARSCOUNT=1 AND X_2>T40,REF(X_11,X_2-T40),DRAWNULL);

  X_13:=CONST(X_12);

  X_14:=IF(RANGE(X_2,(-1),100),X_3-X_13*X_2,DRAWNULL);

  X_15:=IF(CURRBARSCOUNT<10,CONST(X_14),DRAWNULL);

  L40:X_14,coloryellow;

  STICKLINE(X_2=T40,LLV(LOW,T40)*0.95,X_3,0,0),colorligray;

  X_16:=X_2>40 AND REF(CROSS(LOW,L15),1) AND CLOSE

  X_17:=X_2>40 AND REF(CROSS(LOW,L15),1) AND CLOSE>OPEN;

  DRAWICON(X_17,LOW*0.95,1);

  如图深圳业A的走势图,以11.34元为高点向下画出角度突破线,当股价向上突破的时候,说明有反弹的迹象,投资者可以重点关注。

角度突破线

  以上就是本文讲解的股市中的趋势轨迹指标以及角度突破线的源码公式,如果您还想要了解更加专业的技术形态分析,请关注股票技术指标公式栏目进行研究学习。

郑州亨瑞软件开发有限公司
版权所有

服务中心:郑州市金水区农业路经三路
邮编:450002 网址:www.yingjia360.com

销售热线:0371-65350319
技术支持:13333833889

注册下载;