大智慧布林极限指标公式

input:n(34),k(3);

Var1:=MA(CLOSE,20);

布林极限:=100*(CLOSE-Var1)/stD(CLOSE,20);

布林K值:=EMA(布林极限,10);

Var2:=EMA(布林极限,5);

Var3:=EMA(布林K值,5);

Var4:=EMA(HHV(HIGH,500),21);

Var5:=EMA(HHV(HIGH,250),21);

Var6:=EMA(HHV(HIGH,90),21);

Var7:=EMA(LLV(LOW,500),21);

Var8:=EMA(LLV(LOW,250),21);

Var9:=EMA(LLV(LOW,90),21);

VarA:=EMA((Var7*0.96+Var8*0.96+Var9*0.96+Var4*0.558+Var5*0.558+Var6*0.558)/6,21);

VarB:=EMA((Var7*1.25+Var8*1.23+Var9*1.2+Var4*0.55+Var5*0.55+Var6*0.65)/6,21);

VarC:=EMA((Var7*1.3+Var8*1.3+Var9*1.3+Var4*0.68+Var5*0.68+Var6*0.68)/6,21);

DRAWTEXTAbs(5,5,'指标网 www.zhibiaow.com'),linethick1,COLOR00EEff;

VarD:=EMA((VarA*3+VarB*2+VarC)/6*1.738,21);

VarE:=REF(LOW,1);

VarF:=SMA(ABS(LOW-VarE),3,1)/SMA(MAX(LOW-VarE,0),3,1)*100;

Var10:=IF(CLOSE*1.35<=VarD,VarF*10,VarF/10);

Var11:=EMA(Var10,3);

Var12:=LLV(LOW,30);

Var13:=HHV(Var11,30);

Var14:=IF(LOW<=Var12,(Var11+Var13*2)/2,0);

Var15:=EMA(Var14,3)/500-100;

Var16:=0.2*Var15;

Var17:=1.2*Var15;

Var18:=(2*CLOSE+HIGH+LOW)/4;

Var19:=LLV(LOW,34);

Var1A:=HHV(HIGH,34);

Var1B:=(Var18-LLV(LOW,7))/(HHV(HIGH,7)-LLV(LOW,7))*100;

Var1C:=EMA(Var1B,3);

Var1D:=EMA(Var1C,3);

Var1E:=EMA((Var18-Var19)/(Var1A-Var19)*100,9);

Var1F:=EMA(0.667*REF(Var1E,1)+0.333*Var1E,3);

Var20:=LLV(HIGH,240);

Var21:=100*(CLOSE-Var20)/Var20;

Var22:=HHV(HIGH,240);

Var23:=100*(Var22-CLOSE)/CLOSE;

Var24:=REF(HHV(CLOSE,60),1);

Var25:=REF(LLV(CLOSE,60),1);

Var26:=100*(CLOSE-Var25)/(Var24-Var25);

SD1:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;

个股A:=MA(SD1,K);

SD2:=("1a0002$CLOSE"-LLV("1a0002$LOW",N))/(HHV("1a0002$HIGH",N)-LLV("1a0002$LOW",N))*100;

大盘A:=MA(SD2,K);

差值:=个股A-大盘A;

IF(差值>=0,差值*2,0), COLORRED,STICK,LINETHICK3;

IF(差值<0,差值*2, 0), COLOR556600,STICK,LINETHICK3;

DRAWTEXT(DISPSTATUS=2 AND VAR3>0,-150,'强'),COLORFF00FF,ALIGN2;

DRAWTEXT(DISPSTATUS=2 AND VAR3<0,-150,'弱'),COLOR00FFFF,ALIGN2;

PARTLINE(0,差值>=0,RGB(130,0,30),差值<0,RGB(0,80,70)),LINETHICK5;

STICKLINE(布林极限>=布林K值,布林极限,布林K值,6,0),colormagenta;

STICKLINE(布林极限<布林K值,布林K值,布林极限,8,0),COLOR006600;

STICKLINE(布林极限<布林K值,布林K值,布林极限,4,0),COLOR009900;

STICKLINE(布林极限<布林K值,布林K值,布林极限,1,0),COLOR00EE00;

STICKLINE(Var2>=Var3,Var2,Var3,6,0),colormagenta;

STICKLINE(Var2<Var3,Var3,Var2,8,0),COLOR006600;

STICKLINE(Var2<Var3,Var3,Var2,4,0),COLOR009900;

STICKLINE(Var2<Var3,Var3,Var2,1,0),COLOR00EE00;

STICKLINE(crOSS(布林极限,布林K值),布林极限,布林K值,6,0),colormagenta;

STICKLINE(布林极限>=170,布林极限,布林K值,7,0),COLOR0033cc;

STICKLINE(布林极限>=170,布林极限,布林K值,4,0),COLOR0066ff;

STICKLINE(布林极限>=170,布林极限,布林K值,1,0),COLOR00ffff;