• 网站首页
  • 股票知识
  • 股票公式
  • 散户炒股
  • 问答百科
  • 缠中说禅
  • 概念股
  • 【股票入门】通达信源码:连阳线,狂牛出现,智能MACD

    发布时间: 2020-04-11 13:10首页:股票一点通 > 股票公式 > 通达信公式 > 阅读()
    连阳线:

    AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN)); 
    买量:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),LINETHICK0,COLORRED; 卖量:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIGH-LOW),0-VOL/2)),LINETHICK0,COLORCYAN; 进出量:=买量+卖量,COLOR00FFFF; STICKLINE(进出量<0,0,进出量,4,0),COLORFF6600; STICKLINE(进出量<0,0,进出量,3,0),COLORFF9900; STICKLINE(进出量<0,0,进出量,1.5,0),COLORFFCC00; STICKLINE(进出量<0,0,进出量,0.5,0),COLORCYAN; STICKLINE(进出量>0,0,进出量,4,0),COLOR000099; STICKLINE(进出量>0,0,进出量,3,0),COLOR0000CC; STICKLINE(进出量>0,0,进出量,1.5,0),COLOR0000FF; STICKLINE(进出量>0,0,进出量,0.5,0),COLORCC66FF; N:=5; M:=13; N日内净流入:SUM(进出量,N),LINETHICK2,COLORGREEN; 流入:IF(N日内净流入>REF(N日内净流入,1),N日内净流入,DRAWNULL),COLORRED,LINETHICK2; 资金拉升:BARSLASTCOUNT(进出量>0); M日内资金护盘:COUNT(进出量>0,M),COLORRED; 资金洗盘:BARSLASTCOUNT(N日内净流入<0),COLORCYAN; 庄家抬轿:BARSLASTCOUNT(N日内净流入>0),COLORRED; 强庄控盘:BARSLASTCOUNT((N日内净流入>REF(N日内净流入,1))>0 AND N日内净流入>0);无庄阶段:BARSLASTCOUNT((N日内净流入<REF(N日内净流入,1))>0 AND N日内净流入<0);



    狂牛出现:

    即将拉升,感觉好用( 顶尖财经 股票学院: )

    {狂牛出现}
    VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
    VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VARD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
    VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
    VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
    VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR
    VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;
    TYP := (HIGH + LOW + CLOSE)/3;
    CC1:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),COLORFF00FF;
    C1:=SMA(CC1,3,1);
    C2:=SMA(C1,3,1);
    C3:=3*C1-2*C2;
    CB1:=EMA(C3,5);
    CB2:=REF(CB1,1);
    LC := REF(CLOSE,1);
    RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
    RSI:=(RSI1-50)*5,LINETHICK2,COLORFFFFFF;
    R1:=SMA(RSI,3,1);
    D1:=SMA(R1,3,1);
    J1:=3*R1-2*D1;
    RR1:=EMA(J1,5);
    RR2:=REF(RR1,1);
    RR:=RR1>RR2;
    RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
    K:=SMA(RSV,3,1);
    K1:=(K-50)*5,COLOR00FF00;
    K2:=SMA(K1,3,1);
    D2:=SMA(K2,3,1);
    J2:=3*K2-2*D2;
    BB1:=EMA(J2,5);
    金牛出现: RR AND NOT(REF(RR,1)) AND (RR1<-100 AND BB1<-100) AND CB1<-100 AND VAR19=1,COLORFF0080;
    STICKLINE(金牛出现,80,1,2,0),COLOR800040;
    STICKLINE(金牛出现,80,1,1.5,0),COLORFF0080;
    STICKLINE(金牛出现,80,1,1,0),COLOR800080;
    STICKLINE(金牛出现,80,1,0.3,0),COLORFF00FF;
    DRAWTEXT(金牛出现,50,' 金牛出现'),COLORFF0080;
    DRAWICON(金牛出现>0,83,9);




    智能MACD:

    {智能MACD}
     
    {DRAWGBK(C>0, RGB(0,108,108),RGB(88,0,0),0,'11',0);}
    SHORT:=12;LONG:=26;MID:=9;
    DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
    DEA:EMA(DIF,MID);
    MACD:(DIF-DEA)*2,COLORSTICK;
    DRAWICON(REF(DIF,1)<REF(DIF,2) AND DIF>REF(DIF,1) AND DIF<0 AND DIF<DEA,DIF*1.1,1),COLORRED;
    HJ_2:=BARSLAST(REF(MACD,1)<0 AND MACD>0);
    HJ_3:=LLVBARS(MACD,HJ_2+20);
    HJ_4:=IF(HJ_3>HJ_2,REF(MACD,HJ_3),0);
    HJ_5:=MACD<0 AND MACD>HJ_4 AND LOW=LLV(LOW,HJ_2+20) AND HJ_4<0;
    HJ_6:=REF(HJ_5,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,HJ_3)<0 AND MACD<0;
    底背:DRAWLINE(HJ_4=HJ_3,MACD,HJ_6,MACD,0),COLORRED,DOTLINE;
    DRAWICON(HJ_6,MACD*1.2,9);
    HJ_7:=HHVBARS(MACD,HJ_2+20);
    HJ_8:=IF(HJ_7>HJ_2,REF(MACD,HJ_7),0);
    HJ_9:=MACD>0 AND MACD<HJ_8 AND HIGH=HHV(HIGH,HJ_2+20) AND HJ_8>0;
    HJ_10:=REF(HJ_9,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,HJ_7)>0;
    顶背:DRAWLINE(HJ_8=HJ_7,MACD,HJ_10,MACD,0),COLOR1D7300,DOTLINE;
    DRAWICON(HJ_10,MACD*1.2,15);
    HJ_11:=CLOSE/MA(CLOSE,40)*100<78;
    HJ_12:=CLOSE/MA(CLOSE,60)*100<74;
    HJ_13:=HIGH>LOW*1.051;
    HJ_14:=HJ_13 AND COUNT(HJ_13,5)>1;
    HJ_15:=IF(HJ_14 AND (HJ_11 OR HJ_12),2,0);
    HJ_16:=CLOSE/REF(CLOSE,25)<=1.1;
    HJ_17:=SMA(MAX(CLOSE-REF(CLOSE,2),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,2)),7,1)*100<15;
    HJ_18:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
    HJ_19:=SMA(HJ_18,2,1);
    HJ_20:=SMA(HJ_19,2,1);
    HJ_21:=IF(HJ_19>REF(HJ_19,1) AND REF(HJ_19,1)<REF(HJ_19,2) AND HJ_19<23,1.5,0);
    HJ_22:=100-100*(HHV(HIGH,5*8)-CLOSE)/(HHV(HIGH,5*8)-LLV(LOW,5*8));
    HJ_23:=MA(CLOSE,5);
    HJ_24:=IF(CLOSE>SAR(10,2,20),1,0);
    HJ_25:=IF(CLOSE<SAR(10,2,20),(-1),0);
    HJ_26:=ATAN((HJ_23/REF(HJ_23,1)-1)*100)*180/3.1416;
    HJ_27:=IF(HJ_26>30,1,0);
    HJ_28:=IF(HJ_26<(-30),(-1),0);
    HJ_29:=HJ_24+HJ_27+HJ_25+HJ_28;
    IF(HJ_29<(-1) OR HJ_22<25.01,DIF,DRAWNULL),COLOR1D7300;
    IF(HJ_22>74.989998 OR HJ_29>0,DIF,DRAWNULL),COLORRED;
    0,COLORBROWN,POINTDOT;
     
    特别声明:文章内容仅供参考,不造成任何投资建议。投资者据此操作,风险自担。

    网站首页 - 股票知识 - - 股票公式 - 散户炒股 - 问答百科 - - 缠中说禅 - 概念股

    未经本站书面特别授权,请勿转载或建立镜像

    Copyright @ 2020 All Rights Reserved.版权所有 XMl地图
    Baidu
    map