以下是通达信红财神布林线主图指标公式源码和使用说明
通达信红财神布林线主图指标公式源码:
MA(CLOSE,5),COLORWHITE;
中轴:MA(CLOSE,21),COLORYELLOW;
上轨:中轴+2*STD(CLOSE,21),COLOR00FF00,POINTDOT,LINETHICK4;
下轨:中轴-2*STD(CLOSE,21),COLOR00FF00,POINTDOT,LINETHICK4;
DRAWTEXT_FIX(1,0.00,0.08,0,'所属行业')COLORYELLOW;
DRAWTEXT_FIX(1,0.06,0.08,0,HYBLOCK)COLORYELLOW;
DRAWTEXT_FIX(1,0.20,0.08,0,'所属地区')COLORYELLOW;
DRAWTEXT_FIX(1,0.26,0.08,0,DYBLOCK)COLORYELLOW;
bbi:(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
UPR:BBI+P*STD(BBI,N);
DWN:BBI-P*STD(BBI,N);
DRAWICON((zig(3,5) REF(ZIG(3,5),1))AND(REF(ZIG(3,5),1) =REF(ZIG(3,5),2))AND(REF(ZIG(3,5),2) =REF(ZIG(3,5),3)),LOW*0.98,1);
DRAWICON((ZIG(3,5) REF(ZIG(3,5),1))AND(REF(ZIG(3,5),1) =REF(ZIG(3,5),2))AND(REF(ZIG(3,5),2) =REF(ZIG(3,5),3)),HIGH*1.01,2);
VAR3:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
VAR4:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
VAR5:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;
VAR6:=(VAR3+VAR4+VAR5)/3;
VAR7:=EMA(VAR6,5);
ZB:=EMA(EMA(VAR3,5),5)*3,COLORSTICK;
VAR8:=IF(VAR6 =-20,10,0);
VAR9:=HHV(VAR8,10);
VARA:=IF(VAR9ANDcrOSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);
K:=EMA(VAR7,5)*2,,COLORFF00FF;
D:=EMA(K,5),,COLORWHITE;
J:=K*3-D*2,,COLORYELLOW;
VARB:=BETWEEN(CLOSE,MA(CLOSE,3),MA(CLOSE,5))ANDJ
HS:=/CAPITAL*100,,COLORGREEN;
DRAWTEXT(VAR8=10ANDFILTER(VAR8=10,5),LOW*0.93,'接近底部')COLORMAGENTA;
DRAWTEXT(VARA=20,LOW*0.95,'底部')COLORYELLOW;
VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VARF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR10:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR11:=VARF REF(VAR10,1)ANDVOL REF(VOL,1)ANDCLOSE REF(CLOSE,1);
DRAWTEXT(VAR11ANDCOUNT(VAR11,30)=1,LOW*0.95,'大活动'),LINETHICK1,COLORFF00FF;
VAR12:=(HIGH+LOW+CLOSE)/3;
VAR13:=(VAR12-MA(VAR12,14))/(0.015*AVEDEV(VAR12,14));
VAR14:=(VAR12-MA(VAR12,70))/(0.015*AVEDEV(VAR12,70));
VAR15:=IF(VAR13 =150ANDVAR13 200ANDVAR14 =150ANDVAR14 200,10,0);
VAR16:=IF(VAR13 =-150ANDVAR13 -200ANDVAR14 =-150ANDVAR14 -200,-10,VAR15);
VAR17:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
VAR18:=100-Abs(VAR17);
VAR19:=IF(VAR18 90,VAR18,100);
VAR1A:=IF(VARE 0,VARE,0);
VAR1B:=IF(VAR14 =200ANDVAR13 =150,15,IF(VAR14 =-200ANDVAR13 =-150,-15,VAR16))+60;
VAR1C:=VAR1A 48ANDVAR1B 60ANDVAR19
DRAWTEXT(VAR1CANDCOUNT(VAR1C,30)=1,LOW*0.95,'大笔成交')COLORWHITE;
MV5:=Ema(V,5);
MA5:=EMA(C,5);
MV5角度:=ATAN((MV5/REF(MV5,1)-1)*100)*180/3.1416;
MA5角度:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416;
量角:IF(MV5角度 30,MV5角度,0),COLOR0000FF,LINETHICK0;
价角:IF(MA5角度 0,MA5角度,MA5角度),COLORFFFFFF,LINETHICK1;
IF(价角 REF(价角,1)AND价角 =0,价角,DRAWNULL),COLORRED,LINETHICK2;
IF(价角 REF(价角,1)AND价角 0,价角,DRAWNULL),COLOR00FF00,LINETHICK2;
QSXS:=MA5角度 REF(MA5角度,1)ANDMV5角度
∠45↑:IF(crOSS(MA5角度,30),1,0),COLORFFFFFF,POINTDOT,LINETHICK0;
买强:IF(MA5角度 45ANDQSXS,10,0),COLOR00FFFF,POINTDOT,LINETHICK0;
防火:IF(MA5角度 70ANDMV5角度 80,20,0),COLORFF00FF,POINTDOT,LINETHICK0;
卖疯:IF(MA5角度 80ANDMV5角度 80,30,0),COLOR0000FF,POINTDOT,LINETHICK0;
WK:=MA5角度=LLV(MA5角度,3)ANDMA5角度-HHV(MA5角度,4) =0-50;
挖坑:IF(WKANDCOUNT(买强OR防火,6),0-30,0),COLOR00FF00,LINETHICK2;
海底:IF(MA5角度 0-75,0-50,0-75),COLORFF00FF,LINETHICK2;
{以下设置副图显示方式}
{stICKLINE(MV5角度 30,MV5角度,30,0.1,0),COLOR0000FF;}
STICKLINE(买强,0,20,2,0),COLOR008888;
STICKLINE(买强,0,20,1.3,0),COLOR00AAAA;
STICKLINE(买强,0,20,0.8,0),COLOR00DDDD;
STICKLINE(买强,0,20,0.3,0),COLOR00FFFF;
STICKLINE(防火,20,40,2,0),COLOR880088;
STICKLINE(防火,20,40,1.3,0),COLORAA00AA;
STICKLINE(防火,20,40,0.8,0),COLORDD00DD;
STICKLINE(防火,20,40,0.3,0),COLORFF00FF;
STICKLINE(卖疯,40,60,2,0),COLOR000088;
STICKLINE(卖疯,40,60,1.3,0),COLOR0000AA;
STICKLINE(卖疯,40,60,0.8,0),COLOR0000DD;
STICKLINE(卖疯,40,60,0.3,0),COLOR0000FF;
STICKLINE(∠45↑,0,-75,0.1,-1),COLORFF00FF;
IF(∠45↑,1,DRAWNULL),CROSSDOT,LINETHICK6,COLORFF66FF;
{以下设置强弱提示}
M3:=MA(C,3);
M5:=MA(C,5);
N1:=BArslAST(CROSS(M3,M5));
N2:=BARSLAST(CROSS(M5,M3));
N:=IF(N1 N2,N1+1,0-N2-1);
STICKLINE(N 0,0-75,0-75+N*2,2,0),COLOR000099;
STICKLINE(N 0,0-75,0-75+N*2,1.5,0),COLOR0000BB;
STICKLINE(N 0,0-75,0-75+N*2,0.8,0),COLOR0000DD;
STICKLINE(N 0,0-75,0-75+N*2,0.3,0),COLOR0000FF;
STICKLINE(N 0,0-75,0-75+N*2,2,0),COLOR999900;
STICKLINE(N 0,0-75,0-75+N*2,1.5,0),COLORBBBB00;
STICKLINE(N 0,0-75,0-75+N*2,0.8,0),COLORDDDD00;
STICKLINE(N 0,0-75,0-75+N*2,0.3,0),COLORFFFF00;
VAR2:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
VAR3:=SMA(SMA(VAR2,3,1),3,1)/28.57;
VAR4:=EMA(VAR3,5);
操盘:=3*VAR3-2*VAR4;
A1:=CROSS(操盘,VAR3)ANDVAR3 2.1ANDC
STICKLINE(A1,30,0,4,0),COLOR770077;
STICKLINE(A1,30,0,3,0),COLOR990099;
STICKLINE(A1,30,0,2,0),COLORBB00BB;
STICKLINE(A1,30,0,1,0),COLORDD00DD;
STICKLINE(A1,30,0,0.3,0),COLORFF00FF;
DRAWTEXT(A1,36,'财神到'),COLORRED;
通达信红财神布林线主图指标公式截图