您现在的位置:程序化交易>> 股票公式>> 通达信>> 通达信公式>>正文内容

箱体短线操作指标公式源码副图指标公式[通达信公式]

相关标签:

 

通达信箱体短线操作指标源码附图

 

 

 

 

原理解析:


 

 来源:程序化99( WWW.CXH99.COM )

源码:

 

 

{N:=5 到10 都可以}

 


AA:=REF(H,N)=HHV(H,2*N+1);
QY:=BACKSET(AA,N+1);
CC:=FILTER(QY,N) AND H=HHV(H,N+1);
DDD:=BARSLAST(CC),NODRAW;
GDTS:=IF(CC,CURRBARSCOUNT,0),NODRAW;
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS),NODRAW;
GDCS1:=CONST(DINGBUTS),NODRAW;
GDCS13:=CONST(REF(HIGH,GDCS1-1));
DINGBUTS1:=REF(DINGBUTS,DDD+1),NODRAW;
GDCS2:=CONST(DINGBUTS1);
GDCS23:=CONST(REF(HIGH,DINGBUTS1-1));
XG1:=BACKSET(ISLASTBAR,GDCS1);
XG2:=BACKSET(ISLASTBAR,DINGBUTS1);
高点压力:=DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) ,COLORBLUE,LINETHICK1;
AA1:=REF(L,N)=LLV(L,2*N+1);
QY1:=BACKSET(AA1,N+1);
CC1:=FILTER(QY1,N) AND L=LLV(L,N+1);
DD1:=BARSLAST(CC1);
DDTS:=IF(CC1,CURRBARSCOUNT,0);
DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
DDCS1:=CONST(DDTS1);
DDCS13:=CONST(REF(L,DDCS1-1));
DDTS2:=REF(DDTS1,DD1+1);
DDCS2:=CONST(DDTS2);
DDCS23:=CONST(REF(L,DDTS2-1));
XD1:=BACKSET(ISLASTBAR,DDCS1);
XD2:=BACKSET(ISLASTBAR,DDTS2);
低点支撑:=DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1),COLORBLUE,LINETHICK1;
DRAWBAND(高点压力,RGB(00,00,100),低点支撑,RGB(00,00,00));
ZGSTAR:=(高点压力+低点支撑)/2;
ZGEND:=CONST((高点压力+低点支撑)/2);
STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);
M:=INTPART(3*N/5);
AAA:=REF(H,M)=HHV(H,2*M+1);
QYY:=BACKSET(AAA,M+1);
CCC:=FILTER(QYY,M) AND H=HHV(H,M+1);
DDDD:=BARSLAST(CCC),NODRAW;
GDTSS:=IF(CCC,CURRBARSCOUNT,0),NODRAW;
DINGBUTSS:=IF(DDDD,REF(GDTSS,DDDD),GDTSS),NODRAW;
GDCS11:=CONST(DINGBUTSS),NODRAW;
DINGBUTS11:=REF(DINGBUTSS,DDDD+1),NODRAW;
GDCS22:=CONST(DINGBUTS11);
高点压力2:DRAWLINE(CURRBARSCOUNT=GDCS22,H,CURRBARSCOUNT=GDCS11,H,1),COLORRED,LINETHICK1;
AA11:=REF(L,M)=LLV(L,2*M+1);
QY11:=BACKSET(AA11,M+1);
CC11:=FILTER(QY11,M) AND L=LLV(L,M+1);
DD11:=BARSLAST(CC11);
DDTSS:=IF(CC11,CURRBARSCOUNT,0);
DDTS11:=IF(DD11,REF(DDTSS,DD11),DDTSS);
DDCS11:=CONST(DDTS11);
DDTS22:=REF(DDTS11,DD11+1);
DDCS22:=CONST(DDTS22);
低点支撑2:DRAWLINE(CURRBARSCOUNT=DDCS22,L,CURRBARSCOUNT=DDCS11,L,1) COLORRED,LINETHICK1;
DRAWBAND(高点压力2,RGB(00,00,200),低点支撑2,RGB(00,00,200));
低点支撑②:低点支撑2,COLORMAGENTA;
高点压力②:高点压力2,COLORMAGENTA;
中轨②:(高点压力2+低点支撑2)/2,COLORYELLOW;
低点支撑①:低点支撑,COLORRED;
高点压力①:高点压力,COLORRED;
中轨①:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLORYELLOW,LINETHICK1;
DRAWKLINE(H,O,L,C);
单阳:=C>O*(1+4/100) AND VOL>REF(VOL,1)*1.8;
DRAWTEXT(CURRBARSCOUNT<100 AND 单阳,L*0.98,'进场'),COLOR00FFFF;
高不破价:=REF(C,BARSLAST(单阳));
中不破价:=REF((C+L)/2,BARSLAST(单阳));
低不破价:=REF(L,BARSLAST(单阳));
单阳不破:=CURRBARSCOUNT<100 AND BARSLAST(单阳)<13 AND (LLV(L,BARSLAST(单阳))>低不破价 OR LLV(L,BARSLAST(单阳))=低不破价);
STICKLINE(单阳不破,低不破价-低不破价*0.003,低不破价,4,0),COLORRED;
DRAWTEXT(BARSLAST(单阳)=10 AND 单阳不破 AND C>O,低不破价*0.98,'启动');
DRAWTEXT(BARSLAST(单阳)=12 AND REF(L,1)>低不破价 AND L<中不破价 AND C>单阳不破,低不破价*0.98,'最后支撑');
DRAWTEXT(BARSLAST(单阳)=1 AND 单阳不破,低不破价*0.98,'1'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=2 AND 单阳不破,低不破价*0.98,'2'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=3 AND 单阳不破,低不破价*0.98,'3'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=5 AND 单阳不破,低不破价*0.98,'5'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=7 AND 单阳不破,低不破价*0.98,'7'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=9 AND 单阳不破,低不破价*0.98,'9'),COLORGREEN;
DRAWTEXT(BARSLAST(单阳)=11 AND 单阳不破,低不破价*0.98,'11'),COLORGREEN;
CS:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
YJD:=(EMA(CS,3)-50)*2;
DRAWTEXT(CROSS(YJD,-60),L*0.98,'短线'),COLORYELLOW;DRAWTEXT_FIX(C>O,0.01,0.9,0,' WWW.CXH99.COM '),COLORRED;
DRAWTEXT_FIX(C>O,1,1,0,'程序化交易模型'),COLORRED;

 

 

公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程

 

 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

可联系技术人员 QQ: 511411198  有需要帮忙请点击这里留言!!!或微信:cxhjy888 进行 有偿 编写!

怎么收费,代编流程等详情请点击阅读,或QQ微信联系我们!

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容