以下是通达信博尔量化交易系统源码

通达信博尔量化交易系统源码:

   周收:=REF(C#WEEK,1);

   周高:=REF(H#WEEK,1);

   周低:=REF(L#WEEK,1);

   做空概率95%:周收+(周高-周低)*0.618,COLORBLUE;

   做空概率68%:周收+(周高-周低)*0.382,COLORRED;

   做多概率68%:周收-(周高-周低)*0.382,COLORGREEN;

   做多概率95%:周收-(周高-周低)*0.618,COLORmaGENTA;

   做空95:HHV((HIGH+LOW+OPEN+2*CLOSE)/5+H-L,5),COLORBLUE;

   做空68:HHV((HIGH+LOW+OPEN+2*CLOSE)/5*2-L,5),COLORRED;

   平衡点:LLV((HIGH+LOW+OPEN+2*CLOSE)/5,3),COLORGRAY,DOTLINE;

   做多68:LLV((HIGH+LOW+OPEN+2*CLOSE)/5*2-H,8),COLORGREEN;

   做多95:LLV((HIGH+LOW+OPEN+2*CLOSE)/5-H+L,8),COLORFAABEC;

   F:=100*(C-REF(C,1))/REF(C,1);

   博尔:=IF(C<REF(O,1)ANDF<0,1,0);

   P1:=博尔;

   量化:=IF(C<REF(O,2)ANDF<0,1,0);

   P2:=量化;

   STICKLINE(P1=0ANDREF(P1,1)=1ANDP2=0ANDREF(P2,1)=1,OPEN,CLOSE,3,0),COLOR0055FF;

   STICKLINE(P1=1ANDREF(P1,1)=0ANDP2=1ANDREF(P2,1)=0,OPEN,CLOSE,3,0),COLORGREEN;

   日线锁定:=(PERIOD==4);

   ZBSLPG:=22;

   {//01.四海腾龙}

   LTSHPG:=100-100*(HHV(H,40)-C)/(HHV(H,40)-LLV(L,40));

   ZB01:=LTSHPG>=50;

   {//02.MACD}

   DIFPG:=EMA(C,12)-EMA(C,26);

   DEAPG:=EMA(DIFPG,9);

   ZB02:=DIFPG>DEAPG;

   {//03~05.趋势顶底}

   APG:=MA((-100)*(HHV(H,34)-C)/(HHV(H,34)-LLV(L,34)),19);

   BPG:=(-100)*(HHV(H,14)-C)/(HHV(H,14)-LLV(L,14));

   DPG:=EMA((-100)*(HHV(H,34)-C)/(HHV(H,34)-LLV(L,34)),4);

   QSDDLONG:=APG+100;

   QSDDSHORT:=BPG+100;

   QSDDMID:=DPG+100;

   ZB03:=QSDDSHORT>QSDDMID;

   ZB04:=QSDDSHORT>QSDDLONG;

   ZB05:=QSDDMID>QSDDLONG;

   {//06.KDJ}

   RSVPG:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;

   KPG:=SMA(RSVPG,3,1);

   DPG2:=SMA(KPG,3,1);

   ZB06:=KPG>DPG2;

   {//07~09.RSI}

   LCPG:=REF(CLOSE,1);

   RPG1:=SMA(MAX(C-LCPG,0),6,1)/SMA(ABS(C-LCPG),6,1)*100;

   RPG2:=SMA(MAX(C-LCPG,0),12,1)/SMA(ABS(C-LCPG),12,1)*100;

   RPG3:=SMA(MAX(C-LCPG,0),24,1)/SMA(ABS(C-LCPG),24,1)*100;

   ZB07:=RPG1>RPG2;

   ZB08:=RPG1>RPG3;

   ZB09:=RPG2>RPG3;

   {//10~12.MA}

   ZB10:=MA(C,5)>MA(C,10);

   ZB11:=MA(C,5)>MA(C,20);

   ZB12:=MA(C,10)>MA(C,20);

   {//13.主力进出}

   MAVPG:=(C*2+H+L)/4;

   SKPG:=EMA(MAVPG,13)-EMA(MAVPG,34);

   SDPG:=EMA(SKPG,5);

   ZB13:=(2*(SKPG-SDPG))>((-2)*(SKPG-SDPG));

   {//14~16.多空线}

   MIDPGX:=(3*C+O+L+H)/6;

   DKXPG1:=WMA(MIDPGX,5);

   DKXPG2:=WMA(MIDPGX,10);

   DKXPG3:=WMA(MIDPGX,20);

   ZB14:=DKXPG1>REF(DKXPG1,1);

   ZB15:=DKXPG2>REF(DKXPG2,1);

   ZB16:=DKXPG3>REF(DKXPG3,1);

   {//17.G08}

   G08PG:=EMA(C,34);

   ZB17:=G08PG>REF(G08PG,1);

   {//18.B08}

   B08PG:=(C-LLV(L,60))/(HHV(H,60)-LLV(L,60))*80;

   BPG1:=SMA(B08PG,7,1);

   BPG2:=SMA(BPG1,3,1);

   ZB18:=BPG1>BPG2;

   {//19.BBI}

   BBIPG:=(MA(C,3)+MA(C,6)+MA(C,12)+MA(C,24))/4;

   ZB19:=C>BBIPG;

   {//20~21.速率表}

   MIDSLB:=(3*C+L+O+H)/6;

   E1:=EMA(10000*(WMA(MIDSLB,30)-REF(WMA(MIDSLB,30),1))/REF(WMA(MIDSLB,30),1),10);

   E2:=EMA(E1,2);

   E3:=EMA(E2,2);

   E4:=EMA(E3,2);

   E5:=EMA(E4,2);

   E6:=EMA(E5,2);

   E7:=EMA(E6,2);

   ZB20:=E2>E3ANDE3>E4ANDE4>E5ANDE5>E6ANDE6>E7;

   ZB21:=E2>REF(E2,1)ANDE3>REF(E3,1)ANDE4>REF(E4,1)ANDE5>REF(E5,1)ANDE6>REF(E6,1)ANDE7>REF(E7,1);

   {//22.趋势向量}

   TRPG1:=MAX(MAX((H-L),ABS(H-REF(C,1))),ABS(REF(C,1)-L));

   ATRPG1:=EMA(TRPG1,14);

   HDPG:=H-REF(H,1);

   LDPG:=REF(L,1)-L;

   PDMPG:=EMA(IFF(HDPG>0ANDHDPG>LDPG,HDPG,0),14);

   MDMPG:=EMA(IFF(LDPG>0ANDLDPG>HDPG,LDPG,0),14);

   PDIPG:=PDMPG/ATRPG1;

   MDIPG:=MDMPG/ATRPG1;

   XLPG:=(PDIPG-MDIPG)/(PDIPG+MDIPG);

   ZB22:=XLPG>0;

   量化指标:(ZB01+ZB02+ZB03+ZB04+ZB05+ZB06+ZB07+ZB08+ZB09+ZB10+

   ZB11+ZB12+ZB13+ZB14+ZB15+ZB16+ZB17+ZB18+ZB19+ZB20+ZB21+ZB22)*(100/ZBSLPG)NODRAW,COLORRED;

   ▲35线:35,COLORGREEN;

   ▲50线:50,COLORYELLOW;

   ▲80线:80,COLORRED;

   {//3D柱线形式}

   STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,3,0),COLORRED;

   STICKLINE(量化指标<REF(量化指标,1),0,量化指标,3,0),COLORFFFF00;

   STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,3,0),COLOR0000FF;

   STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,2.7.5,0),COLOR001BFF;

   STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,2.4,0),COLOR0035FF;

   STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,2.1,0),COLOR0050FF;

   STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,1.8,0),COLOR0062FF;

   STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,1.5,0),COLOR007AFF;

   STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,1.2,0),COLOR0089FF;

   STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,0.9,0),COLOR009CFF;

   STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,0.6,0),COLOR00C0FF;

   STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,0.3,0),COLOR00EAFF;

通达信博尔量化交易系统截图

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