把这个BOLL指标换成通达信能用的
2020/7/14 17:52:56
公式编写说明:
【大智慧】DRAWTEXTREL(300,1,'---------------[长 线 短 作:抓 住 主 升 浪]----------------'),LINETHICK1,Color80BEFF;DX:=(C+H+L+O)/4;MTM:=C-REF(C,1);ZLGJ:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);FB:=MA(DX,17)+ABS(MA(DX,17)-REF(MA(DX,17),1));FS:=MA(DX,17)+MA(DX,17)-REF(MA(DX,17),1);买1:=IF(LLV(ZLGJ,2)=LLV(ZLGJ,7) AND COUNT(ZLGJ<0,2) AND CROSS(ZLGJ,MA(ZLGJ,2)),1,0);卖1:=IF(HHV(ZLGJ,2)=HHV(ZLGJ,7) AND COUNT(ZLGJ>50,2) AND CROSS(MA(ZLGJ,2),ZLGJ),1,0);STICKLINE(FILTER(买1=1,5),C,O,8,0),COLORred;STICKLINE(FILTER(卖1=1,1),C,O,8,0),COLORgreen;MAa:=MA(CLOSE,10);MA101:MA(MAa,5),colorred,linethick3;partline(ma101,ma101>=REF(ma101,1),RGB(255,0,0),ma1011080822,0,1);VAR61:=EMA(HHV(HIGH,500),21);VAR71:=EMA(HHV(HIGH,250),21);VAR81:=EMA(HHV(HIGH,90),21);VAR91:=EMA(LLV(LOW,500),21);VARA1:=EMA(LLV(LOW,250),21);VARB1:=EMA(LLV(LOW,90),21);VARC1:=EMA((VAR91*0.96+VARA1*0.96+VARB1*0.96+VAR61*0.558+VAR71*0.558+VAR81*0.558)/6,21);VARD1:=EMA((VAR91*1.25+VARA1*1.23+VARB1*1.2+VAR61*0.55+VAR71*0.55+VAR81*0.65)/6,21);VARE1:=EMA((VAR91*1.3+VARA1*1.3+VARB1*1.3+VAR61*0.68+VAR71*0.68+VAR81*0.68)/6,21);VARF1:=EMA((VARC1*3+VARD1*2+VARE1)/6*1.738,21);VAR101:=REF(LOW,1);VAR111:=(SMA(ABS(LOW-VAR101),3,1))/(SMA(MAX(LOW-VAR101,0),3,1))*100;VAR121:=EMA(IF(CLOSE*1.35<=VARF1,VAR111*10,VAR111/10),3);VAR131:=LLV(LOW,30);VAR141:=HHV(VAR121,30);VAR151:=IF(MA(CLOSE,58),1,0);VAR161:=(EMA(IF(LOW<=VAR131,(VAR121+VAR141*2)/2,0),3))/(618)*VAR151;VAR171:=(IF(VAR161>50,50,VAR161))/20*15*VART;B1:=(HIGH+LOW+CLOSE)/3;B6:=HHV(B1,4*15);B7:=LLV(B1,4*15);B8:=B6-B7;飞龙顶底线:=MA((B1-B7)/B8,2)*80;均5:=MA(CLOSE,4);X7:=EMA(EMA(EMA(HIGH,9),9),9);海底:=X7*0.92;海底2:=X7*0.933;海底3:=X7*0.897;天际:=X7*1.05;中线:=SMA(LOW,5,1);中轨道:=MA(CLOSE,2);MA12:=MA(CLOSE,12);MA42:=MA(CLOSE,42);DRAWTEXT(CROSS(中轨道,海底) AND VAR171 AND LOW<=海底 AND MA20-REF(MA20,1)>0 AND CLOSE>海底,LOW-0.06,'小底不急');DRAWTEXT(CROSS(中轨道,海底3) AND CLOSE>OPEN AND CLOSE-REF(CLOSE,4)>0 AND LOW<=海底3 AND CLOSE>海底3,LOW,'底2');MA30:=MA(CLOSE,30);V1:=HHVBARS(HIGH,100);V2:=CROSS(MA(CLOSE,10),MA(CLOSE,30));V3:=(V1>60 AND V2)*100;M3:=EMA(CLOSE,3);M8:=EMA(CLOSE,8);M13:=EMA(M8,13);M62:=EMA(M8,62);VAR1:=EMA(M13,62);M81:=EMA(M62,81);M144:=EMA(VAR1,144);VAR2:=(CLOSE+HIGH+LOW)/3;VAR33:=EMA(VAR2,10);VAR44:=REF(VAR33,1);DRAWTEXT(LOW<=下档线 AND LOW<=短期支撑 AND 短期支撑<=下档线 AND MA20-REF(MA20,1)>0,LOW,'←绝佳买点'),colorred;DRAWTEXT(FILTER(HIGH>压力 AND CLOSE<压力 AND HIGH>阻挡线,8),HIGH,'←减仓');A2:=MA(CLOSE,5);A3:=MA(CLOSE,5);IF(A2>MA(CLOSE,20),MA(CLOSE,20),A2),LINETHICK2,colorblue;IF(A3<MA(CLOSE,20),MA(CLOSE,20),A3),LINETHICK2,colorgreen
公式源码示例:
DX:=(C+H+L+O)/4;
MTM:=C-REF(C,1);
ZLGJ:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
FB:=MA(DX,17)+ABS(MA(DX,17)-REF(MA(DX,17),1));
FS:=MA(DX,17)+MA(DX,17)-REF(MA(DX,17),1);
买1:=IF(LLV(ZLGJ,2)=LLV(ZLGJ,7) AND COUNT(ZLGJ<0,2) AND CROSS(ZLGJ,MA(ZLGJ,2)),1,0);
卖1:=IF(HHV(ZLGJ,2)=HHV(ZLGJ,7) AND COUNT(ZLGJ>50,2) AND CROSS(MA(ZLGJ,2),ZLGJ),1,0);
STICKLINE(FILTER(买1=1,5),C,O,3,0),COLORFF00FF;
STICKLINE(FILTER(卖1=1,1),C,O,3,0),COLORGREEN;
MAA:=MA(CLOSE,10);
MA101:MA(MAA,5),COLORRED,LINETHICK3;
IF(MA101>=REF(MA101,1),MA101,DRAWNULL),COLORRED;
IF(MA101<REF(MA101,1),MA101,DRAWNULL),COLOR00FF00;
VAR1A:=(REF(HIGH,1)+REF(LOW,1))/2;
压力线:XMA(CLOSE,20)+2*STD(CLOSE,20),LINETHICK1;
支撑线:XMA(CLOSE,21)-2*STD(CLOSE,21),LINETHICK1;
VAR2A:=CROSS(VAR1A,压力线);
VAR3A:=REF(CLOSE,1);
VAR4A:=SMA(MAX(CLOSE-VAR3A,0),7,1)/SMA(ABS(CLOSE-VAR3A),7,1)*100;
VAR5A:=CROSS(79,VAR4A);
VAR6A:=FILTER(VAR5A,4);
DRAWTEXT(FILTER(VAR6A OR VAR2A,5),HIGH*1.02,'大减'),COLORGREEN,LINETHICK2;
阻挡线:=SMA(HIGH,21,2)*1.035;
下档线:=SMA(LOW,21,2)*0.96;
短期支撑:=LLV(CLOSE,20);
趋势线:=SMA(LOW,8,1);
VAR2:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;
VAR3:=(CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100;
VAR4:=SMA(VAR3,9,1);
VAR5:=SMA(VAR4,3,1);
J:=3*VAR4-2*VAR5;
A2:=EMA(VAR4,3);
A3:=EMA(A2,3);
A4:=EMA(A3,3);
A5:=EMA(A4,3);
AA:=EMA(A5,6);
中期大底:=LLV(LOW,30);
VAR9:=HHVBARS(HIGH,50);
VAR11:=(CLOSE-REF(OPEN,VAR9))/REF(OPEN,VAR9)*100;
DRAWTEXT(CROSS(A4,AA) AND VAR11<-23,LOW-0.3,'博弈买入'),COLORRED;
STICKLINE(CROSS(A4,AA) AND VAR11<-23,中期大底,中期大底-0.27,6,0),COLORFF0099;
CG:=MA(CLOSE,19);
CD:=MA(CLOSE,2);
MA20:=MA(CLOSE,20);
MA120:=MA(CLOSE,120);
VAR1:=(OPEN+LOW+HIGH+CLOSE)/4;
支撑:=EMA(VAR1,5);
压力1:=HHV(LOW,20);
压力:=HHV(支撑,60);
短期底部:=LLV(HIGH,30);
上1:=SMA(HIGH,21,2)*1.05;
VARQ:=MA(CLOSE,152);
VARW:=MA(CLOSE,194.16);
VARE:=VARW+2*STD(CLOSE,170);
VARR:=VARQ+2*STD(CLOSE,170);
VART:=IF(DATE>1080822,0,1);
VAR61:=EMA(HHV(HIGH,500),21);
VAR71:=EMA(HHV(HIGH,250),21);
VAR81:=EMA(HHV(HIGH,90),21);
VAR91:=EMA(LLV(LOW,500),21);
VARA1:=EMA(LLV(LOW,250),21);
VARB1:=EMA(LLV(LOW,90),21);
VARC1:=EMA((VAR91*0.96+VARA1*0.96+VARB1*0.96+VAR61*0.558+VAR71*0.558+VAR81*0.558)/6,21);
VARD1:=EMA((VAR91*1.25+VARA1*1.23+VARB1*1.2+VAR61*0.55+VAR71*0.55+VAR81*0.65)/6,21);
VARE1:=EMA((VAR91*1.3+VARA1*1.3+VARB1*1.3+VAR61*0.68+VAR71*0.68+VAR81*0.68)/6,21);
VARF1:=EMA((VARC1*3+VARD1*2+VARE1)/6*1.738,21);
VAR101:=REF(LOW,1);
VAR111:=(SMA(ABS(LOW-VAR101),3,1))/(SMA(MAX(LOW-VAR101,0),3,1))*100;
VAR121:=EMA(IF(CLOSE*1.35<=VARF1,VAR111*10,VAR111/10),3);
VAR131:=LLV(LOW,30);
VAR141:=HHV(VAR121,30);
VAR151:=IF(MA(CLOSE,58),1,0);
VAR161:=(EMA(IF(LOW<=VAR131,(VAR121+VAR141*2)/2,0),3))/(618)*VAR151;
VAR171:=(IF(VAR161>50,50,VAR161))/20*15*VART;
B1:=(HIGH+LOW+CLOSE)/3;
B6:=HHV(B1,4*15);
B7:=LLV(B1,4*15);
B8:=B6-B7;
飞龙顶底线:=MA((B1-B7)/B8,2)*80;
均5:=MA(CLOSE,4);
X7:=EMA(EMA(EMA(HIGH,9),9),9);
海底:=X7*0.92;
海底2:=X7*0.933;
海底3:=X7*0.897;
天际:=X7*1.05;
中线:=SMA(LOW,5,1);
中轨道:=MA(CLOSE,2);
MA12:=MA(CLOSE,12);
MA42:=MA(CLOSE,42);
DRAWTEXT(CROSS(中轨道,海底) AND VAR171 AND LOW<=海底 AND MA20-REF(MA20,1)>0 AND CLOSE>海底,LOW-0.06,'小底不急');
DRAWTEXT(CROSS(中轨道,海底3) AND CLOSE>OPEN AND CLOSE-REF(CLOSE,4)>0 AND LOW<=海底3 AND CLOSE>海底3,LOW,'底2');
MA30:=MA(CLOSE,30);
V1:=HHVBARS(HIGH,100);
V2:=CROSS(MA(CLOSE,10),MA(CLOSE,30));
V3:=(V1>60 AND V2)*100;
M3:=EMA(CLOSE,3);
M8:=EMA(CLOSE,8);
M13:=EMA(M8,13);
M62:=EMA(M8,62);
VAR1M:=EMA(M13,62);
M81:=EMA(M62,81);
M144:=EMA(VAR1M,144);
VAR2M:=(CLOSE+HIGH+LOW)/3;
VAR33:=EMA(VAR2M,10);
VAR44:=REF(VAR33,1);
DRAWTEXT(LOW<=下档线 AND LOW<=短期支撑 AND 短期支撑<=下档线 AND MA20-REF(MA20,1)>0,LOW,'←绝佳买点'),COLORRED;
DRAWTEXT(FILTER(HIGH>压力 AND CLOSE<压力 AND HIGH>阻挡线,8),HIGH,'←减仓');
A2M:=MA(CLOSE,5);
A3M:=MA(CLOSE,5);
IF(A2M>MA(CLOSE,20),MA(CLOSE,20),A2M),LINETHICK2,COLORBLUE;
IF(A3M<MA(CLOSE,20),MA(CLOSE,20),A3M),LINETHICK2,COLORGREEN;
看股吧公 式 www.kanguba.co m
其它股票公式列表