您现在的位置:好股网 >> 股票公式 >> 飞狐股票公式 >> 一键转帖:箱体--类弘历软件箱体(源码、主图、贴图)

箱体--类弘历软件箱体(源码、主图、贴图)


指标功能:[B]国产软件[/B]
指标类型:简体中文
所需积分:0
推荐星级:
授权方式:共享版
公式大小:0 Bytes
更新时间:2011-12-27 08:57:00
公式简介:

111.jpg (105.25 KB)

2011-12-26 07:59{-----------------------☆功能开关------------------------}
{箱体部分}
cc:=c;
oo:=o;
hh:=h;
ll:=l;
top:=h;
bot:=l;
xx[1]:=1;
kk:=1;
for i=1 to datacount do begin
if xx=1 then begin
top:=hh;
end;
if xx[i-1]=1 then begin
if hh>top[i-1] then begin
top:=hh;
xx:=1;
end;else begin
top:=top[i-1];
xx:=2;
end;
end;
if xx[i-1]=2 then begin
if hh>top[i-1] then begin
top:=hh;
xx:=1;
end;else begin
top:=top[i-1];
bot:=ll;
xx:=3;
end;
end;
if xx[i-1]=3 then begin
top:=top[i-1];
if ll<bot[i-1] then begin
bot:=ll;
xx:=3;
end;else begin
bot:=bot[i-1];
xx:=4;
end;
end;
if xx[i-1]=4 then begin
top:=top[i-1];
if ll<bot[i-1] then begin
bot:=ll;
xx:=3;
end;else begin
bot:=bot[i-1];
xx:=5;
end;
end;
if xx[i-1]=5 then begin
if ll<bot[i-1] or hh>top[i-1] then begin
top:=hh;
bot:=hh;
xx:=1;
end;else begin
bot:=bot[i-1];
top:=top[i-1];
xx:=5;
end;
end;
end;
for j=1 to datacount do begin
if xx[j]=5 and xx[j-1]=4 then begin
for k=j-1 downto j-kk do begin
top[k]:=top[j];
bot[k]:=bot[j];
end;
end;
if xx[j-1]=5 and xx[j]=1 then kk:=0;
kk:=kk+1;
end;
中位线:=(top+bot)/2;

{信号部分---参考}
买点:=FILTER((TROUGHBARS(3,15,1)<4)=1,3);
卖点:=FILTER((PEAKBARS(3,15,1)<4)=1,3);
{短波--未来}
F:=100*(C-REF(C,1))/REF(C,1);
p1:=IF(C<REF(O,1) AND f<0,1,0);
p3:=IF(C>REF(O,1) AND f>0,1,0);
p2:=IF(C<REF(O,2) AND f<0,1,0);
p4:=IF(C>REF(O,2) AND f>0,1,0);
买D5:=P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1;
卖D6:=P3=0 AND REF(P3,1)=1 AND P4=0 AND REF(P4,1)=1;
FZ:=PEAK(3,5,1);
FW:=PEAKBARS(3,5,1);
GZ:=TROUGH(3,5,1);
GW:=TROUGHBARS(3,5,1);
AS:=ZIG(3,3);
涨AL:=CROSS(AS,REF(AS,1));
跌AG:=CROSS(REF(AS,1),AS);
Ss1:=IF(FW>GW,FW,0);
Ss2:=IF(FW<GW,GW,0);
Ss3:=BARSLAST(Ss1);
Ss4:=BARSLAST(Ss2);
{---------立体K线--------}
M1:MA(CLOSE,5);
M2:MA(CLOSE,13);
M3:MA(CLOSE,30);
M4:MA(CLOSE,60);
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,9,0 ),COLOR009900;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLOR00cc00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2.4,0 ),COLOR33ff00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1.1,0 ),COLOR66ff00;

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,9,0 ),COLOr000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6 ,0 ),COLOR0000cc;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.4 ,0 ),COLOR0000ff;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.1 ,0 ),COLOR0033ff;

STICKLINE(CLOSE>OPEN,OPEN,LOW,0.5,0 ),COLOR9933ff;
STICKLINE(CLOSE>OPEN,CLOSE,HIGH,0.5 ,0 ),COLOR9933ff;
STICKLINE(OPEN>=CLOSE,CLOSE,LOW,0.5 ,0 ),COLOR66cc33;
STICKLINE(OPEN>=CLOSE,OPEN,HIGH,0.5 ,0 ),COLOR66cc33;

A0:=NUMTOSTR(MA(VOL,5),2);
B0:=NUMTOSTR(MA(VOL/CAPITAL*100,5)*5,2);
TYP:=(HIGH+LOW+CLOSE)/3;
LL:=LLV(LOW,12);
HH:=HHV(HIGH,12);
WR:=TYP+(TYP-LL);
WS:=TYP-(HH-TYP);
WA:=NUMTOSTR(WR,2);
WB:=NUMTOSTR(WS,2);
MM:=BUYVOL/(BUYVOL+SELLVOL)*100;
ZLM1:=(DYNAINFO(23)/2+DYNAINFO(22)/10)/2;
ZLM2:=MA(VOL,60)*0.333;
ZLM3:=CAPITAL*(MA(VOL/CAPITAL*100,60)*60-INDEXV/ESTDATA(1)*1000);
ZLM:=(ZLM1+ZLM2+ZLM3)/3;
T:=NUMTOSTR(ZLM/10000,2);

DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,'\n'+BLKNAME+';五日均量:'+A0+',五日换手:'+B0+'%'+',支撑:'
+WB+',压力:'+WA+',\n主力持仓:'+T),align4,COLORGREEN;

A1:=BARSLAST(REF(CROSS("macd.diff","macd.dea"),1));
B1:=REF(CLOSE,A1+1)>CLOSE and REF("macd.diff",A1+1)<"macd.diff" and CROSS("macd.diff","macd.dea");

A2:=BARSLAST(REF(CROSS("kdj.k","kdj.d"),1));
B2:=REF(CLOSE,A2+1)>CLOSE and REF("kdj.k",A2+1)<"kdj.k" and CROSS("kdj.k","kdj.d");

A3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));
B3:=REF(CLOSE,A3+1)>CLOSE and REF("RSI.RSI1",A3+1)<"RSI.RSI1" and CROSS("RSI.RSI1","RSI.RSI2");

FIL1:=FILTER(B1>0,7) or FILTER(B2>0,7) or FILTER(B3>0,7);
DRAWTEXT(FIL1,LOW-0.02,'底背'),COLORRED;

C1:=BARSLAST(REF(CROSS("macd.dea","macd.diff"),1));
D1:=REF(CLOSE,C1+1)<CLOSE and REF("macd.diff",C1+1)>"macd.diff" and CROSS("macd.dea","macd.diff");

C2:=BARSLAST(REF(CROSS("kdj.d","kdj.k"),1));
D2:=REF(CLOSE,C2+1)<CLOSE and REF("kdj.k",C2+1)>"kdj.k" and CROSS("kdj.d","kdj.k");

C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));
D3:=REF(CLOSE,C3+1)<CLOSE and REF("RSI.RSI1",C3+1)>"RSI.RSI1" and CROSS("RSI.RSI2","RSI.RSI1");

FIL2:=FILTER(D1>0,7) OR FILTER(D2>0,7) OR FILTER(D3>0,7);
DRAWTEXT(FIL2,HIGH+0.1,'顶背'),COLORBLUE;


{-----------------【图解模板】---------------------};
{箱体部分}
PARTLINE(top=ref(top,1),top),Color008293;//箱顶
PARTLINE(bot=ref(bot,1),bot),Color008293;//箱底
STICKLINE((top<>ref(top,1) or bot<>ref(bot,1)) and xx=1 and ref(xx,1)=5,top,bot,1,0),Color008293;//左侧竖线
STICKLINE((top<>refx(top,1) or bot<>refx(bot,1)) and xx=5 and refx(xx,1)=1,top,bot,1,0),Color008293;//右侧竖线

{-------阻力支撑------}
b:=BARSCOUNT(CLOSE)=SYSPARAM(2);
d:=BARSLAST(b);
hh:=HHV(HIGH,d);
DRAWTEXT(BARSTATUS=2,hh,STKLABEL+' '+STKNAME+' '),ColorFFFF80,pxdn20,align4,align2;
换手率:=100*VOL/CAPITAL,colorfffFff;
RH:=HIGH-LOW;
R:=DYNAINFO(13)*100;
DRAWTEXT(BARSTATUS=2,hh,'当日振幅:'+NUMTOSTR(R,2)+'% '+NUMTOSTR(RH,2)+'元 '+' 当前换手率:'+NUMTOSTR(换手率,2)+'% '+' '),ColorFFFFFF,pxdn20,align4,align2;
DRAWTEXT(BARSTATUS=2,hh,' 机构评级:'+SELFSTRING('评级')+' '),colorffffff,pxdn80,align4,align2;
gj:=IF(CLOSE=INDEXC,(INDEXC+INDEXH+INDEXL+INDEXO)/4,AMOUNT/(VOL+0.01)/100);
明日阻力:=LOW+(gj-LOW)+(CLOSE-LOW);
明日支撑:=LOW+(CLOSE-gj);
今日阻力:=REF(明日阻力 , 1);
今日支撑:=REF(明日支撑 , 1);
STICKLINE(BARSTATUS=2 and CLOSE>=今日阻力,今日阻力,今日阻力,30,0),Color0000FF;
STICKLINE(BARSTATUS=2 and CLOSE<今日阻力,今日阻力,今日阻力,30,0),Color00FF00;
STICKLINE(BARSTATUS=2 and CLOSE>=今日支撑,今日支撑,今日支撑,30,0),ColorFF00FF;
STICKLINE(BARSTATUS=2 and CLOSE<今日支撑,今日支撑,今日支撑,30,0),,Color0000FF;
DRAWTEXT(BARSTATUS=2 ,hh,'---------------------------------- '),ColorFFFFFF,pxdn2,align4,align2;
DRAWTEXT(BARSTATUS=2 and CLOSE>=今日支撑,hh,' 今日支撑=:'+NUMTOSTR(今日支撑 ,2 )+' '),ColorFF00FF,pxdn50,align4,align2;
DRAWTEXT(BARSTATUS=2 and CLOSE<今日支撑,hh,' 今日支撑=:'+NUMTOSTR(今日支撑 ,2 )+' '),,Color0000FF,pxdn50,align4,align2;
DRAWTEXT(BARSTATUS=2 and CLOSE>=今日阻力,hh,' 今日阻力=:'+NUMTOSTR(今日阻力 ,2 )+' '),align4,Color0000FF,pxdn20,align2;
DRAWTEXT(BARSTATUS=2 and CLOSE<今日阻力,hh,' 今日阻力=:'+NUMTOSTR(今日阻力 ,2 )+' '),Color00FF00,pxdn20,align4,align2;
DRAWTEXT(BARSTATUS=2 ,hh,' 明日阻力=:'+NUMTOSTR(明日阻力 ,2 )+' '),Color00FFFF,pxdn20,align4,align2;
DRAWTEXT(BARSTATUS=2 ,hh,' 明日支撑=:'+NUMTOSTR(明日支撑 ,2 )+' '),Color00FFFF,pxdn50,align4,align2;
DRAWTEXT(BARSTATUS=2 ,hh,'---------------------------------- '),ColorFFFFFF,pxdn70,align4,align2;
DRAWTEXT(BARSTATUS=2 and VOL>REF(VOL,1) and MA(VOL,5)>REF(MA(VOL,5),1),hh,'今日成交量大于昨日,且有继续增大趋势'+' '),Color8285FF,pxdn90,align4,align2;
DRAWTEXT(BARSTATUS=2 and VOL<REF(VOL,1) and MA(VOL,5)>REF(MA(VOL,5),1),hh,'今日成交量小于昨日,但有放大迹象'+' '),Color8285FF,pxdn90,align4,align2;
DRAWTEXT(BARSTATUS=2 and VOL>REF(VOL,1)and MA(VOL,5)<REF(MA(VOL,5),1),hh,'今日成交量大于昨日, 但有缩小迹象'+' '),Color8285FF,pxdn90,align4,align2;
DRAWTEXT(BARSTATUS=2 and VOL<REF(VOL,1)and MA(VOL,5)<REF(MA(VOL,5),1),hh,'今日成交量小于昨日,且有缩小迹象'+' '),Color8285FF,pxdn90,align4,align2;
 


 


 


[url=http://www.goodgupiao.com/gupiaogongshi/17073.html][B]箱体--类弘历软件箱体(源码、主图、贴图)[/B][/url]