通达信公式 布林炒股
“高抛低吸”是我们股民的努力方向,为此我一直在学习探索中,现与大家分享二个自己感觉比较实用的指标,
一个是主图指标:“布林炒股”,它没有未来函数,在上轨出“卖”字时卖出,在下轨出“买”字或“选”字时买入,如此高抛低吸,循环操作;
另一个是“老丁macdrj”,它的指标线都会变色,“MACD”柱子发生长短变化时、“DIF”和“DEA”金叉或死叉后,指标线均会随之变色,便于查看;在“DIF”或“DEA”发生“顶背离”“底背离”时,它也会划出红线,给予提醒。希望它们能给大家带来快乐的炒股体验,谢谢!
{布林炒股}
N:=26;
P:=2;
MID : MA(CLOSE,N),COLORYELLOW,LINETHICK2;
UPPER: MID + P*STD(CLOSE,N),LINETHICK1,COLORGREEN;
LOWER: MID - P*STD(CLOSE,N),LINETHICK1,COLORRED;
高:SMA(H,21,2)*1.092,POINTDOT,COLORFFFFFF;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
WY1001:=(2*CLOSE+HIGH+LOW)/4;
WY1002:=EMA(WY1001,4);
WY1003:=EMA(WY1002,4);
WY1004:=EMA(WY1003,4);
XYS0:=(WY1004-REF(WY1004,1))/REF(WY1004,1)*100;
XYS1:=MA(XYS0,2);
XYS2:=MA(XYS0,1);
XG:=CROSS(XYS1,XYS2) AND XYS1>=0 AND EXIST(C>UPPER,6) AND RSI>85;
DRAWTEXT(XG,UPPER*1.03,'卖'),COLORGREEN;
XG1:=CROSS(XYS2,XYS1) AND CROSS(MA(CLOSE,4),MA(CLOSE,10));
DRAWTEXT(XG1,LOWER*0.94,'买'),COLORRED;
Q12:=MACD<REF(MACD,1) AND REF(MACD,1)>REF(MACD,2) AND MACD<=DIF*0.3 AND MACD>0;
DRAWTEXT(Q12 AND EXIST(RSI>80,12),H*1.025,'卖'),COLORCYAN;
M1:=C>REF(C,1) AND V<MA(V,5) AND V<MA(V,10) AND C>UPPER*0.98;
DRAWTEXT(M1 AND EXIST(Q12,5),H*1.01,'缩'),COLORWHITE;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
BB:=CROSS(K,D) AND CROSS(C,MA(C,13)) AND CROSS(CCI,-100) AND C<UPPER*0.95;
DRAWTEXT(BB,LOWER*0.94,'选');