通达信圆弧涨跌主图源码

[复制链接]
查看133 | 回复0 | 2021-8-21 06:52:46 | 显示全部楼层 |阅读模式

以下是通达信圆弧涨跌主图源码(无源码的请下载附件导入)

波:=73;
 NA:=25;
 NC:=3; NB:=IF(NA>10,10,NC);
 CURR:=CURRBARSCOUNT; SS:=PERIOD;
 AA:=REF(H,NA)=HHV(H,2*NA+1);
 QY:=BACKSET(AA,NA+1);
 CC:=FILTER(QY,NA) AND H=HHV(H,NA+1);
 DDD:=BARSLAST(CC);
 GDTS:=IF(CC,CURR,0);
 DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
 DINGBU1:=REF(DINGBU,DDD+1);
 GDCS1:=CONST(DINGBUTS);
 DINGBUTS1:=REF(DINGBUTS,DDD+1);
 GDCS2:=CONST(DINGBUTS1);
 AA1:=REF(L,NA)=LLV(L,2*NA+1);
 QY1:=BACKSET(AA1,NA+1);
 CC1:=FILTER(QY1,NA) AND L=LLV(L,NA+1);
 DD1:=BARSLAST(CC1);
 DDTS:=IF(CC1,CURR,0);
 DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
 DDCS1:=CONST(DDTS1);
 DDTS2:=REF(DDTS1,DD1+1);
 DDCS2:=CONST(DDTS2);
 LAA:=REF(H,NB)=HHV(H,2*NB+1);
 LQY:=BACKSET(LAA,NB+1);
 LCC:=FILTER(LQY,NB) AND H=HHV(H,NB+1);
 LDDD:=BARSLAST(LCC);
 LGDTS:=IF(LCC,CURR,0);
 LDINGBU:=IF(LDDD,REF(H,LDDD),H);{顶部}
LDINGBUTS:=IF(LDDD,REF(LGDTS,LDDD),LGDTS);
 LDINGBU1:=REF(LDINGBU,LDDD+1);
 LGDCS1:=CONST(LDINGBUTS);
 LDINGBUTS1:=REF(LDINGBUTS,LDDD+1);
 LGDCS2:=CONST(LDINGBUTS1);
 LAA1:=REF(L,NB)=LLV(L,2*NB+1);
 LQY1:=BACKSET(LAA1,NB+1);
 LCC1:=FILTER(LQY1,NB) AND L=LLV(L,NB+1);
 LDD1:=BARSLAST(LCC1);
 LDDTS:=IF(LCC1,CURR,0);
 LDDTS1:=IF(LDD1,REF(LDDTS,LDD1),LDDTS);
 LDDCS1:=CONST(LDDTS1);
 LDDTS2:=REF(LDDTS1,LDD1+1);
 LDDCS2:=CONST(LDDTS2);
 LLAA:=REF(H,NC)=HHV(H,2*NC+1);
 LLQY:=BACKSET(LLAA,NC+1);
 LLCC:=FILTER(LLQY,NC) AND H=HHV(H,NC+1);
 LLDDD:=BARSLAST(LLCC);
 LLGDTS:=IF(LLCC,CURR,0);
 LLDINGBU:=IF(LLDDD,REF(H,LLDDD),H);{顶部}
LLDINGBUTS:=IF(LLDDD,REF(LLGDTS,LLDDD),LLGDTS);
 LLDINGBU1:=REF(LLDINGBU,LLDDD+1);
 LLGDCS1:=CONST(LLDINGBUTS);
 LLDINGBUTS1:=REF(LLDINGBUTS,LLDDD+1);
 LLGDCS2:=CONST(LLDINGBUTS1);
 LLDINGBU2:=REF(LLDINGBU1,LLDDD+1);
 LLAA1:=REF(L,NC)=LLV(L,2*NC+1);
 LLQY1:=BACKSET(LLAA1,NC+1);
 LLCC1:=FILTER(LLQY1,NC) AND L=LLV(L,NC+1);
 LLDD1:=BARSLAST(LCC1);
 LLDDTS:=IF(LLCC1,CURR,0);
 LLDDTS1:=IF(LLDD1,REF(LLDDTS,LLDD1),LDDTS);
 LLDDCS1:=CONST(LLDDTS1);
 LLDDTS2:=REF(LLDDTS1,LLDD1+1);
 LLDDCS2:=CONST(LLDDTS2);
长G1:=CONST(DRAWLINE(CURR=GDCS1,H,REF(CURR,1)=GDCS1,REF(H,1),1));
长G2:=CONST(DRAWLINE(CURR=GDCS2,H,REF(CURR,1)=GDCS2,REF(H,1),1));
长D1:=CONST(DRAWLINE(CURR=DDCS1,L,REF(CURR,1)=DDCS1,REF(L,1),1));
长D2:=CONST(DRAWLINE(CURR=DDCS2,L,REF(CURR,1)=DDCS2,REF(L,1),1));
中G1:=CONST(DRAWLINE(CURR=LGDCS1,H,REF(CURR,1)=LGDCS1,REF(H,1),1));
中G2:=CONST(DRAWLINE(CURR=LGDCS2,H,REF(CURR,1)=LGDCS2,REF(H,1),1));
中D1:=CONST(DRAWLINE(CURR=LDDCS1,L,REF(CURR,1)=LDDCS1,REF(L,1),1));
中D2:=CONST(DRAWLINE(CURR=LDDCS2,L,REF(CURR,1)=LDDCS2,REF(L,1),1));
短G1:=CONST(DRAWLINE(CURR=LLGDCS1,H,REF(CURR,1)=LLGDCS1,REF(H,1),1));
短G2:=CONST(DRAWLINE(CURR=LLGDCS2,H,REF(CURR,1)=LLGDCS2,REF(H,1),1));
短D1:=CONST(DRAWLINE(CURR=LLDDCS1,L,REF(CURR,1)=LLDDCS1,REF(L,1),1));
短D2:=CONST(DRAWLINE(CURR=LLDDCS2,L,REF(CURR,1)=LLDDCS2,REF(L,1),1));
短G:=CONST(FINDHIGH(H,0,5,1));
短D:=CONST(FINDLOW(L,0,5,1));
 XAM:=CONST(MAX(MAX(MAX(MAX(MAX(长G1,H),MAX(长G2,H)),MAX(MAX(中G1,H),MAX(中G2,H))),
 MAX(MAX(短G1,H),MAX(短G2,H))),MAX(短G,H)));
 XIM:=CONST(MIN(MIN(MIN(MIN(MIN(长D1,L),MIN(长D2,L)),MIN(MIN(中D1,L),MIN(中D2,L))),
 MIN(MIN(短D1,L),MIN(短D2,L))),MIN(短D,L)));
低天:=IF(长D1=XIM,DDCS1,IF(长D2=XIM,DDCS2,IF(中D1=XIM,LDDCS1,
 IF(中D2=XIM,LDDCS2,IF(短D1=XIM,LLDDCS1,IF(短D=XIM,BARSLAST(短D=XIM)+1,LLDDCS2))))));
高天:=IF(长G1=XAM,GDCS1,IF(长G2=XAM,GDCS2,IF(中G1=XAM,LGDCS1,
 IF(中G2=XAM,LGDCS2,IF(短G1=XAM,LLGDCS1,IF(短G=XAM,BARSLAST(短G=XAM)+1,LLGDCS2))))));
高低距:=CONST(XAM)-CONST(XIM);
天距:=(IF(高天>低天,高天,低天)-IF(高天>低天,低天,高天));
PR:=IF(高天>低天,高天,低天);
RN:=IF(高天>低天,CONST(XAM),CONST(XIM));
 BX:=230/天距; BY:=100/高低距;
XW:=IF(CURR<PR,PR-CURR,CURR-PR)*BX;
 Y弧:=波;
高低:=DRAWLINE(CURR=高天,XAM,CURR=低天,XIM,0);
低高:=DRAWLINE(CURR=低天,XIM,CURR=高天,XAM,0);
高低线:=IF(高天>低天,高低,低高),COLOR8E2368,LINETHICK2;
 DRAWBAND(高低线,RGB(125,26,199),高低线,RGB(125,26,199));
距线1:=DRAWLINE(CURR=高天,XIM,CURR=低天,XIM,0);
距线2:=DRAWLINE(CURR=低天,XIM,CURR=高天,XIM,0);
 STICKLINE(CURR=高天,XIM,XAM,0,0),COLOR8E2368;
距线:=IF(高天>低天,距线1,距线2),COLOR8E2368,LINETHICK2;
 DRAWBAND(距线,RGB(125,26,199),距线,RGB(125,26,199));
 YWA:=IF(XW<Y弧,SQRT(Y弧*Y弧-XW*XW)/10,0)/BY;
圆弧A:=IF(高天<低天,RN+YWA,RN-YWA),COLORYELLOW;
 DRAWBAND(圆弧A,RGB(255,196,9),圆弧A,RGB(255,196,9));
 YWB:=IF(XW<2*Y弧,SQRT(2*Y弧*2*Y弧-XW*XW)/10,0)/BY;
圆弧B:=IF(高天<低天,RN+YWB,RN-YWB),COLORYELLOW;
 DRAWBAND(圆弧B,RGB(255,196,9),圆弧B,RGB(255,196,9));
 YWC:=IF(XW<3*Y弧,SQRT(3*Y弧*3*Y弧-XW*XW)/10,0)/BY;
圆弧C:=IF(高天<低天,RN+YWC,RN-YWC),COLORYELLOW;
 DRAWBAND(圆弧C,RGB(255,196,9),圆弧C,RGB(255,196,9));
 YWD:=IF(XW<4*Y弧,SQRT(4*Y弧*4*Y弧-XW*XW)/10,0)/BY;
圆弧D:=IF(高天<低天,RN+YWD,RN-YWD),COLORYELLOW;
 DRAWBAND(圆弧D,RGB(255,196,9),圆弧D,RGB(255,196,9));
 YWE:=IF(XW<5*Y弧,SQRT(5*Y弧*5*Y弧-XW*XW)/10,0)/BY;
圆弧E:=IF(高天<低天,RN+YWE,RN-YWE),COLORYELLOW;
 DRAWBAND(圆弧E,RGB(255,196,9),圆弧E,RGB(255,196,9));
 YWF:=IF(XW<6*Y弧,SQRT(6*Y弧*6*Y弧-XW*XW)/10,0)/BY;
圆弧F:=IF(高天<低天,RN+YWF,RN-YWF),COLORYELLOW;
 DRAWBAND(圆弧F,RGB(255,196,9),圆弧F,RGB(255,196,9));
 YWG:=IF(XW<7*Y弧,SQRT(7*Y弧*7*Y弧-XW*XW)/10,0)/BY;
圆弧G:=IF(高天<低天,RN+YWG,RN-YWG),COLORYELLOW;
 DRAWBAND(圆弧G,RGB(255,196,9),圆弧G,RGB(255,196,9));
 YWH:=IF(XW<8*Y弧,SQRT(8*Y弧*8*Y弧-XW*XW)/10,0)/BY;
圆弧H:=IF(高天<低天,RN+YWH,RN-YWH),COLORYELLOW;
 DRAWBAND(圆弧H,RGB(255,196,9),圆弧H,RGB(255,196,9));
 YWI:=IF(XW<9*Y弧,SQRT(9*Y弧*9*Y弧-XW*XW)/10,0)/BY;
圆弧I:=IF(高天<低天,RN+YWI,RN-YWI),COLORYELLOW;
 DRAWBAND(圆弧I,RGB(255,196,9),圆弧I,RGB(255,196,9));
 YWJ:=IF(XW<10*Y弧,SQRT(10*Y弧*10*Y弧-XW*XW)/10,0)/BY;
圆弧J:=IF(高天<低天,RN+YWJ,RN-YWJ),COLORYELLOW;
 DRAWBAND(圆弧J,RGB(255,196,9),圆弧J,RGB(255,196,9));
 YWK:=IF(XW<11*Y弧,SQRT(11*Y弧*11*Y弧-XW*XW)/10,0)/BY;
圆弧K:=IF(高天<低天,RN+YWK,RN-YWK),COLORYELLOW;
 DRAWBAND(圆弧K,RGB(255,196,9),圆弧K,RGB(255,196,9));
 YWL:=IF(XW<12*Y弧,SQRT(12*Y弧*12*Y弧-XW*XW)/10,0)/BY;
圆弧L:=IF(高天<低天,RN+YWL,RN-YWL),COLORYELLOW;
 DRAWBAND(圆弧L,RGB(255,196,9),圆弧L,RGB(255,196,9));
 YWM:=IF(XW<13*Y弧,SQRT(13*Y弧*13*Y弧-XW*XW)/10,0)/BY;
圆弧M:=IF(高天<低天,RN+YWM,RN-YWM),COLORYELLOW;
 DRAWBAND(圆弧M,RGB(255,196,9),圆弧M,RGB(255,196,9));
 YWN:=IF(XW<14*Y弧,SQRT(14*Y弧*14*Y弧-XW*XW)/10,0)/BY;
圆弧N:=IF(高天<低天,RN+YWN,RN-YWN),COLORYELLOW;
 DRAWBAND(圆弧N,RGB(255,196,9),圆弧N,RGB(255,196,9));
 YWO:=IF(XW<15*Y弧,SQRT(15*Y弧*15*Y弧-XW*XW)/10,0)/BY;
圆弧O:=IF(高天<低天,RN+YWO,RN-YWO),COLORYELLOW;
 DRAWBAND(圆弧O,RGB(255,196,9),圆弧O,RGB(255,196,9));
 YWP:=IF(XW<16*Y弧,SQRT(16*Y弧*16*Y弧-XW*XW)/10,0)/BY;
圆弧P:=IF(高天<低天,RN+YWP,RN-YWP),COLORYELLOW;
 DRAWBAND(圆弧P,RGB(255,196,9),圆弧P,RGB(255,196,9));
 YWT:=IF(XW<17*Y弧,SQRT(17*Y弧*17*Y弧-XW*XW)/10,0)/BY;
圆弧T:=IF(高天<低天,RN+YWT,RN-YWT),COLORYELLOW;
 DRAWBAND(圆弧T,RGB(255,196,9),圆弧T,RGB(255,196,9));
 YWQ:=IF(XW<18*Y弧,SQRT(18*Y弧*18*Y弧-XW*XW)/10,0)/BY;
圆弧Q:=IF(高天<低天,RN+YWQ,RN-YWQ),COLORYELLOW;
 DRAWBAND(圆弧Q,RGB(255,196,9),圆弧Q,RGB(255,196,9));
 YWR:=IF(XW<19*Y弧,SQRT(19*Y弧*19*Y弧-XW*XW)/10,0)/BY;
圆弧R:=IF(高天<低天,RN+YWR,RN-YWR),COLORYELLOW;
 DRAWBAND(圆弧R,RGB(255,196,9),圆弧R,RGB(255,196,9));
 YWS:=IF(XW<20*Y弧,SQRT(20*Y弧*20*Y弧-XW*XW)/10,0)/BY;
圆弧S:=IF(高天<低天,RN+YWS,RN-YWS),COLORYELLOW;
 DRAWBAND(圆弧S,RGB(255,196,9),圆弧S,RGB(255,196,9));
涨点:=CURR=低天;
涨H:DRAWLINE(涨点=1,H,REF(涨点,1)=1,REF(H,1),0),COLOR00FF00;
涨L:=DRAWLINE(涨点=1,L,REF(涨点,1)=1,REF(L,1),0),COLOR8E00E8;
 STICKLINE(REF(涨点,1)=1,涨H,涨L,0,0),COLOR00FF00;
跌点:=CURR=高天;
跌H:=DRAWLINE(跌点=1,H,REF(跌点,1)=1,REF(H,1),0),COLOR00FF00;
跌L:DRAWLINE(跌点=1,L,REF(跌点,1)=1,REF(L,1),0),COLOR00FF00;
 STICKLINE(REF(跌点,1)=1,跌H,跌L,0,0),COLOR00FF00;
 DRAWTEXT(CURR=IF(高天>低天,高天,低天),(圆弧S+圆弧R)/2,'震谱: 前高对今低 前低对今高 倍增加余数');
DRAWTEXT(CURR=IF(高天>低天,高天,低天),圆弧S,'飞龙软件 飞龙软件'),COLOR8E0000;
 SY:=IF(XW<0.1*Y弧,SQRT(0.1*Y弧*0.1*Y弧-XW*XW),0)/BY;
震谱:IF(高天<低天,RN+SY,RN-SY),COLORFF00FF;
 SYA:=IF(XW<Y弧,SQRT(Y弧*Y弧-XW*XW),0)/BY;
震谱A:IF(高天<低天,RN+SYA,RN-SYA),COLORFFFF00;
 SYB:=IF(XW<0.25*Y弧,SQRT(0.25*Y弧*0.25*Y弧-XW*XW),0)/BY;
震谱B:IF(高天<低天,RN+SYB,RN-SYB),COLOR8E00E8;
 SYC:=IF(XW<0.5*Y弧,SQRT(0.5*Y弧*0.5*Y弧-XW*XW),0)/BY;
震谱C:IF(高天<低天,RN+SYC,RN-SYC),COLOR8E00E8;
 SYD:=IF(XW<0.75*Y弧,SQRT(0.75*Y弧*0.75*Y弧-XW*XW),0)/BY;
震谱D:IF(高天<低天,RN+SYD,RN-SYD),COLOR8E00E8;

77166155.jpg

77166155.jpg

7844361.rar (8.82 KB, 下载次数: 0, 售价: 1 金钱)
回复

使用道具 举报

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

本版积分规则