通达信突破分时高点(公式 主图 源码 测试图)补充引用公式NK

[复制链接]
查看183 | 回复0 | 2021-8-26 21:26:24 | 显示全部楼层 |阅读模式

以下是通达信突破分时高点(公式 主图 源码 测试图)补充引用公式NK(无源码的请下载附件导入)

请设置计算参数:

引用公式NK的源码是:
 
{NK}


{引用公式不要改名}

N:5;

庄A:(O+C)/2;

庄B:REF(C,1)*1.1;

庄C:REF(C,1)*0.9;

庄D:REF(L,1);

庄E:O;

庄F:(H+L)/2;

庄G:REF(C,2);

庄H:(REF(C,1)/REF(C,2)-1)*100;

庄I:REF(V,1);

庄J:AMOUNT/VOL/100;

庄K:REF(C,1);

庄L:REF(AMO.AMOW,1);

庄M:DYNAINFO(58)*DYNAINFO(37)/100;

庄N:H;

庄O:100*((DYNAINFO(5)-DYNAINFO(3))/DYNAINFO(3));

庄P:(INDEXC-REF(INDEXC,1))/REF(INDEXC,1);

庄Q:100*((DYNAINFO(6)-DYNAINFO(3))/DYNAINFO(3));

庄R:(HY_INDEXC-REF(HY_INDEXC,1))/REF(HY_INDEXC,1);

庄S:WINNER(CLOSE)*100;

庄T:(C/REF(C,4)-1)*100;

庄U:DYNAINFO(15)/DYNAINFO(4)/100;

庄V:1;

庄W:2;

庄X:REF(O,1);

庄Y:REF(H,1);

庄Z:REF((O+C)/2,1);

ZS:(INDEXC-REF(INDEXC,N))/REF(INDEXC,N);

庄ZJ:REF(AMOUNT/VOL/100,1);

MA5:MA(C,5);

MA10:MA(C,10);

MA20:MA(C,20);

MA30:MA(C,30);

MA60:MA(C,60);

MA120:MA(C,120);

MA250:MA(C,239);

ZJL:REF(MA(V,5),1);

CDT:H=ZTPRICE(REF(C,1),0.1) AND H>C;

幅度:(O/REF(C,1)-1)*100;

昨量:REF(V,1);

今量:V;

五日量均:MA(V,5);

十日量均:MA(V,10);

五日额均:MA(AMO,5);

十日额均:MA(AMO,10);

QA:REF(AMO,1)/100000000;

QB:REF(AMO,2)/10000;

QC:REF(AMO,3)/10000;

QD:REF(AMO,4)/10000;

QE:REF(AMO,5)/10000;

ROE:FINANCE(30)/FINANCE(19)*100;

ZYLTP:FINANCE(46)/10000;

攻防价位:(REF((H-L)*0.618+L,1));

GJ:=(C+H+L+O)/4;

明日阻力:=L+(GJ-L)+(C-L);

明日支撑:=L+(C-GJ);

今日阻力:REF(明日阻力, 1);

今日支撑:REF(明日支撑, 1);

总买:CUR_BUYORDER;

总卖:CUR_SELLORDER;

超B:=L2_AMO(0,2)/10000.0,NODRAW;

大B:=L2_AMO(1,2)/10000.0,NODRAW;

超S:=L2_AMO(0,3)/10000.0,NODRAW;

大S:=L2_AMO(1,3)/10000.0,NODRAW;

总成交额:=AMOUNT/10000.0,NODRAW;

大单净流入:=(超B+大B)-(超S+大S);

大单净比:100*大单净流入/总成交额;

量能饱和:100*(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20)),NODRAW;

委比:(CUR_BUYORDER-CUR_SELLORDER)/(CUR_BUYORDER+CUR_SELLORDER)*100;

 

 

 

主公式的源码如下:
{突破分时高点}
 

N: Param#0 (1.00--200.00)


M5:=MA.MA1#DAY;

DRAWTEXT_FIX(C/M5>1.08,0.24,0,0,STRCAT('预警:',STRCAT(VAR2STR(NK.庄N#DAY,2),'元,背离 可止盈'))),COLORWHITE;

IF(BETWEEN(MA5,DYNAINFO(6),DYNAINFO(5)),M5,DRAWNULL),COLORWHITE,DOTLINE;

DRAWTEXT_FIX(1,0,0,0,STRCAT('5日线:',STRCAT(VAR2STR(M5,2),'元'))),COLORWHITE;

DRAWTEXT_FIX(1,0.12,0,0,STRCAT('背离率:',STRCAT(VAR2STR(C/M5,2),'%'))),COLORGREEN;

XX:=SUM(AMO,BARSCOUNT(C))/SUM(V*100,BARSCOUNT(C));

主力:=EXPMA(C/XX,20);大户:=EXPMA(C/XX,60);散户:=EXPMA(C/XX,120);

底:=1;高:=1.03;

AA:=主力>大户 AND 主力>1.003 AND 大户>散户 AND C>EXPMA(C,20) AND EXPMA(C,10)>EXPMA(C,20) AND EXPMA(C,20)>EXPMA(C,60);

DRAWICON(主力>大户 AND 大户>散户 AND C>EXPMA(C,20) AND EXPMA(C,10)>EXPMA(C,20) AND EXPMA(C,20)>EXPMA(C,60) AND 主力=HHV(主力,30) AND CROSS(主力,1.003),C,42);

DRAWTEXT(主力>大户 AND 大户>散户 AND C>EXPMA(C,20) AND EXPMA(C,10)>EXPMA(C,20) AND EXPMA(C,20)>EXPMA(C,60) AND 主力=HHV(主力,30) AND CROSS(主力,1.003),C*0.999,'-异动'),COLORFFFF00;

DRAWICON(CROSS(主力,1.02),C,14); 

XG:HHV(H,480),DOTLINE,COLORFF9900;

DB:=C=XG AND C>REFX(C,1);

BD:=C=LLV(L,480) AND  C<REFX(C,1);

DRAWTEXT(FILTER(DB,10),C,'S'),COLORGREEN;

DRAWTEXT(FILTER(BD,10),C,'B'),COLORRED;

星期:=WEEKDAY,NODRAW;

日1:=DATETODAY(DATE);

上市日:=REF(DATE,TOTALBARSCOUNT-CURRBARSCOUNT);

自然日:=日1-DATETODAY(上市日)+1;

ZB:=(自然日-REF(自然日,1))!=星期-REF(星期,1)OR TOTALBARSCOUNT-CURRBARSCOUNT=0;

本周第几天:=BARSLAST(ZB)+1;

MA1:=REF(C,本周第几天);

MA2:=REF(MA1,本周第几天);

MA3:=REF(MA2,本周第几天);

MA4:=REF(MA3,本周第几天);

MA5:=REF(MA4,本周第几天);

MA6:=REF(MA5,本周第几天);

MA7:=REF(MA6,本周第几天);

MA8:=REF(MA7,本周第几天);

MA9:=REF(MA8,本周第几天);

十周价:=(C+MA1+MA2+MA3+MA4+MA5+MA6+MA7+MA8+MA9)/10;

 

决策:REFDATE(十周价,DATE),COLOREE8FFF,LINETHICK2;

DRAWTEXT(ISLASTBAR,决策,' 决策线'),COLOR5B5BFF;

 

DRAWICON(CROSS(C,决策),C,1);

DRAWTEXT_FIX(1,0,0.9,0,STRCAT(STRCAT('竞价强:',CON2STR(AA,2)),''))COLOREE8FFF;

 

开盘:=NK.幅度#DAY;

KPHS:=DYNAINFO(15)/DYNAINFO(4)/FINANCE(46)*100;

竞价动能:=KPHS*开盘,NODRAW;

DRAWTEXT_FIX(1,0,0.85,0,STRCAT('竞价动能:',STRCAT(VAR2STR(竞价动能,2),'')))COLORYELLOW;

 

今开:DYNAINFO(4),COLOR999900,LINETHICK3;

DRAWTEXT(CURRBARSCOUNT=8,今开,'        开盘线'),COLOR8500DE,LINETHICK2;

DRAWGBK(1,RGB(0,0,0),RGB(0,0,0),0,'019',0);  

 

 

价线:=DYNAINFO(7),NODRAW;

均线:=DYNAINFO(11),NODRAW,COLORYELLOW;

现均差:=(价线-均线)/DYNAINFO(3)*100;

DRAWTEXT_FIX(现均差>0,0,0.95,0,STRCAT('现均差:',STRCAT(VAR2STR(现均差,2),'%')))COLORLIMAGENTA;

DRAWTEXT_FIX(现均差=0,0,0.55,0,STRCAT('现均差:',STRCAT(VAR2STR(现均差,2),'%')))COLORWHITE;

DRAWTEXT_FIX(现均差<0,0,0.95,0,STRCAT('现均差:',STRCAT(VAR2STR(现均差,2),'%')))COLORLIGREEN;

 

DRAWTEXT(现均差>3 AND CURRBARSCOUNT=8,C,'S'),COLORGREEN;

DRAWTEXT(现均差<-3 AND  CURRBARSCOUNT=8,C,'B'),COLORRED;

 

DRAWTEXT_FIX(DYNAINFO(7)>NK.MA5#DAY,0.1,1,0,'周线上'),COLOR0000FF;

DRAWTEXT_FIX(DYNAINFO(7)>NK.MA10#DAY,0.2,1,0,'十线上'),COLOR0000FF;

DRAWTEXT_FIX(DYNAINFO(7)>NK.MA20#DAY,0.3,1,0,'月线上'),COLOR0000FF;

DRAWTEXT_FIX(DYNAINFO(7)>NK.MA60#DAY,0.4,1,0,'季线上'),COLOR0000FF;

DRAWTEXT_FIX(DYNAINFO(7)>NK.MA120#DAY,0.5,1,0,'半年线上'),COLOR0000FF;

DRAWTEXT_FIX(DYNAINFO(7)>NK.MA250#DAY,0.6,1,0,'年线上'),COLOR0000FF;

 

DRAWTEXT_FIX(DYNAINFO(7)<NK.MA5#DAY,0.1,1,0,'周线下'),COLORLIGREEN;

DRAWTEXT_FIX(DYNAINFO(7)<NK.MA10#DAY,0.2,1,0,'十线下'),COLORLIGREEN;

DRAWTEXT_FIX(DYNAINFO(7)<NK.MA20#DAY,0.3,1,0,'月线下'),COLORLIGREEN;

DRAWTEXT_FIX(DYNAINFO(7)<NK.MA60#DAY,0.4,1,0,'季线下'),COLORLIGREEN;

DRAWTEXT_FIX(DYNAINFO(7)<NK.MA120#DAY,0.5,1,0,'半年线下'),COLORLIGREEN;

DRAWTEXT_FIX(DYNAINFO(7)<NK.MA250#DAY,0.6,1,0,'年线下'),COLORLIGREEN;

最高涨幅:=NK.庄O#DAY;

DRAWTEXT_FIX(1,0.84,0,0,STRCAT('最高:',STRCAT(VAR2STR(最高涨幅,2),'%'))),COLORRED;

 

DRAWTEXT_FIX(1,0.93,0,0,STRCAT('  ',STRCAT(VAR2STR(NK.庄N#DAY,2),'元'))),COLORRED;

1638144665.png

1638144665.png

回复

使用道具 举报

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

本版积分规则