真人均线&【鹏博F10新闻资讯】

[复制链接]
查看124 | 回复0 | 2022-7-13 07:29:20 | 显示全部楼层 |阅读模式
{真人均线&【鹏博F10新闻资讯】}
//////////////////////////////////////////////////////////////////////
{十字光标在 K 线移动,指向[信息],对应 F10 当日有各类新闻资讯,即可自动在"解"中显示;
【鹏博F10新闻资讯】原码;(飞狐专用)}
input:n0(150,1,500),N(3,1,20),线数(3,1,8);{真人均线最多8线,可据考查长短期需要调整线数}
Np:=IF(DATACOUNT>=N0,N0,DATACOUNT-1);
VARIABLE:tx='【',txd='',
bt2='',dtx1='',tx11='十三、',tx1='各家评论',
bt1='',dtx2='',tx21='十四、',tx2='公司报道',
bt3='',dtx3='',tx31='十五、',tx3='大事纪要',
bt4='',dtx4='',tx41='十六、',tx4='超幅涨跌';//及时更新鹏博F10资料,获取最新资讯
d11:=F10FIND(tx11+tx1,10000);d21:=F10FIND(tx21+tx2,d11);
d31:=F10FIND(tx31+tx3,d21);d41:=F10FIND(tx41+tx4,d31);
fy:=year;fd:=date;txs:=0*date;
P:=SYSPARAM(1);
stx:=tx+NUMTOSTR(fy[P],0)+'-'+STRMID(NUMTOSTR(fd[P],0),4,2)+'-'+STRRIGHT(NUMTOSTR(fd[P],0), 2)+'】';
for ii=DATACOUNT downto DATACOUNT-np do BEGIN
txs:=if(F10FIND(STX,D11)<>-1,1,0);
EXPLAIN(P=BARPOS AND TXS=1,'【'+NUMTOSTR(fy[P],0)+'-'+STRMID(NUMTOSTR(fd[P],0),4,2)+'-'+STRRIGHT(NUMTOSTR(fd[P],0), 2)+'】');
END;
d12:=F10FIND(stx,d11);
tj1:=BETWEEN(d12,d11,d21);
if tj1 then begin
d13:=F10FIND(tx,d12+10);
bt1:=F10TEXT(d12,0);
d14:=STRLEN(bt1)+4;
dtx1:=F10TEXT(d12+d14,d13-d12-d14);
end;
d22:=F10FIND(stx,d21);
tj2:=BETWEEN(d22,d21,d31);
if tj2 then begin
d23:=F10FIND(tx,d22+10);
bt2:=F10TEXT(d22,0);
d24:=STRLEN(bt2)+4;
dtx2:=F10TEXT(d22+d24,d23-d22-d24);
end;
d32:=F10FIND(stx,d31);
tj3:=BETWEEN(d32,d31,d41);
if tj3 then begin
d33:=F10FIND(tx,d32+10);
bt3:=F10TEXT(d32,0);
d34:=STRLEN(bt3)+4;
dtx3:=F10TEXT(d32+d34,d33-d32-d34);
end;
d42:=F10FIND(stx,d41);
tj4:=d42>d41;
if tj4 then begin
d43:=F10FIND(tx,d42+10);
bt4:=F10TEXT(d42,0);
d44:=STRLEN(bt4)+4;
dtx4:=F10TEXT(d42+d44,d43-d42-d44);
end;
P:=SYSPARAM(1);
EXPLAIN(tj1,tx1+'\n'+bt1),COLORRED;
EXPLAIN(tj1,dtx1),COLORWHITE;
EXPLAIN(tj2,tx2+'\n'+bt2),COLORYELLOW;
EXPLAIN(tj2,dtx2),COLORWHITE;
EXPLAIN(tj3,tx3+'\n'+bt3),COLORBLUE;
EXPLAIN(tj3,dtx3),COLORWHITE;
EXPLAIN(tj4,tx4+'\n'+bt4),COLORMAGENTA;
EXPLAIN(tj4,dtx4),COLORWHITE;
fy1:=year;fd1:=date;txs1:=0*date;
for iP= DATACOUNT-Np to DATACOUNT do BEGIN
stx1:=tx+NUMTOSTR(fy1[IP],0)+'-'+STRMID(NUMTOSTR(fd1[IP],0),4,2)+'-'+STRRIGHT(NUMTOSTR(fd1[IP],0), 2)+'】';
DRAWTEXT(P=BARPOS,SYSPARAM(5),STX),ALIGN2;
txs1[IP]:=if(F10FIND(STX1,D11)<>-1,1,0);
DRAWTEXT(txs1=1 ,SYSPARAM(4),'信\n息'),PXDN20,ALIGN0;//信息显示
DRAWICON(txs1=1 ,SYSPARAM(4),10),ALIGN0;//信息显示
END; /////////////////////////////////////////////////////////////////////////////
{真人均线} 均价线:=MA(C,1),colorDDDDDD;
EXPMA:=均价线; K0:=LBOUND(EXPMA);K1:=UBOUND(EXPMA);
FOR I=K0+1 TO K1 do begin
EXPMA[I]:(EXPMA[I]-EXPMA[I-1])/(N+线数/2)+EXPMA[I-1],COLORFF9966;
END;
/////////做多K线
//KLINE(O,H,L,C,0);
STICKLINE(均价线<EXPMA AND C>O,o,c,7,0),COLORFF66AA;
STICKLINE(均价线<EXPMA AND C<=O,o,c,7,0),COLORFF6633;
STICKLINE(均价线>EXPMA AND C>O,o,c,7,0),COLOR6666FF;
STICKLINE(均价线>EXPMA AND C<=O,o,c,7,0),COLOR66FF33;
IF 线数=1 THEN EXIT;
EXPMB:=EXPMA;
FOR I=K0+1 TO K1 do begin
EXPMB[I]:(EXPMA[I]-EXPMB[I-1])/(N+线数/2)+EXPMB[I-1],COLORFFBBEE;
END;
IF 线数=2 THEN EXIT;
EXPMc:=EXPMb;
FOR I=K0+1 TO K1 do begin
EXPMc[I]:(EXPMb-EXPMc[I-1])/(N+线数/2)+EXPMc[I-1],COLOREEFF66;
END;
IF 线数=3 THEN EXIT;
EXPMd:=EXPMc;
FOR I=K0+1 TO K1 do begin
EXPMd[I]:(EXPMc[I]-EXPMd[I-1])/(N+线数/2)+EXPMd[I-1],COLORAAFFBB;
END;
IF 线数=4 THEN EXIT;
EXPMe:=EXPMd;
FOR I=K0+1 TO K1 do begin
EXPMe[I]:(EXPMd-EXPMe[I-1])/(N+线数/2)+EXPMe[I-1],COLOR00FFEE;
END;
IF 线数=5 THEN EXIT;
EXPMf:=EXPMe;
FOR I=K0+1 TO K1 do begin
EXPMf[I]:(EXPMe[I]-EXPMf[I-1])/(N+线数/2)+EXPMf[I-1],COLOR00CCFF;
END;
IF 线数=6 THEN EXIT;
EXPMG:=EXPMF;
FOR I=K0+1 TO K1 do begin
EXPMG[I]:(EXPMF[I]-EXPMG[I-1])/(N+线数/2)+EXPMG[I-1],COLORAA00FF,LINEDOT;
END;
 

20128308472227194.png

20128308472227194.png

 

20128308474254172.rar

4.42 KB, 下载次数: 2

20128308474254172.rar

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则