首页 > 其他分享 >通达信公式--蝴蝶形态预测

通达信公式--蝴蝶形态预测

时间:2023-06-03 10:01:18浏览次数:36  
标签:-- XB1 HL2 HL1 XB2 蝴蝶 通达信 HD 0.382

DRAWTEXT_FIX(1,0.82,0.01,1,'说明: 双击鼠标出现十字浮标,移动浮标到选定蝴蝶形态的前高、前低、后高、后低的位置,在标题栏的“K线根数”处就可看到各点的K线根数值,然后按ALT+T键,弹出参数调整窗,将各个点的K线根数值填进相应的栏,填好后点关闭窗口即可。'),COLORYELLOW;
DRAWTEXT_FIX(1,0.50,0.06,1,'选点的要求:回调形态符合A1>C1、B1>X1、C1>B1、0.382<XB1<0.786; 反弹形态符合X2>B2、C2>A2、B2>C2、0.382<XB2<0.786。'),COLORYELLOW;
     
AR1:=BARSCOUNT(C);
AR2:=CONST(AR1);
AR3:=AR2-AR1;
K线根数:AR3+1,NODRAW,COLORYELLOW;

QL1:=REF(L,回调前低X-1);
QG1:=REF(H,回调前高A-1);
HL1:=REF(L,回调后低B-1);
HG1:=REF(H,回调后高C-1);

XB1:CONST((QG1-HL1)/(QG1-QL1)),COLORGREEN,NODRAW;
VVH1:=IF(QG1>=HG1 AND HG1>HL1 AND HL1>QL1 AND XB1>0.382 AND XB1<=0.786,QL1,DRAWNULL),NODRAW;
VVH2:=IF(QG1>=HG1 AND HG1>HL1 AND HL1>QL1 AND XB1>0.382 AND XB1<=0.786,QG1,DRAWNULL),NODRAW;
VVH3:=IF(QG1>=HG1 AND HG1>HL1 AND HL1>QL1 AND XB1>0.382 AND XB1<=0.786,HL1,DRAWNULL),NODRAW;
VVH4:=IF(QG1>=HG1 AND HG1>HL1 AND HL1>QL1 AND XB1>0.382 AND XB1<=0.786,HG1,DRAWNULL),NODRAW;
CL1:=VVH1 AND VVH2 AND VVH3 AND VVH4,NODRAW;
买入成立:CL1,COLORLIRED,NODRAW;

QG1A:=IFC(CL1,QG1,DRAWNULL);
HG1A:=IFC(CL1,HG1,DRAWNULL);
QL1A:=IFC(CL1,QL1,DRAWNULL);
HL1A:=IFC(CL1,HL1,DRAWNULL);
VARA:=(HG1A-HL1A),NODRAW;
VAR1:=HG1A-(VARA*1.618),NODRAW;
VAR2:=HG1A-(VARA*2.00),NODRAW;
VAR3:=HG1A-(VARA*2.240),NODRAW;
VAR4:=HG1A-(VARA*2.618),NODRAW;

买D1:DRAWLINE(CURRBARSCOUNT=(回调后高C), CONST(VAR1), CURRBARSCOUNT=1, VAR1,1),COLORFF8800,DOTLINE;
买D2:DRAWLINE(CURRBARSCOUNT=(回调后高C), CONST(VAR2), CURRBARSCOUNT=1, VAR2,1),COLORFF8800,DOTLINE;
买D3:DRAWLINE(CURRBARSCOUNT=(回调后高C), CONST(VAR3), CURRBARSCOUNT=1, VAR3,1),COLORFF8800,DOTLINE;
买D4:DRAWLINE(CURRBARSCOUNT=(回调后高C), CONST(VAR4), CURRBARSCOUNT=1, VAR4,1),COLORFF8800,DOTLINE;

DRAWTEXT(CURRBARSCOUNT=回调后高C,买D1,VARCAT('买D1=',VAR2STR(买D1,3))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=回调后高C,买D2,VARCAT('买D2=',VAR2STR(买D2,3))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=回调后高C,买D3,VARCAT('买D3=',VAR2STR(买D3,3))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=回调后高C,买D4,VARCAT('买D4=',VAR2STR(买D4,3))),COLORYELLOW;

DRAWTEXT(CURRBARSCOUNT=回调前低X,L,VARCAT('前低X1【XB1】=',VAR2STR(CONST(XB1),3))),COLORGREEN;
DRAWTEXT(CURRBARSCOUNT=回调前高A,H,VARCAT('前高【A1】',VAR2STR(H,2))),COLORRED;
DRAWTEXT(CURRBARSCOUNT=回调后低B,L,VARCAT('后低【B1】',VAR2STR(L,2))),COLORFF8800;
DRAWTEXT(CURRBARSCOUNT=回调后高C,H,VARCAT('后高【C1】',VAR2STR(H,2))),COLORMAGENTA;

IFC(CL1,DRAWLINE(CURRBARSCOUNT=(回调前低X),L,CURRBARSCOUNT=(回调前高A),H,0),DRAWNULL)COLORYELLOW,LINETHICK2;
IFC(CL1,DRAWLINE(CURRBARSCOUNT=(回调前高A),H,CURRBARSCOUNT=(回调后低B),L,0),DRAWNULL)COLORYELLOW,LINETHICK2;
IFC(CL1,DRAWLINE(CURRBARSCOUNT=(回调后低B),L,CURRBARSCOUNT=(回调后高C),H,0),DRAWNULL)COLORYELLOW,LINETHICK2;
IFC(CL1,DRAWLINE(CURRBARSCOUNT=(回调前低X),L,CURRBARSCOUNT=(回调后低B),L,0),DRAWNULL)COLORFF8800,DOTLINE;
IFC(CL1,DRAWLINE(CURRBARSCOUNT=(回调后高C),H,CURRBARSCOUNT=(回调后高C-8),买D4,0),DRAWNULL)COLORFF8800,DOTLINE;
DRAWLINE(CURRBARSCOUNT=(回调后低B),L,CURRBARSCOUNT=(回调后高C),(买D4),0),COLORFF8800,DOTLINE;
STICKLINE(CURRBARSCOUNT=(回调后高C),H,CONST(VAR4),0,-1),COLORFF8800;
DRAWICON(CURRBARSCOUNT=回调前高A,H,39);
DRAWICON(CURRBARSCOUNT=回调前低X,L,38);
DRAWICON(CURRBARSCOUNT=回调后高C,H,39);
DRAWICON(CURRBARSCOUNT=回调后低B,L,38);

QG2:=REF(H,反弹前高X-1);
QL2:=REF(L,反弹前低A-1);
HG2:=REF(H,反弹后高B-1);
HL2:=REF(L,反弹后低C-1);

XB2:(HG2-QL2)/(QG2-QL2),COLORYELLOW,NODRAW;
VVH5:=IF(QG2>=HG2 AND HG2>HL2 AND HL2>QL2 AND XB2>0.382 AND XB2<=0.786,QG2,DRAWNULL),NODRAW;
VVH6:=IF(QG2>=HG2 AND HG2>HL2 AND HL2>QL2 AND XB2>0.382 AND XB2<=0.786,QL2,DRAWNULL),NODRAW;
VVH7:=IF(QG2>=HG2 AND HG2>HL2 AND HL2>QL2 AND XB2>0.382 AND XB2<=0.786,HG2,DRAWNULL),NODRAW;
VVH8:=IF(QG2>=HG2 AND HG2>HL2 AND HL2>QL2 AND XB2>0.382 AND XB2<=0.786,HL2,DRAWNULL),NODRAW;
CL2:=VVH5 AND VVH6 AND VVH7 AND VVH8,NODRAW;
卖出成立:CL2,COLORFFFF00,NODRAW;

QG2A:=IFC(CL2,QG2,DRAWNULL);
HG2A:=IFC(CL2,HG2,DRAWNULL);
QL2A:=IFC(CL2,QL2,DRAWNULL);
HL2A:=IFC(CL2,HL2,DRAWNULL);

VARB:=(HG2A-HL2A),NODRAW;

VAR5:=HL2A+(VARB*1.618),NODRAW;
VAR6:=HL2A+(VARB*2.000),NODRAW;
VAR7:=HL2A+(VARB*2.240),NODRAW;
VAR8:=HL2A+(VARB*2.618),NODRAW;

卖D1:DRAWLINE(CURRBARSCOUNT=(反弹后低C), CONST(VAR5), CURRBARSCOUNT=1,CONST(VAR5),1),COLORMAGENTA,DOTLINE;
卖D2:DRAWLINE(CURRBARSCOUNT=(反弹后低C), CONST(VAR6), CURRBARSCOUNT=1,CONST(VAR6),1),COLORMAGENTA,DOTLINE;
卖D3:DRAWLINE(CURRBARSCOUNT=(反弹后低C), CONST(VAR7), CURRBARSCOUNT=1,CONST(VAR7),1),COLORMAGENTA,DOTLINE;
卖D4:DRAWLINE(CURRBARSCOUNT=(反弹后低C), CONST(VAR8), CURRBARSCOUNT=1,CONST(VAR8),1),COLORMAGENTA,DOTLINE;

DRAWTEXT(CURRBARSCOUNT=反弹后低C,卖D1,VARCAT('卖D1=',VAR2STR(卖D1,3))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=反弹后低C,卖D2,VARCAT('卖D2=',VAR2STR(卖D2,3))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=反弹后低C,卖D3,VARCAT('卖D3=',VAR2STR(卖D3,3))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=反弹后低C,卖D4,VARCAT('卖D4=',VAR2STR(卖D4,3))),COLORYELLOW;

DRAWTEXT(CURRBARSCOUNT=反弹前高X,H,VARCAT('前高X2【XB2】=',VAR2STR(CONST(XB2),3))),COLORRED;
DRAWTEXT(CURRBARSCOUNT=反弹前低A,L,VARCAT('前低【A2】',VAR2STR(L,2))),COLORGREEN;
DRAWTEXT(CURRBARSCOUNT=反弹后高B,H,VARCAT('后高【B2】',VAR2STR(H,2))),COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=反弹后低C,L,VARCAT('后低【C2】',VAR2STR(L,2))),COLORFF8800;

IFC(CL2,DRAWLINE(CURRBARSCOUNT=(反弹前高X),H,CURRBARSCOUNT=(反弹前低A),L,0),DRAWNULL)COLORLIRED,LINETHICK2;
IFC(CL2,DRAWLINE(CURRBARSCOUNT=(反弹前低A),L,CURRBARSCOUNT=(反弹后高B),H,0),DRAWNULL)COLORLIRED,LINETHICK2;
IFC(CL2,DRAWLINE(CURRBARSCOUNT=(反弹后高B),H,CURRBARSCOUNT=(反弹后低C),L,0),DRAWNULL)COLORLIRED,LINETHICK2;
IFC(CL2,DRAWLINE(CURRBARSCOUNT=(反弹前高X),H,CURRBARSCOUNT=(反弹后高B),H,0),DRAWNULL)COLORMAGENTA,DOTLINE;
IFC(CL2,DRAWLINE(CURRBARSCOUNT=(反弹后低C),L,CURRBARSCOUNT=(反弹后低C-8),卖D4,0),DRAWNULL)COLORMAGENTA,DOTLINE;
DRAWLINE(CURRBARSCOUNT=(反弹后高B),H,CURRBARSCOUNT=(反弹后低C),(卖D4),0),COLORMAGENTA,DOTLINE;
STICKLINE(CURRBARSCOUNT=(反弹后低C),L,CONST(VAR8),0,-1),COLORMAGENTA;
DRAWICON(CURRBARSCOUNT=反弹前高X,H,39);
DRAWICON(CURRBARSCOUNT=反弹前低A,L,38);
DRAWICON(CURRBARSCOUNT=反弹后高B,H,39);
DRAWICON(CURRBARSCOUNT=反弹后低C,L,38);

A111:=REF(H,3)=HHV(H,2*6+1); 
B111:=FILTER(A111,3);
C111:=BACKSET(B111,3+1);
D111:=FILTER(C111,3+1);
A112:=REF(L,3)=LLV(L,2*6+1); 
B112:=FILTER(A112,3+1);
C112:=BACKSET(B112,3+1);
D112:=FILTER(C112,3);
E111:=(REF(LLV(L,2*3),1)+REF(HHV(H,2*3),1))/2;
E112:=(H+L)/2;
H111:=(D111 AND NOT(D112 AND E111>=E112)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
L111:=(D112 AND NOT(D111 AND E111<E112));
H112:=D111 AND NOT(D112 AND E111>=E112);
X111:=REF(BARSLAST(H111),1)+1;
F111:=BACKSET(H111 AND COUNT(L111,X111)>0,LLVBARS(IF(L111,LOW,10000),X111));
G111:=F111>REF(F111,1);
I111:=BACKSET(G111,2);
LD:=I111>REF(I111,1);
L112:=LD OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
X112:=REF(BARSLAST(L112),1)+1; 
F112:=BACKSET(L112 AND COUNT(H112,X112)>0,HHVBARS(IF(H112,HIGH,0),X112));
G112:=F112>REF(F112,1);
I112:=BACKSET(G112,2);
HD:=I112>REF(I112,1);
{IF(趋势线开关=1,DRAWLINE(LD,L,HD,H,0),DRAWNULL)LINETHICK1,DOTLINE,COLOR0000FF;}
IF(趋势线开关=1,DRAWLINE(LD,L,HD,H,0),DRAWNULL)LINETHICK1,DOTLINE,COLORBLUE;
IF(趋势线开关=1,DRAWLINE(HD,H,LD,L,0),DRAWNULL)LINETHICK1,DOTLINE,COLOR00FF00;
J111:=BACKSET(BARSTATUS=2 ,MIN(BARSLAST(HD),BARSLAST(LD))+1);
J112:=J111>REF(J111,1);
预测走势:IF(趋势线开关=1,DRAWLINE(J112,IF(HD,H,L),BARSTATUS=2,IF(BARSLAST(HD)>BARSLAST(LD),H,L),0),DRAWNULL),COLORYELLOW,DOTLINE;
K:=CURRBARSCOUNT,NODRAW;
DRAWNUMBER(趋势线开关=1 AND HD,H,K),COLORLIRED,DRAWABOVE;
DRAWNUMBER(趋势线开关=1 AND LD,L,K),COLORFFFF00;

 

标签:--,XB1,HL2,HL1,XB2,蝴蝶,通达信,HD,0.382
From: https://www.cnblogs.com/ip99/p/17453355.html

相关文章

  • 使用du查/mysql/bak目录使用1013g,但使用df查却显示使用2.8t
    问题描述:使用du查/mysql/bak目录使用1013g,但使用df查却显示使用2.8t,如下所示:系统:rhel7.3异常原因:删除文件后,du命令便不会在文件系统目录中统计被删除的文件,若此时存在运行中的进程持有已经被删除的文件句柄,那该类文件就不会真正在磁盘中被删除,分区超级块中的信息也不会更改,df命......
  • 2023-06-03 hexo路径出现%7C%7
    该问题是由一个sidebar.swig文件引起的解决方案:打开你的博客\themes\hexo-theme-next\layout\_macro在里面找到sidebar.swig文件,把判断代码去掉修改前:{%ifconfig.archive_dir!='/'andsite.posts.length>0%}<divclass="site-state-itemsite-state-posts">......
  • Beginner:Client libraries-8 在类中使用参数
    目标:创建和运行一个具有ROS参数的类背景当实现自己节点的时候,可能需要从launch文件中添加参数。本教程的目的是告诉你怎样在c++类中创建这些参数,以及怎样在launch文件中设置。任务1、创建一个包ros2pkgcreate--build-typeament_cmakecpp_parameters--dependenciesrcl......
  • Vue进阶(幺零八):npm run build 错误 (node:7852) UnhandledPromiseRejectionWarning: Cs
    (文章目录)一、前言在项目打包过程中,突然报如下错误:Vuenpmrunbuild错误(node:7852)UnhandledPromiseRejectionWarning:CssSyntaxError:xxxx.但是在执行npmrundev过程中,并未错误或告警信息。二、解决方案打开webpack.prod.conf.js,注释掉以下配置代码newOptimiz......
  • 2023-06-03 hexo设置中文
    我的博客使用的主题是Next主题在你的博客\themes\hexo-theme-next\languages中可以看到很多的语言包比如我要设置博客文件为简体中文,对应的就是zh-Hans接着,在博客根目录打开_comfig.yml,修改language的值为zh-Hans即可......
  • 一款强大的监控 CPU 的专业工具
    它的核心建立在内核模块上,用于从每个CPU核心检索内部性能计数器,并且与收集数据的守护进程一起工作,一个小型控制台客户端连接到该守护程序并显示收集的数据。CoreFreqCPUMonitoring它提供了高精度的重新捕获CPU数据的基础工作:核心频率和比率;SpeedStep(EIST)、TurboBoost、超线......
  • fastadmin隐藏右上角的搜索按钮及其导出等
     想要隐藏这些按钮,有两种方式一、直接html文件里修改data-show-export="false"data-show-toggle="false"data-show-columns="false"data-search="false"data-common-Search="false" 二、在bootstarpTable初始化的时候设定//初始化表格......
  • Flink安装部署
    Flink集群安装部署Flink支持多种安装部署方式StandaloneONYARNMesos、Kubernetes、AWS…这些安装方式我们主要讲一下standalone和onyarn。如果是一个独立环境的话,可能会用到standalone集群模式。在生产环境下一般还是用onyarn这种模式比较多,因为这样可以综合利用集群......
  • vue+elemntUI合并行2
    返回的是一维数组o:[{id:1,name:s;age:11},{id:1,name:s;age:11},{id:2,name:p;age:15}]1、对返回的数据做处理getData(){that.tableData=res.data.data.list;that.getFormatList();//重新合并行},getFormatList(){letrecordObj={};this.re......
  • mpi4py.MPI.COMM_WORLD.Get_size失败——mpiexec and python mpi4py gives rank 0 and
    参考:https://stackoverflow.com/questions/29264640/mpiexec-and-python-mpi4py-gives-rank-0-and-size-1  =========================================== 运行代码:importmpi4py.MPIasMPIcomm=MPI.COMM_WORLDcomm_rank=comm.Get_rank()comm_size=comm.G......