缠论中枢,可以媲美手划线指标 公式 源码[通达信公式]
指标公式源码分析及使用说明:
源码:
1 融合了cl.dll和bfd.dll两个分笔划分的优点{缠论分笔分段XFBFD.DLL,绑定TDXDLL1}XD:=TDXDLL1(1,H,L,DATE);BG:=TDXDLL1(2,H,L,DATE);{输出笔高低}BD:=TDXDLL1(3,H,L,DATE);{输出笔高}ZG:=TDXDLL1(4,H,L,DATE);ZD:=TDXDLL1(5,H,L,DATE);ZSKS:=TDXDLL1(6,H,L,DATE);ZSJS:=TDXDLL1(7,H,L,DATE);FBI:=TDXDLL1(18,H,L,DATE) NODRAW; {输出笔}{笔}XBGD:=IF(FBI=1,BG,IF(FBI=-1,BD,0));XBI:=TDXDLL1(19,XBGD,L,1),NODRAW;{缠论CL.DLL,绑定TDXDLL3}KX:=TDXDLL3(1,H,L,C);{解决包含K线的问题};BI:=TDXDLL3(4,H,L,C) NODRAW;{BI类型}KXG:=TDXDLL3(2,H,L,C);{高点}KXD:=TDXDLL3(3,H,L,C);{低点}{综合二者优化笔}SHOULDHAVEBI:=MIN(233,COUNT(C!=0,-1)),NODRAW;SHOULDHAVEDUAN:=MIN(288,COUNT(C!=0,-1)),NODRAW;NEXTUBI:=REFX(BARSNEXT(BI=1 OR FBI=1),1)+1,NODRAW;NEXTDBI:=REFX(BARSNEXT(BI=-1 OR FBI=-1),1)+1,NODRAW;GBI1:=IF(FBI=1 OR FBI=-1,FBI,IF(BI=1 OR BI=-1,BI,0)) NODRAW;LGBI2:=IF(COUNT(GBI1!=0,SHOULDHAVEBI)<1,-1,BARSLAST(GBI1)),NODRAW;LGBI1:=IF(LGBI2=0 AND COUNT(GBI1!=0,SHOULDHAVEBI)>1,REF(LGBI2,1)+1,LGBI2),NODRAW;UBCANCEL1:=NEXTUBI<NEXTDBI AND HHV(H,4)<REFX(HHV(H,4),NEXTUBI),NODRAW;UBCANCEL2:=NEXTUBI>NEXTDBI AND (NEXTUBI-NEXTDBI)<3 AND REFX(NOT((COUNT(L>1.035*REF(H,1),LGBI1)>0 OR COUNT(L>1.01*REF(H,1),LGBI1)>1) AND REF(L,LGBI1)<0.8*H),NEXTUBI),NODRAW;UBCANCEL3:=REF(GBI1,LGBI1)=1 AND REF(UBCANCEL1 OR UBCANCEL2,LGBI1)=0 AND LGBI1>0,NODRAW;UBCANCEL4:=REF(GBI1,LGBI1)=-1 AND NEXTDBI<2,NODRAW;DBCANCEL1:=NEXTUBI>NEXTDBI AND LLV(L,4)>REFX(LLV(L,4),NEXTDBI),NODRAW;DBCANCEL2:=NEXTUBI<NEXTDBI AND (NEXTDBI-NEXTUBI)<3 AND REFX(NOT((COUNT(REF(L,1)>1.035*H,LGBI1)>0 OR COUNT(REF(L,1)>1.01*H,LGBI1)>1) AND REF(H,LGBI1)>1.2*L),NEXTDBI),NODRAW;DBCANCEL3:=REF(GBI1,LGBI1)=-1 AND REF(DBCANCEL1 OR DBCANCEL2,LGBI1)=0 AND LGBI1>0,NODRAW;DBCANCEL4:=REF(GBI1,LGBI1)=1 AND REF(UBCANCEL1 OR UBCANCEL2,LGBI1),NODRAW;GBI:=IF(GBI1=1 AND (UBCANCEL1 OR UBCANCEL2 OR UBCANCEL3 OR UBCANCEL4),0, IF(GBI1=-1 AND (DBCANCEL1 OR DBCANCEL2 OR DBCANCEL3 OR DBCANCEL4),0,GBI1)) NODRAW;LGBI3:=IF(COUNT(GBI!=0,SHOULDHAVEBI)<1,-1,BARSLAST(GBI));LGBI:=IF(LGBI3=0 AND COUNT(GBI!=0,SHOULDHAVEBI)>1,REF(LGBI3,1)+1,LGBI3),NODRAW;{上一笔的距离}GBIH:=HHV(H,MIN(5,LGBI));GBIL:=LLV(L,MIN(5,LGBI));DRAWLINE(GBI=1,GBIH,GBI=-1,GBIL,0),COLORLIGREEN;DRAWLINE(GBI=-1,GBIL,GBI=1,GBIH,0),COLORLIGREEN;2 在优化笔gbi的基础上,依据缠论中枢定义,制定了两类共八种笔中枢的》》 规则,依据规则画中枢。结果基本可用。 不足之处是,限于指标编写语言和作者水平的限制,没有完全解决笔包含的问题。具体的请看图吧。{程序化交易 www.cxh99.com }
{程序化交易 www.cxh99.com }
{程序化交易 www.cxh99.com }
{程序化交易 www.cxh99.com }
{程序化交易 www.cxh99.com }
看到一些缠论指标的帖子,以缠论股票池(cl.dll)和分笔分段(fbfd试用.dll,zslx试用.dll)为基础的为多。在试用过之后,发现,这两个缠论的分笔基本可以用,但是分段和中枢 离实用 还有距离。于是,写了一个帖子,缠论股票池的优化探讨分享优化的指标要点说明:1 融合了cl.dll和bfd.dll两个分笔划分的优点{缠论分笔分段XFBFD.DLL,绑定TDXDLL1}XD:=TDXDLL1(1,H,L,DATE);BG:=TDXDLL1(2,H,L,DATE);{输出笔高低}BD:=TDXDLL1(3,H,L,DATE);{输出笔高}ZG:=TDXDLL1(4,H,L,DATE);ZD:=TDXDLL1(5,H,L,DATE);ZSKS:=TDXDLL1(6,H,L,DATE);ZSJS:=TDXDLL1(7,H,L,DATE);FBI:=TDXDLL1(18,H,L,DATE) NODRAW; {输出笔}{笔}XBGD:=IF(FBI=1,BG,IF(FBI=-1,BD,0));XBI:=TDXDLL1(19,XBGD,L,1),NODRAW;{缠论CL.DLL,绑定TDXDLL3}KX:=TDXDLL3(1,H,L,C);{解决包含K线的问题};BI:=TDXDLL3(4,H,L,C) NODRAW;{BI类型}KXG:=TDXDLL3(2,H,L,C);{高点}KXD:=TDXDLL3(3,H,L,C);{低点}{综合二者优化笔}SHOULDHAVEBI:=MIN(233,COUNT(C!=0,-1)),NODRAW;SHOULDHAVEDUAN:=MIN(288,COUNT(C!=0,-1)),NODRAW;NEXTUBI:=REFX(BARSNEXT(BI=1 OR FBI=1),1)+1,NODRAW;NEXTDBI:=REFX(BARSNEXT(BI=-1 OR FBI=-1),1)+1,NODRAW;GBI1:=IF(FBI=1 OR FBI=-1,FBI,IF(BI=1 OR BI=-1,BI,0)) NODRAW;LGBI2:=IF(COUNT(GBI1!=0,SHOULDHAVEBI)<1,-1,BARSLAST(GBI1)),NODRAW;LGBI1:=IF(LGBI2=0 AND COUNT(GBI1!=0,SHOULDHAVEBI)>1,REF(LGBI2,1)+1,LGBI2),NODRAW;UBCANCEL1:=NEXTUBI<NEXTDBI AND HHV(H,4)<REFX(HHV(H,4),NEXTUBI),NODRAW;UBCANCEL2:=NEXTUBI>NEXTDBI AND (NEXTUBI-NEXTDBI)<3 AND REFX(NOT((COUNT(L>1.035*REF(H,1),LGBI1)>0 OR COUNT(L>1.01*REF(H,1),LGBI1)>1) AND REF(L,LGBI1)<0.8*H),NEXTUBI),NODRAW;UBCANCEL3:=REF(GBI1,LGBI1)=1 AND REF(UBCANCEL1 OR UBCANCEL2,LGBI1)=0 AND LGBI1>0,NODRAW;UBCANCEL4:=REF(GBI1,LGBI1)=-1 AND NEXTDBI<2,NODRAW;DBCANCEL1:=NEXTUBI>NEXTDBI AND LLV(L,4)>REFX(LLV(L,4),NEXTDBI),NODRAW;DBCANCEL2:=NEXTUBI<NEXTDBI AND (NEXTDBI-NEXTUBI)<3 AND REFX(NOT((COUNT(REF(L,1)>1.035*H,LGBI1)>0 OR COUNT(REF(L,1)>1.01*H,LGBI1)>1) AND REF(H,LGBI1)>1.2*L),NEXTDBI),NODRAW;DBCANCEL3:=REF(GBI1,LGBI1)=-1 AND REF(DBCANCEL1 OR DBCANCEL2,LGBI1)=0 AND LGBI1>0,NODRAW;DBCANCEL4:=REF(GBI1,LGBI1)=1 AND REF(UBCANCEL1 OR UBCANCEL2,LGBI1),NODRAW;GBI:=IF(GBI1=1 AND (UBCANCEL1 OR UBCANCEL2 OR UBCANCEL3 OR UBCANCEL4),0, IF(GBI1=-1 AND (DBCANCEL1 OR DBCANCEL2 OR DBCANCEL3 OR DBCANCEL4),0,GBI1)) NODRAW;LGBI3:=IF(COUNT(GBI!=0,SHOULDHAVEBI)<1,-1,BARSLAST(GBI));LGBI:=IF(LGBI3=0 AND COUNT(GBI!=0,SHOULDHAVEBI)>1,REF(LGBI3,1)+1,LGBI3),NODRAW;{上一笔的距离}GBIH:=HHV(H,MIN(5,LGBI));GBIL:=LLV(L,MIN(5,LGBI));DRAWLINE(GBI=1,GBIH,GBI=-1,GBIL,0),COLORLIGREEN;DRAWLINE(GBI=-1,GBIL,GBI=1,GBIH,0),COLORLIGREEN;2 在优化笔gbi的基础上,依据缠论中枢定义,制定了两类共八种笔中枢的》》 规则,依据规则画中枢。结果基本可用。nbsp;
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容