「翔博精选指标」零点BBIBOLL,多空布林线系统,公开通达信公式源
2022-03-11原创 编 辑:翔博软件
{公式名称: 零点BBIBOLL
公式描述: 多空布林线系统
参数数量: 2
参数1: N, 最小: 2, 最大: 100, 缺省: 10
参数2: M, 最小: 2, 最大: 100, 缺省: 3
公式类型: 技术指标公式-趋势型
画线方法: 主图叠加
公式源码:}
VAR1:=CLOSE;
BBIBOLL:(MA(VAR1,3)+MA(VAR1,6)+MA(VAR1,12)+MA(VAR1,24))/4;
UPR:BBIBOLL+M*STD(BBIBOLL,N);
DWN:BBIBOLL-M*STD(BBIBOLL,N);
VAR2:=CLOSE=HHV(CLOSE,13);
VAR3:=BARSLAST(FILTER(CROSS(0.8,VAR2),2))+1;
高点:REF(CLOSE,VAR3),POINTDOT,COLORMAGENTA;
突破:CROSS(CLOSE,REF(高点,1)),NODRAW,COLORYELLOW;
STICKLINE(VAR3<=6,高点,高点,3,0),COLORMAGENTA;
DRAWTEXT(突破,LOW,668),COLORYELLOW;
VAR4:=CLOSE=LLV(CLOSE,13);
VAR5:=BARSLAST(FILTER(CROSS(0.8,VAR4),2))+1;
低点:REF(CLOSE,VAR5),POINTDOT,COLORGREEN;
STICKLINE(VAR5<=6,低点,低点,3,0),COLORGREEN;
VAR6:=REF(CLOSE,1);
VAR7:=SMA(MAX(CLOSE-VAR6,0),3,1)/SMA(ABS(CLOSE-VAR6),3,1)*100;
VAR8:=EMA(CLOSE,3);
VAR9:=EMA(CLOSE,21);
DRAWTEXT(CROSS(VAR8,VAR9),LOW*0.99,95),COLORRED;
DRAWRECTREL(0,480,205,589,RGB(10,1,30));
VAR10:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,0),FROMOPEN);
VAR11:=-SUM(IF(CLOSE<REF(CLOSE,1),VOL,0),FROMOPEN);
VAR12:=VAR10+VAR11;
DRAWBAND(VAR12,RGB(150,0,150),0,RGB(0,100,0)),NODRAW;
资金流量:VAR12,NODRAW;
资金比:VAR12/SUM(VOL,FROMOPEN)*100,NODRAW;
VAR13:=IF(资金比>=0,(资金比+100)/2,100-ABS((资金比-100)/2));
VAR14:=(NVI*0.5+REF(NVI,1)*0.33+REF(NVI,2)*0.17)*SUM(CLOSE,FROMOPEN)/FROMOPEN;
VAR15:=SUM(IF(CLOSE>REF(CLOSE,1),VAR14*VOL,0),FROMOPEN);
VAR16:=-SUM(IF(CLOSE<REF(CLOSE,1),VAR14*VOL,0),FROMOPEN);
攻击流量:VAR15+VAR16,NODRAW;
NOTEXT攻击线:攻击流量,NODRAW;
攻击比:攻击流量/SUM(VOL,FROMOPEN)*100,NODRAW,COLORRED;
VAR17:=IF(攻击比>=0,攻击比+50,100-ABS(攻击比-50));
DRAWTEXT_FIX(1,0.5,0,20,688),COLORRED;
DRAWRECTREL(20,570,180,540,RGB(0,75,200));
DRAWRECTREL(20,570,30,540,RGB(0,250,50));
DRAWRECTREL(20,570,15+CONST(VAR13*150/100),540,RGB(200,50,0));
DRAWTEXT_FIX(1,0,0.5,0,STRCAT(STRCAT(689,CON2STR(VAR13,2)),690)),COLORYELLOW;
DRAWTEXT_FIX(1,5,0.9,0,EXTERNSTR(0,5)),COLORRED;
DRAWTEXT_FIX(1,0,0.2,0,EXTERNSTR(0,5)),COLORRED;
VAR18:=SMA(MAX(CLOSE-REF(CLOSE,1),0),3,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),3,1)*100;
DRAWTEXT(CROSS(88,VAR18) AND MA(CLOSE,3)>EMA(CLOSE,3),HIGH+0.3,96),COLORGREEN;
DRAWTEXT(REF(CLOSE,BARSLAST(REF(CROSS(MACD.DIF,MACD.DEA),1))+1)>CLOSE AND REF(MACD.DIF,BARSLAST(REF(CROSS(MACD.DIF,MACD.DEA),1))+1)<MACD.DIF AND CROSS(MACD.DIF,MACD.DEA)>0,LOW-0.02,97),COLORRED;
DRAWTEXT(REF(CLOSE,BARSLAST(REF(CROSS(KDJ.K,KDJ.D),1))+1)>CLOSE AND REF(KDJ.K,BARSLAST(REF(CROSS(KDJ.K,KDJ.D),1))+1)<KDJ.K AND CROSS(KDJ.K,KDJ.D),LOW-0.1,98),COLORBLUE;
DRAWTEXT(REF(CLOSE,BARSLAST(REF(CROSS(RSI.RSI1,RSI.RSI2),1))+1)>CLOSE AND REF(RSI.RSI1,BARSLAST(REF(CROSS(RSI.RSI1,RSI.RSI2),1))+1)<RSI.RSI1 AND CROSS(RSI.RSI1,RSI.RSI2)>0,LOW-0.18,99);
DRAWTEXT(REF(CLOSE,BARSLAST(REF(CROSS(MACD.DEA,MACD.DIF),1))+1)<CLOSE AND REF(MACD.DIF,BARSLAST(REF(CROSS(MACD.DEA,MACD.DIF),1))+1)>MACD.DIF AND CROSS(MACD.DEA,MACD.DIF)>0,HIGH+0.16,100),COLORGREEN;
DRAWTEXT(REF(CLOSE,BARSLAST(REF(CROSS(KDJ.D,KDJ.K),1))+1)<CLOSE AND REF(KDJ.K,BARSLAST(REF(CROSS(KDJ.D,KDJ.K),1))+1)>KDJ.K AND CROSS(KDJ.D,KDJ.K)>0,HIGH+0.08,101);
VAR19:=EMA(((2*CLOSE+HIGH+LOW)/4-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,8);
VAR20:=EMA(VAR19,5);
VAR21:=REFDATE(REF(HHV(HIGH,96),5),DATE);
VAR22:=REFDATE(REF(LLV(LOW,96),5),DATE);
VAR23:=(VAR21+VAR22)/2;
上轨:IF(VAR19>0 AND VAR19-VAR20<=0,VAR21,VAR21),COLORGREEN,LINETHICK3;
支撑:IF(VAR19>0 AND VAR19-VAR20<=0,VAR23,VAR23),COLORGREEN,LINETHICK2;
下轨:IF(VAR19>0 AND VAR19-VAR20<=0,VAR22,VAR22),COLORGREEN,LINETHICK2;
逃顶:IF(VAR19>0 AND VAR19-VAR20>0,VAR21,DRAWNULL),COLORRED,LINETHICK2;
压力:IF(VAR19>0 AND VAR19-VAR20>0,VAR23,DRAWNULL),COLORRED,LINETHICK2;
抄底:IF(VAR19>0 AND VAR19-VAR20>0,VAR22,DRAWNULL),COLORRED,LINETHICK2;
VAR24:=EMA(CLOSE,3)-EMA(CLOSE,6)-(EMA(CLOSE,6)-EMA(CLOSE,12))*(-100);
VAR25:=EMA(VAR24,3);
VAR26:=CROSS(VAR24,VAR25);
VAR27:=CROSS(VAR25,VAR24);
VAR28:=COST(99.900002);
VAR29:=COST(0.1);
VAR30:=(VAR28-VAR29)/50;
VAR31:=VAR28-VAR30;
VAR32:=VAR28-2*VAR30;
VAR33:=VAR28-3*VAR30;
VAR34:=VAR28-4*VAR30;
VAR35:=VAR28-5*VAR30;
VAR36:=VAR28-6*VAR30;
VAR37:=VAR28-7*VAR30;
VAR38:=VAR28-8*VAR30;
VAR39:=VAR28-9*VAR30;
VAR40:=VAR28-10*VAR30;
VAR41:=VAR28-11*VAR30;
VAR42:=VAR28-12*VAR30;
VAR43:=VAR28-13*VAR30;
VAR44:=VAR28-14*VAR30;
VAR45:=VAR28-15*VAR30;
VAR46:=VAR28-16*VAR30;
VAR47:=VAR28-17*VAR30;
VAR48:=VAR28-18*VAR30;
VAR49:=VAR28-19*VAR30;
VAR50:=VAR28-20*VAR30;
VAR51:=VAR28-21*VAR30;
VAR52:=VAR28-22*VAR30;
VAR53:=VAR28-23*VAR30;
VAR54:=VAR28-24*VAR30;
VAR55:=VAR28-25*VAR30;
VAR56:=VAR28-26*VAR30;
VAR57:=VAR28-27*VAR30;
VAR58:=VAR28-28*VAR30;
VAR59:=VAR28-29*VAR30;
VAR60:=VAR28-30*VAR30;
VAR61:=VAR28-31*VAR30;
VAR62:=VAR28-32*VAR30;
VAR63:=VAR28-33*VAR30;
VAR64:=VAR28-34*VAR30;
VAR65:=VAR28-35*VAR30;
VAR66:=VAR28-36*VAR30;
VAR67:=VAR28-37*VAR30;
VAR68:=VAR28-38*VAR30;
VAR69:=VAR28-39*VAR30;
VAR70:=VAR28-40*VAR30;
VAR71:=VAR28-41*VAR30;
VAR72:=VAR28-42*VAR30;
VAR73:=VAR28-43*VAR30;
VAR74:=VAR28-44*VAR30;
VAR75:=VAR28-45*VAR30;
VAR76:=VAR28-46*VAR30;
VAR77:=VAR28-47*VAR30;
VAR78:=VAR28-48*VAR30;
VAR79:=VAR28-49*VAR30;
VAR80:=WINNER(VAR28)*100-WINNER(VAR31)*100;
VAR81:=WINNER(VAR31)*100-WINNER(VAR32)*100;
VAR82:=WINNER(VAR32)*100-WINNER(VAR33)*100;
VAR83:=WINNER(VAR33)*100-WINNER(VAR34)*100;
VAR84:=WINNER(VAR34)*100-WINNER(VAR35)*100;
VAR85:=WINNER(VAR35)*100-WINNER(VAR36)*100;
VAR86:=WINNER(VAR36)*100-WINNER(VAR37)*100;
VAR87:=WINNER(VAR37)*100-WINNER(VAR38)*100;
VAR88:=WINNER(VAR38)*100-WINNER(VAR39)*100;
VAR89:=WINNER(VAR39)*100-WINNER(VAR40)*100;
VAR90:=WINNER(VAR40)*100-WINNER(VAR41)*100;
VAR91:=WINNER(VAR41)*100-WINNER(VAR42)*100;
VAR92:=WINNER(VAR42)*100-WINNER(VAR43)*100;
VAR93:=WINNER(VAR43)*100-WINNER(VAR44)*100;
VAR94:=WINNER(VAR44)*100-WINNER(VAR45)*100;
VAR95:=WINNER(VAR45)*100-WINNER(VAR46)*100;
VAR96:=WINNER(VAR46)*100-WINNER(VAR47)*100;
VAR97:=WINNER(VAR47)*100-WINNER(VAR48)*100;
VAR98:=WINNER(VAR48)*100-WINNER(VAR49)*100;
VAR99:=WINNER(VAR49)*100-WINNER(VAR50)*100;
VAR100:=WINNER(VAR50)*100-WINNER(VAR51)*100;
VAR101:=WINNER(VAR51)*100-WINNER(VAR52)*100;
VAR102:=WINNER(VAR52)*100-WINNER(VAR53)*100;
VAR103:=WINNER(VAR53)*100-WINNER(VAR54)*100;
VAR104:=WINNER(VAR54)*100-WINNER(VAR55)*100;
VAR105:=WINNER(VAR55)*100-WINNER(VAR56)*100;
VAR106:=WINNER(VAR56)*100-WINNER(VAR57)*100;
VAR107:=WINNER(VAR57)*100-WINNER(VAR58)*100;
VAR108:=WINNER(VAR58)*100-WINNER(VAR59)*100;
VAR109:=WINNER(VAR59)*100-WINNER(VAR60)*100;
VAR110:=WINNER(VAR60)*100-WINNER(VAR61)*100;
VAR111:=WINNER(VAR61)*100-WINNER(VAR62)*100;
VAR112:=WINNER(VAR62)*100-WINNER(VAR63)*100;
VAR113:=WINNER(VAR63)*100-WINNER(VAR64)*100;
VAR114:=WINNER(VAR64)*100-WINNER(VAR65)*100;
VAR115:=WINNER(VAR65)*100-WINNER(VAR66)*100;
VAR116:=WINNER(VAR66)*100-WINNER(VAR67)*100;
VAR117:=WINNER(VAR67)*100-WINNER(VAR68)*100;
VAR118:=WINNER(VAR68)*100-WINNER(VAR69)*100;
VAR119:=WINNER(VAR69)*100-WINNER(VAR70)*100;
VAR120:=WINNER(VAR70)*100-WINNER(VAR71)*100;
VAR121:=WINNER(VAR71)*100-WINNER(VAR72)*100;
VAR122:=WINNER(VAR72)*100-WINNER(VAR73)*100;
VAR123:=WINNER(VAR73)*100-WINNER(VAR74)*100;
VAR124:=WINNER(VAR74)*100-WINNER(VAR75)*100;
VAR125:=WINNER(VAR75)*100-WINNER(VAR76)*100;
VAR126:=WINNER(VAR76)*100-WINNER(VAR77)*100;
VAR127:=WINNER(VAR77)*100-WINNER(VAR78)*100;
VAR128:=WINNER(VAR78)*100-WINNER(VAR79)*100;
VAR129:=WINNER(VAR79)*100-WINNER(VAR29)*100;
STICKLINE(ISLASTBAR,VAR28,VAR28,VAR80*100,0),COLORGRAY;
STICKLINE(ISLASTBAR,VAR31,VAR31,VAR80*100,0),COLORGRAY;
STICKLINE(ISLASTBAR,VAR32,VAR32,VAR81*100,0),COLORGRAY;
STICKLINE(ISLASTBAR,VAR33,VAR33,VAR82*100,0),COLORGRAY;
STICKLINE(ISLASTBAR,VAR34,VAR34,VAR83*100,0),COLORGRAY;
STICKLINE(ISLASTBAR,VAR35,VAR35,VAR84*100,0),COLORGRAY;
STICKLINE(ISLASTBAR,VAR36,VAR36,VAR85*100,0),COLORGRAY;
STICKLINE(ISLASTBAR,VAR37,VAR37,VAR86*100,0),COLORGRAY;
STICKLINE(ISLASTBAR,VAR38,VAR38,VAR87*100,0),COLORGRAY;
STICKLINE(ISLASTBAR,VAR39,VAR39,VAR88*100,0),COLORGRAY;
STICKLINE(ISLASTBAR,VAR40,VAR40,VAR89*100,0),COLORGRAY;
STICKLINE(ISLASTBAR,VAR41,VAR41,VAR
.......
部分源码省略,请下载导入公式