DRAWGBK(1, COLORRGB(50,50,50),COLORRGB(50,50,50),0);
aa1:=wma(c,2);//短加权均线
bb1:=ema(aa1,2);//平滑
a:=ma(bb1,3);//平均
aa2:=wma((h+c+o)/3,18);//长加权均线
dd3:=a>=aa2 and c>aa2;//短>长,且收>长
dd4:=a<aa2 ;//短<长
dd5:=a>aa2 ;//短>长
STICKLINE((dd4 or dd5) and o<=c ,h,l,0.5,0),Color00cc99;//跌势阳线
STICKLINE((dd4 or dd5) and o<=c ,c,o,8,0),Color00cc99;//跌势阳线
STICKLINE((dd4 or dd5) and o>=c ,h,l,0.5,0),Color3F8C3A;//跌势阴线
STICKLINE((dd4 or dd5) and o>=c ,c,o,8,0),Color3F8C3A;//跌势阴线
STICKLINE((dd3 or c>aa2) and o<=c,c,o,8,0),Colorred;//涨势阳线
STICKLINE((dd3 or c>aa2) and o<=c,h,l,0.5,0),Colorred;//涨势阳线
STICKLINE((dd3 or c>aa2) and o>=c,c,o,8,0),Colorff33ff;//涨势阴线
STICKLINE((dd3 or c>aa2) and o>=c,h,l,0.5,0),Colorff33ff;//涨势阴线
{防线}
x1:=(C+L+H)/3;
x2:=EMA(x1,6);
x3:=EMA(x2,5);
x4:=EMA(x3,12);
x5:=EMA(x4,5);
STICKLINE(x2>=x3,x2,x3,10,1),Color00A6F6;//橙
STICKLINE(x2<x3,x2,x3,10,1), COLORBLUE;//蓝
STICKLINE(x4>=x5,x4,x5,10,1),COLORRED;//红
STICKLINE(x4<x5,x4,x5,10,1),Color006800;//绿
{多空}
ema1:=ema(c,10);
空:=hhv(ema1,5);
多:=if(ema1<空,(ema1-(空-ema1)),空);
PARTLINE(1,多),color00ff00,linethick2;
PARTLINE(多>REF(多,1),多),COLORRED,linethick2;
{火龙}
强弱分界:=EMA(CLOSE,55);
DRAWICON(C>=强弱分界,强弱分界,10);
DRAWICON(C<强弱分界,强弱分界,11);
{重心}
DPZX:=EMA(C,1); {大盘重心模拟}
GGZX:=AMOUNT/V/100; {个股重心}
重心:ema(IF(CAPITAL>0,GGZX,DPZX),3),ColorD6A6F6;
{多空}
AAx:=REF(LLV(L,34),BARSLAST(CROSS(c,ema(c,13))));
AAy:=REF(HHV(H,34),BARSLAST(CROSS(ema(c,13),c)));
AAz:=(1+SQRT(5))/2-1;
{多空线:(AAy-AAx)*AAz+AAx,COLORGRAY,LINETHICK2;}
VAR1W:=1;
天龙:=EMA(CLOSE,60)*VAR1W;
天龙A:EMA(天龙,20)*VAR1W,COLORWHITE;
金项链:EMA(CLOSE,250)*VAR1W,LINETHICK2;
PARTLINE(金项链<REF(金项链,1) AND VAR1W,金项链),LINETHICK2,colorFFFF;
PARTLINE(金项链>REF(金项链,1) AND VAR1W,金项链),LINETHICK2,colorFF;
STICKLINE(天龙>=天龙A AND VAR1W,天龙,天龙A,1,0),colorFFFFFF;
STICKLINE(天龙<=天龙A AND VAR1W,天龙,天龙A,1,0),colorFF00;
hh:=hhv(h,0);
hhh:=h;
aa:=BARSLAST(h=hh[datacount]);
ba:=datacount-aa;
ja:=1;
tm1:=999999;
for i1=ba[datacount]+1 to datacount do begin
k1:=(hh[datacount]-hhh[i1])/ja;
if k1<tm1 then begin
tm1:=k1;
ts1:=ja;
end;
ja:=ja+1;
end;
A1:LINEVALUE(h=hh[datacount] and aa=0,h,BARPOS=datacount-aa[datacount]+ts1,h,0,0),colorffff54;
cha:=hhv(abs(l-a1),aa);
A2:a1-cha[datacount],colorffff54;
AI:a1-cha[datacount]/2,colorffff54,LINEDASH;
ll:=llv(l,0);
lll:=l;
a3:=BARSLAST(l=ll[datacount]);
b3:=datacount-a3;
j3:=1;
tm3:=999999;
for i3=b3[datacount]+1 to datacount do begin
k3:=(lll[i3]-ll[datacount])/j3;
if k3<tm3 then begin
tm3:=k3;
ts3:=j3;
end;
j3:=j3+1;
end;
B1:LINEVALUE(l=ll[datacount] and a3=0,l,BARPOS=datacount-a3[datacount]+ts3,l,0,0),color5454ff;
chb:=hhv(abs(h-b1),a3);
b2:b1+chb[datacount],color5454ff;
bi:b1+chb[datacount]/2,color5454ff,LINEDASH;
VARE:=1120331;
U1:=IF(DATE<=VARE,1,0);
VAR1:=(HIGH+LOW+OPEN+CLOSE)/4;
操盘线:=(MA(3*VAR1-2*SMA(VAR1,2,1),10))*U1;
EMA(操盘线,500)*U1,LINETHICK3,colorgreen;
|