以下是通达信金博士买卖指标公式源码

通达信金博士买卖指标公式源码:

    N1:=6;N2:=12;N3:=26;
    MA5:=MA(CLOSE,5);
    MA10:=MA(CLOSE,10);
    MA20:=MA(CLOSE,20);
    MA60:=MA(CLOSE,60);
    MTM:=C-REF(C,1);
    DX:=100*EMA(EMA(MTM,N1),N1)/EMA(EMA(ABS(MTM),N1),N1);
    ZX:=100*EMA(EMA(MTM,N2),N2)/EMA(EMA(ABS(MTM),N2),N2);
    CX:=100*EMA(EMA(MTM,N3),N3)/EMA(EMA(ABS(MTM),N3),N3);
    DXGD:=LLV(DX,2)=LLV(DX,5)ANDCROSS(DX,MA(DX,2));
    ZXGD:=LLV(ZX,2)=LLV(ZX,5)ANDCROSS(ZX,MA(ZX,2))ANDDX>ZX;
    中买:IF(ZXGDANDBETWEEN(DX,0,50)ANDBETWEEN(CX,0,50),1,0),COLOR00FFFF,POINTDOT;
    DTPL:=DX>ZXANDZX>CXANDCX>0;
    QSXS:=DX>REF(DX,1)ANDZX>REF(ZX,1);
    TSJC:=CROSS(DX,CX)ANDCROSS(ZX,CX);
    优选:IF(CROSS(DTPL,0.8)AND(TSJCORCOUNT(QSXS,3)=3)ANDCX<40,1,0),COLOR0000FF,POINTDOT;
    中卖:IF(CROSS(CX,ZX)ANDDX
    买:IF(LLV(DX,2)=LLV(DX,7)ANDCOUNT(DX<0,2)ANDCROSS(DX,MA(DX,2)),1,0),COLORRED;
    卖:IF(HHV(DX,2)=HHV(DX,7)ANDCOUNT(DX>50,2)ANDCROSS(MA(DX,2),DX),1,0),COLOR00FF00;
    STICKLINE(DX>0,0,DX,3,0),COLOR00FF00;
    STICKLINE(ZX>0,0,ZX,3,0),COLOR00FFFF;
    STICKLINE(CX>0,0,CX,3,0),COLORFF00FF;
    DRAWTEXT(中买,low-0.03,'★'),COLOR00FFFF,ALIGN1;
    DRAWTEXT(中卖,high*1.025,'●'),COLORFF9900,ALIGN1;
    DRAWTEXT(filter(买=1,5),low-0.03,'买'),COLORRED,ALIGN1;
    DRAWTEXT(filter(卖=1,5),high*1.025,'卖'),COLOR00FF00,ALIGN1;
    DRAWICON(优选,low-0.03,1),ALIGN1;
    RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
    K:SMA(RSV,3,1),COLORFFFFFF,PRECIS0;
    D:SMA(K,3,1),COLOR00FFFF,PRECIS0;
    J:=3*K-2*D;
    超跌:IF(J<0,10,0),COLORFFFF00,PRECIS0;
    BDDD:=LLV(J,2)=LLV(J,8);
    重启:IF(CROSS(J,REF(J+0.01,1))ANDBDDDANDJ<20,30,0),COLORwhite,PRECIS0;
    VAR3:=LLV(HIGH,240);
    VAR4:=100*(CLOSE-VAR3)/VAR3;
    VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;
    VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;
    VAR7:=0;
    VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;
    VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;
    VAR10:=IF(TROUGHBARS(3,16,1)=0ANDHIGH>LOW+0.04,4,0);
    VAR11:=ZIG(3,6)>REF(ZIG(3,6),1)ANDREF(ZIG(3,6),1)<=REF(ZIG(3,6),2)ANDREF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
    VAR12:=ZIG(3,6)<REF(ZIG(3,6),1)ANDREF(ZIG(3,6),1)>=REF(ZIG(3,6),2)ANDREF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
    VAR13:=ZIG(3,22)>REF(ZIG(3,22),1)ANDREF(ZIG(3,22),1)<=REF(ZIG(3,22),2)ANDREF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
    VAR14:=ZIG(3,22)<REF(ZIG(3,22),1)ANDREF(ZIG(3,22),1)>=REF(ZIG(3,22),2)ANDREF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
    VAR15:=ZIG(3,51)>REF(ZIG(3,51),1)ANDREF(ZIG(3,51),1)<=REF(ZIG(3,51),2)ANDREF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
    VAR16:=ZIG(3,51)<REF(ZIG(3,51),1)ANDREF(ZIG(3,51),1)>=REF(ZIG(3,51),2)ANDREF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
    VAR17:=ZIG(3,72)>REF(ZIG(3,72),1)ANDREF(ZIG(3,72),1)<=REF(ZIG(3,72),2)ANDREF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
    VAR18:=ZIG(3,72)<REF(ZIG(3,72),1)ANDREF(ZIG(3,72),1)>=REF(ZIG(3,72),2)ANDREF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
    VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);
    买1:=VAR10;
    买2:=(VAR11+VAR13+VAR15+VAR17);
    卖1:=(VAR12+VAR14+VAR16+VAR18);
    B:IF(买1>0OR买2>0,LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;
    DRAWTEXT(买1>0OR买2>0,LOW*0.99,'买入'),COLORRED;
    S:IF(卖1>0,HIGH*1.01,DRAWNULL),CROSSDOT,LINETHICK3,COLORGREEN;
    DRAWTEXT(卖1>0,HIGH*1.02,'卖出'),COLORGREEN;
    VAR100:=(100-((90*(HHV(HIGH,20)-CLOSE))/(HHV(HIGH,20)-LLV(LOW,20))));
    VAR200:=(100-((90*(HHV(HIGH,20)-CLOSE))/(HHV(HIGH,20)-LLV(LOW,20))));
    VAR300:=(100-MA(((100*(HHV(HIGH,5)-CLOSE))/(HHV(HIGH,5)-LLV(LOW,5))),34));
    F:IF(CROSS(VAR200,MA(VAR300,5)),LOW*0.98,DRAWNULL),CROSSDOT,LINETHICK3,COLOREE00EE;
    年:MA(CLOSE,22),LINETHICK2,COLORWHITE;
    A1:=REF(C,1);
    A2:=SMA(MAX(C-A1,0),5,1)/SMA(ABS(C-A1),5,1)*1000;
    A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));
    A4:=A2-LLV(A2,10);
    A5:=(MA(A4,2)*3+A4*13)/16;
    A6:=IF(A5>13,MA(A5,2),A5)/6;
    RSI1:=SMA(MAX(C-A1,0),6,1)/SMA(ABS(C-A1),6,1)*100;
    RSI2:=SMA(MAX(C-A1,0),12,1)/SMA(ABS(C-A1),12,1)*100;
    RSI3:=SMA(MAX(C-A1,0),24,1)/SMA(ABS(C-A1),24,1)*100;
    压力:=HHV(MA(RSI2,3),12);
    支撑:=LLV(MA(RSI2,3),12);
    中间:(HHV(MA(RSI2,3),12)+LLV(MA(RSI2,3),12))/2,COLORRED,LINETHICK2;
    STICKLINE(RSI2<支撑,中间,RSI2,1,0)COLORFF972F;
    STICKLINE(RSI2>=支撑ANDRSI2<中间,中间,RSI2,1,0)COLORFF972F;
    STICKLINE(RSI2>=中间ANDRSI2<压力,中间,RSI2,2,0)COLORRED;
    STICKLINE(RSI2>=压力,中间,RSI2,2,0)COLORRED;
    B3:=REF(C,A3+1)>CANDREF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24)ANDCROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
    DRAWTEXT(B3,RSI2,'←底背');
    B1:=RSI1>=RSI2ANDRSI2>=RSI3;
    S1:=RSI1<RSI2ANDRSI2<RSI3;
    BS1:=NOT(RSI1>=RSI2ANDRSI2>=RSI3)ANDNOT(RSI1<RSI2ANDRSI2<RSI3);
    STICKLINE(B1,80,82,2,1)COLORRED;
    STICKLINE(S1,80,82,2,1)COLORGREEN;
    STICKLINE(BS1,80,82,2,1)COLORYELLOW;
    短线:IF(CROSS(A6,1)AND(A6<30)ANDRSI2<35ANDRSI2>=支撑ANDRSI2<中间,30,20),COLORMAGENTA,LINETHICK2;
    AA:=VOL/((HIGH-LOW)*2-(ABS(CLOSE-OPEN)))*100;
    主动买盘:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*(HIGH-OPEN+CLOSE-LOW),VOL/2));
    主动卖盘:=IF(CLOSE>OPEN,-AA*(HIGH-CLOSE+OPEN-LOW),IF(CLOSE<OPEN,-AA*(HIGH-LOW),-VOL/2));
    买卖比:=主动买盘/主动卖盘;
    卖盘:=VOL-主动买盘;
    卖盘大:=(卖盘-主动买盘)/卖盘>0.6;
    买盘大:=(主动买盘-卖盘)/主动买盘>0.6;

通达信金博士买卖指标公式截图

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。