最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 通达信飞越彩泓帝叠公式

    正文概述    2024-04-13 13:25:31  

    源码

    DRAWGBK(O>C,RGB(0,50,50),RGB(66,0,0),0,'01',0);

    {跳空}

    STICKLINE(HIGH

    STICKLINE(LOW>REF(HIGH,1) ,LOW,REF(HIGH,1),20,0),COLOR888888;

    DRAWKLINE(HIGH,OPEN,LOW,CLOSE);

     

    W00:=COST(1);

    W10:=COST(10);

    W20:=COST(20);

    W30:=COST(30);

    W40:=COST(40);

    W50:=COST(50);

    W60:=COST(60);

    W70:=COST(70);

    W80:=COST(80);

    W90:=COST(90);

    W100:=COST(99);

    W5:=COST(5);

    W15:=COST(15);

    W25:=COST(25);

    W35:=COST(35);

    W45:=COST(45);

    W55:=COST(55);

    W65:=COST(65);

    W75:=COST(75);

    W85:=COST(85);

    W95:=COST(95);

    C5:=W5-W00;

    C10:=W10-W5;

    C15:=W15-W10;

    C20:=W20-W15;

    C25:=W25-W20;

    C30:=W30-W25;

    C35:=W35-W30;

    C40:=W40-W35;

    C45:=W45-W40;

    C50:=W50-W45;

    C55:=W55-W50;

    C60:=W60-W55;

    C65:=W65-W60;

    C70:=W70-W65;

    C75:=W75-W70;

    C80:=W80-W75;

    C85:=W85-W80;

    C90:=W90-W85;

    C95:=W95-W90;

    C100:=W100-W95;

    ZX:=MIN(C5,MIN(C10,MIN(C15,MIN(C20,MIN(C25,MIN(C30,MIN(C35,MIN(C40,MIN(C45,MIN(C50,MIN(C55,MIN(C60,MIN(C65,MIN(C70,MIN(C75,MIN(C80,MIN(C85,MIN(C90,MIN(C95,C100)))))))))))))))))));

    STICKLINE(ZX=C5,W00,W5,5,0),COLORFF8800;

    STICKLINE(ZX=C10,W10,W5,5,0),COLORFF8800;

    STICKLINE(ZX=C15,W15,W10,5,0),COLORFF8800;

    STICKLINE(ZX=C20,W20,W15,5,0),COLORFF8800;

    STICKLINE(ZX=C25,W25,W20,5,0),COLORFF8800;

    STICKLINE(ZX=C30,W30,W25,5,0),COLORFF8800;

    STICKLINE(ZX=C35,W35,W30,5,0),COLORFF8800;

    STICKLINE(ZX=C40,W40,W35,5,0),COLORFF8800;

    STICKLINE(ZX=C45,W45,W40,5,0),COLORFF8800;

    STICKLINE(ZX=C50,W50,W45,5,0),COLORFF8800;

    STICKLINE(ZX=C55,W55,W50,5,0),COLORFF8800;

    STICKLINE(ZX=C60,W60,W55,5,0),COLORFF8800;

    STICKLINE(ZX=C65,W65,W60,5,0),COLORFF8800;

    STICKLINE(ZX=C70,W70,W65,5,0),COLORFF8800;

    STICKLINE(ZX=C75,W75,W70,5,0),COLORFF8800;

    STICKLINE(ZX=C80,W80,W75,5,0),COLORFF8800;

    STICKLINE(ZX=C85,W85,W70,5,0),COLORFF8800;

    STICKLINE(ZX=C90,W90,W85,5,0),COLORFF8800;

    STICKLINE(ZX=C95,W95,W90,5,0),COLORFF8800;

    STICKLINE(ZX=C100,W100,W95,5,0),COLORFF8800;

    筹宽:=W100-W00;

    J90:=W90-W60;

    J80:=W80-W50;

    J70:=W70-W40;

    J60:=W60-W30;

    J50:=W50-W20;

    J40:=W40-W10;

    J30:=W30-W00;

     

    JJ90:=W90-W70;

    JJ80:=W80-W60;

    JJ70:=W70-W50;

    JJ60:=W60-W40;

    JJ50:=W50-W30;

    JJ40:=W40-W20;

    JJ30:=W30-W10;

     

    {跌K线}

    STICKLINE(O>=C,C,O,2.6,0),COLOR009900;

    STICKLINE(O>=C,C,O,1.9,0),COLOR00BB00;

    STICKLINE(O>=C,C,O,1.2,0),COLOR00DD00;

    STICKLINE(O>=C,C,O,0.4,0),COLOR00FF00;

    {涨K线}   

    STICKLINE(C>O,C,O,2.6,0),COLOR000088;   

    STICKLINE(C>O,C,O,1.9,0),COLOR0000AA;   

    STICKLINE(C>O,C,O,1.2,0),COLOR0000CC;   

    STICKLINE(C>O,C,O,0.4,0),COLOR0000EE;

     

    近高:IF (HIGH>PEAK(1,N,1),HHV(HIGH,21),PEAK(1,N,1)),COLORGREEN;

    近低:IF (LOW

    分割0.191:(近高-近低)*0.191+近低,DOTLINE,COLORMAGENTA;

    分割0.382:(近高-近低)*0.382+近低,DOTLINE,COLORRED;

    分割0.5:(近高-近低)*0.5+近低,DOTLINE,COLORGREEN;

    分割0.618:(近高-近低)*0.618+近低,DOTLINE,COLORCYAN;

    分割0.809:(近高-近低)*0.809+近低,DOTLINE,COLORYELLOW;

     

    TL:=1000000+DA;

    TH:=1000000+DB;

    TC:=1000000+DC;

    TO:=1000000+DO;

    AL:=IF(REFDATE(CLOSE,TL)>REFDATE(CLOSE,TH),REFDATE(HIGH,TL),REFDATE(LOW,TL));

    BH:=IF(REFDATE(CLOSE,TL)>REFDATE(CLOSE,TH),REFDATE(LOW,TH),REFDATE(HIGH,TH));

    CZF:=IF(REFDATE(CLOSE,TL)>REFDATE(CLOSE,TH),REFDATE(HIGH,TC),REFDATE(LOW,TC));

    DJB:=IF(REFDATE(CLOSE,TL)>REFDATE(CLOSE,TH),REFDATE(LOW,TO),REFDATE(HIGH,TO));

     

    DRAWLINE(DATE=TO,DJB,DATE=TL,AL,0)CIRCLEDOT,COLORWHITE;

    DRAWLINE(DATE=TL,AL,DATE=TH,BH,0)LINETHICK2,COLORYELLOW;

    DRAWLINE(DATE=TH,BH,DATE=TC,CZF,0)LINETHICK2,COLORCYAN;

     

    OP:=BH-AL+CZF;

    COP:=0.618*(BH-AL)+CZF;

    XOP:=IF((1.618*(BH-AL)+CZF)<0,OP,1.618*(BH-AL)+CZF);

    TODAY:=DATE;

    STICKLINE(DATE=TC,CZF,XOP,0,-1),COLORYELLOW;

    DRAWLINE(DATE=TC,COP,DATE=TODAY,COP,1),DOTLINE,COLORYELLOW;

    DRAWLINE(DATE=TC,OP,DATE=TODAY,OP,1),DOTLINE,COLORYELLOW;

    DRAWLINE(DATE=TC,XOP,DATE=TODAY,XOP,1),DOTLINE,COLORYELLOW;

    DRAWTEXT(DATE=TC,COP*1.003,'COP=0.618'),COLORYELLOW;

    DRAWTEXT(DATE=TC,OP*1.003,'OP=1.000'),COLORYELLOW;

    DRAWTEXT(DATE=TC,XOP*1.003,'XOP=1.618'),COLORYELLOW;

    DRAWNUMBER(DATE=TC,COP,COP),COLORMAGENTA;

    DRAWNUMBER(DATE=TC,OP,OP),COLORMAGENTA;

    DRAWNUMBER(DATE=TC,XOP,XOP),COLORMAGENTA;

     

    F3:=(BH-0.382*(BH-AL));

    F5:=(BH-0.5*(BH-AL));

    F6:=(BH-0.618*(BH-AL));

    {DRAWLINE(DATE=TH,F3,DATE=TODAY,F3,1),LINETHICK4,POINTDOT,COLORYELLOW;

    DRAWLINE(DATE=TH,F5,DATE=TODAY,F5,1),LINETHICK4,POINTDOT,COLORYELLOW;

    DRAWLINE(DATE=TH,F6,DATE=TODAY,F6,1),LINETHICK4,POINTDOT,COLORYELLOW;}

    DRAWTEXT(DATE=TH,F3*1.003,'F3=0.382')COLORYELLOW;

    DRAWTEXT(DATE=TH,F5*1.003,'F5=0.500')COLORYELLOW;

    DRAWTEXT(DATE=TH,F6*1.003,'F6=0.618')COLORYELLOW;

    DRAWNUMBER(DATE=TH,F3,F3)COLORYELLOW;

    DRAWNUMBER(DATE=TH,F5,F5)COLORYELLOW;

    DRAWNUMBER(DATE=TH,F6,F6)COLORYELLOW;

     

    FF3:=(AL-0.382*(AL-DJB));

    FF5:=(AL-0.5*(AL-DJB));

    FF6:=(AL-0.618*(AL-DJB));

    {DRAWLINE(DATE=TL,FF3,DATE=TODAY,FF3,1),LINETHICK4,POINTDOT,COLORWHITE;

    DRAWLINE(DATE=TL,FF5,DATE=TODAY,FF5,1),LINETHICK4,POINTDOT,COLORWHITE;

    DRAWLINE(DATE=TL,FF6,DATE=TODAY,FF6,1),LINETHICK4,POINTDOT,COLORWHITE;}

    DRAWTEXT(DATE=TL,FF3*1.003,'F3=0.382')COLORWHITE;

    DRAWTEXT(DATE=TL,FF5*1.003,'F5=0.500')COLORWHITE;

    DRAWTEXT(DATE=TL,FF6*1.003,'F6=0.618')COLORWHITE;

    DRAWNUMBER(DATE=TL,FF3,FF3);

    DRAWNUMBER(DATE=TL,FF5,FF5);

    DRAWNUMBER(DATE=TL,FF6,FF6);

     

    {反向}

    TL1:=1000000+DA1;

    TH1:=1000000+DB1;

    TC1:=1000000+DC1;

    TO1:=1000000+DO1;

    AL1:=IF(REFDATE(CLOSE,TL1)>REFDATE(CLOSE,TH1),REFDATE(HIGH,TL1),REFDATE(LOW,TL1));

    BH1:=IF(REFDATE(CLOSE,TL1)>REFDATE(CLOSE,TH1),REFDATE(LOW,TH1),REFDATE(HIGH,TH1));

    CZF1:=IF(REFDATE(CLOSE,TL1)>REFDATE(CLOSE,TH1),REFDATE(HIGH,TC1),REFDATE(LOW,TC1));

    DJB1:=IF(REFDATE(CLOSE,TL1)>REFDATE(CLOSE,TH1),REFDATE(LOW,TO1),REFDATE(HIGH,TO1));

    OP1:=BH1-AL1+CZF1;

    COP1:=0.618*(BH1-AL1)+CZF1;

    XOP1:=IF((1.618*(BH1-AL1)+CZF1)<0,OP1,1.618*(BH1-AL1)+CZF1);

    STICKLINE(DATE=TC1,CZF1,XOP1,0,-1),COLORGREEN;

    DRAWLINE(DATE=TC1,COP1,DATE=TODAY,COP1,1)DOTLINE,COLORGREEN;

    DRAWLINE(DATE=TC1,OP1,DATE=TODAY,OP1,1)DOTLINE,COLORGREEN;

    DRAWLINE(DATE=TC1,XOP1,DATE=TODAY,XOP1,1)DOTLINE,COLORGREEN;

    DRAWTEXT(DATE=TC1,COP1*1.003,'COP=0.618')COLORGREEN;

    DRAWTEXT(DATE=TC1,OP1*1.003,'OP=1.000')COLORGREEN;

    DRAWTEXT(DATE=TC1,XOP1*1.003,'XOP=1.618')COLORGREEN;

    DRAWNUMBER(DATE=TC1,COP1,COP1)COLORMAGENTA;

    DRAWNUMBER(DATE=TC1,OP1,OP1)COLORMAGENTA;

    DRAWNUMBER(DATE=TC1,XOP1,XOP1)COLORMAGENTA;

     

    DRAWLINE(DATE=TO1,DJB1,DATE=TL1,AL1,0)CIRCLEDOT,COLORYELLOW;

    DRAWLINE(DATE=TL1,AL1,DATE=TH1,BH1,0)LINETHICK2,COLORCYAN;

    DRAWLINE(DATE=TH1,BH1,DATE=TC1,CZF1,0)LINETHICK2,COLORYELLOW;

     

    F3~:=(BH1-0.382*(BH1-AL1));

    F5~:=(BH1-0.5*(BH1-AL1));

    F6~:=(BH1-0.618*(BH1-AL1));

    F8~:=(BH1-0.809*(BH1-AL1));

    {DRAWLINE(DATE=TH1,F3~,DATE=TODAY,F3~,1),LINETHICK4,POINTDOT,COLORCYAN;

    DRAWLINE(DATE=TH1,F5~,DATE=TODAY,F5~,1),LINETHICK4,POINTDOT,COLORCYAN;

    DRAWLINE(DATE=TH1,F6~,DATE=TODAY,F6~,1),LINETHICK4,POINTDOT,COLORCYAN;

    DRAWLINE(DATE=TH1,F8~,DATE=TODAY,F8~,1),LINETHICK4,POINTDOT,COLORCYAN;}

    DRAWTEXT(DATE=TH1,F3~*1.003,'F3=0.382')COLORCYAN;

    DRAWTEXT(DATE=TH1,F5~*1.003,'F5=0.500')COLORCYAN;

    DRAWTEXT(DATE=TH1,F6~*1.003,'F6=0.618')COLORCYAN;

    DRAWTEXT(DATE=TH1,F8~*1.003,'F8=0.809')COLORCYAN;

     

    DRAWNUMBER(DATE=TH1,F3~,F3~)COLORCYAN;

    DRAWNUMBER(DATE=TH1,F5~,F5~)COLORCYAN;

    DRAWNUMBER(DATE=TH1,F6~,F6~)COLORCYAN;

    DRAWNUMBER(DATE=TH1,F8~,F8~)COLORCYAN;

     

    FF31:=(AL1-0.382*(AL1-DJB1));

    FF51:=(AL1-0.5*(AL1-DJB1));

    FF61:=(AL1-0.618*(AL1-DJB1));

    {DRAWLINE(DATE=TL1,FF31,DATE=TODAY,FF31,1),LINETHICK4,POINTDOT,COLORWHITE;

    DRAWLINE(DATE=TL1,FF51,DATE=TODAY,FF51,1),LINETHICK4,POINTDOT,COLORWHITE;

    DRAWLINE(DATE=TL1,FF61,DATE=TODAY,FF61,1),LINETHICK4,POINTDOT,COLORWHITE;}

    DRAWTEXT(DATE=TL1,FF31*1.003,'F3=0.382')COLORWHITE;

    DRAWTEXT(DATE=TL1,FF51*1.003,'F5=0.500')COLORWHITE;

    DRAWTEXT(DATE=TL1,FF61*1.003,'F6=0.618')COLORWHITE;

    DRAWNUMBER(DATE=TL1,FF31,FF31);

    DRAWNUMBER(DATE=TL1,FF51,FF51);

    DRAWNUMBER(DATE=TL1,FF61,FF61);

     

     

    {顶底背离}

    LC:=REF(CLOSE,1);

    RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);

    FF:=EMA(CLOSE,3);

    MA15:=EMA(CLOSE,21);

    DRAWTEXT(CROSS(FF,MA15),(LOW * 0.99),'底背离'),COLORRED;

    {DRAWICON(CROSS(FF,MA15),(LOW * 0.99),7); }

    {顶背离}

    RSI1:=((SMA(MAX((CLOSE - (REF(CLOSE,1))),0),3,1) / SMA(ABS((CLOSE - (REF(CLOSE,1)))),3,1))* 100);

    DRAWTEXT(CROSS(88,RSI1) AND  (MA(C,3))>(EMA(C,3)) ,(HIGH + 0.3),'顶背离'),COLORGREEN;

    {DRAWICON(CROSS(88,RSI1) AND  (MA(C,3))>(EMA(C,3)) ,(HIGH + 0.3),8); };

    DRAWTEXT(REF(C,BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1))+1)>C AND

    REF("MACD.DIF",BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1))+1)

    <"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA")

    >0,L-0.02,'MACD底背离'),COLORRED;{MACD底背离}

    DRAWTEXT(REF(C,BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1))+1)>C AND

    REF("KDJ.K",BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1))+1)<"KDJ.K" AND

    CROSS("KDJ.K","KDJ.D"),L-0.10,'KDJ底背离'),COLORBLUE;{KDJ底背离}

    DRAWTEXT(REF(C,BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1))+1)>C AND

    REF("RSI.RSI1",BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1))+1)

    <"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2")

    >0,L-0.18,'RSI底背离');{RSI底背离};

    DRAWTEXT(REF(C,BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1))+1)

    AND REF("MACD.DIF",BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1))+1)

    >"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF")

    >0,H+0.16,'MACD顶背离'),COLORGREEN;{MACD顶背离};

    DRAWTEXT(REF(C,BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1))+1)

    AND REF("KDJ.K",BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1))+1)

    >"KDJ.K" AND CROSS("KDJ.D","KDJ.K")>0,H+0.08,'KDJ顶背离');{KDJ顶背离};

    {涨跌提示}

    涨停:=IF((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(C,1)),1,0);

    STICKLINE(涨停,OPEN,CLOSE,1.5,0),COLORYELLOW;

    跌停:=IF((REF(C,1)-C)*100/REF(C,1)>=(10-0.01*100/REF(C,1)),1,0);

    STICKLINE(跌停,OPEN,CLOSE,1.5,0),COLORWHITE;

    机构:=(L2_VOL(0,0) - L2_VOL(0,1))*VOL/CAPITAL;
     

     


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信飞越彩泓帝叠公式 加入收藏