有人找我要通达信BS主图买卖指标,没有现成的,抽空编写了一个,分享给各位支持我的朋友们!
使用方法:
出B(buy)买入,出S(sell)卖出,红色(K线红色)持有,绿色(K线绿色)休息。
说明:
实话实说,BS主图买卖指标还是益盟的好,不信不行。
BS买卖指标源码-通达信主图
{
P1(0,10000,5,1);
P2(0,10000,10,1);
P3(0,10000,20,1);
P4(0,10000,30,1);
P5(0,10000,60,1);
P6(0,10000,250,1);
}
P1:=5;
P2:=10;
P3:=20;
P4:=30;
P5:=60;
P6:=250;
MA1:MA(CLOSE,P1);
MA2:MA(CLOSE,P2);
MA3:MA(CLOSE,P3);
MA4:MA(CLOSE,P4);
MA5:MA(CLOSE,P5);
MA6:MA(CLOSE,P6);
VAR1:=(100-((90*(HHV(HIGH,14)-CLOSE))/(HHV(HIGH,14)-LLV(LOW,14))));
VAR2:=(100-((90*(HHV(HIGH,14)-CLOSE))/(HHV(HIGH,14)-LLV(LOW,14))));
VAR3:=(100-MA(((100*(HHV(HIGH,6)-CLOSE))/(HHV(HIGH,6)-LLV(LOW,6))),34));
DIR1:=ABS(CLOSE-REF(CLOSE,5));
VIR1:=SUM(ABS(CLOSE-REF(CLOSE,1)),5);
STICKLINE(VAR2 MA(VAR3,6),LOW,HIGH,0,1);
STICKLINE(VAR2 MA(VAR3,6),LOW,HIGH,0,1),COLORRED;
STICKLINE(((OPEN CLOSE)AND(VAR2 MA(VAR3,6))),(CLOSE-0.03),OPEN,2.9,0),COLORCYAN;
STICKLINE(((OPEN CLOSE)AND(VAR2 MA(VAR3,6))),CLOSE,OPEN,2.9,1),COLORCYAN;
STICKLINE(((OPEN CLOSE)AND(VAR2 MA(VAR3,6))),OPEN,(CLOSE-0.03),2.9,0),COLORRED;
STICKLINE(((OPEN CLOSE)AND(VAR2 MA(VAR3,6))),OPEN,CLOSE,2.9,1),COLORRED;
DRAWICON(CROSS(VAR2,MA(VAR3,2)),(LOW-(LOW*0.02)),7);
DRAWICON(CROSS(MA(VAR3,2),VAR1),(HIGH+(HIGH*0.02)),8);