图片
之字转向一、策略原理:
1、以第一根K线的最高价A做为起点开始取值,即A为之字转向的初始值
2、后续K线的最高价如果一直小于(A+100)并且大于(A-100),那么第二个点一直为最新K线上最高价HIGH的取值,随着后续K线上之字转向第二个点的变动,之前K线上HH的取值也会发生改变,因为之前k线上HH的取值为A点与当前k线最高价连成的趋势线上对应的取值
3、例如,当前K线的最高价大于A+100,当根K线最高价的取值为B,那么后续的K线如果延续上升趋势,大于B的取值,则取代B成为第二点(此时前面K线HH的取值发生变化,理由同第2点);后续的K线未延续上升取值,均小于B的取值,则B值确定为第二个点
4、确定第二个点之后,寻找后续最高价小于B-100K线,若未小于B-100,则第三个点为当前最新K线的最高价(取值规则重复第2点)
5、后续HH的取值重复此规律
源码:
HH:ZIGZAG(HIGH,100,0);
图片
二、策略原理:
由最高价和最低价的之字转向,确定高低点连线源码:ZH:=ZIGZAG(H,100,0);ZL:=ZIGZAG(L,100,0);CONH:=ZH>REF(ZH,1)&&ZH>REFX(ZH,1);CONL:=ZL<REF(ZL,1)&&ZL<REFX(ZL,1);N:=BARSLAST(CONL)+1;M:=BARSLAST(CONH)+1;LX:=BACKSET(M=1&&REF(EXIST(N=1,M),1),REF(LLVBARS(L,M),1)+2);
HX:=BACKSET(N=1&&REF(EXIST(M=1,N),1),REF(HHVBARS(H,N),1)+2);
DRAWLINE1(CROSS(LX=1,0.5),L,CROSS(HX=1,0.5),H,0),LINETHICK3,COLORRED;
DRAWLINE1(CROSS(HX=1,0.5),H,CROSS(LX=1,0.5),L,0),LINETHICK3,COLORGREEN;图片
创N周期新高新低确定高低点 策略原理:最高价创N周期新高,定义为高点;最低价创N周期新低,定义为低点,进行连线源码:N:=20;HH:=H>HV(H,N);NH:=BARSLAST(HH)+1;LL:=L<LV(L,N);NL:=BARSLAST(LL)+1;AH:=BACKSET(COUNT(LL,NH)&&LL,NH);AL:=BACKSET(COUNT(HH,NL)&&HH,NL);DRAWLINE1(CROSS(AH=1,0.5),H,CROSS(AL=1,0.5),L,0),LINETHICK3,COLORGREEN;DRAWLINE1(CROSS(AL=1,0.5),L,CROSS(AH=1,0.5),H,0),LINETHICK3,COLORRED;
图片
艾云策略文华6---指点江山
图片
期货螺纹15分钟行情分析走势图
BOLL通道确认高低点策略原理:
最高价上传上轨,取上穿之后的高点;
最低价下穿下轨,物联网软件开发公司取下穿之后的低点,进行连线。
源码:
MID:MA(CLOSE,26);
TMP2:=STD(CLOSE,26);
TOP:MID+2*TMP2;
BOTTOM:MID-2*TMP2;
N:=BARSLAST(CROSSDOWN(L,BOTTOM))+1;
M:=BARSLAST(CROSS(H,TOP))+1;
LL:=IF(L<BOTTOM,L,100000);
HH:=IF(H>TOP,H,0);
LX:=BACKSET(M=1&&REF(EXIST(N=1,M),1),REF(LLVBARS(LL,M),1)+2);
HX:=BACKSET(N=1&&REF(EXIST(M=1,N),1),REF(HHVBARS(HH,N),1)+2);
DRAWLINE1(CROSS(LX=1,0.5),L,CROSS(HX=1,0.5),H,0),LINETHICK3,COLORRED;
DRAWLINE1(CROSS(HX=1,0.5),H,CROSS(LX=1,0.5),L,0),LINETHICK3,COLORGREEN;
图片
SAR确认高低点策略原理:
SAR绿转红,同时满足k线高点创M周期新高,定义为高点;SAR红转绿,同时满足k线低点创M周期新低,定义为低点,进行连线。源码://SAR源码指标STEP1:=2/100;MVALUE1:=20/100;SARLINE:SAR(4,STEP1,MVALUE1),NODRAW;IF(SARLINE>0,SARLINE,NULL),COLORRED,NOTEXT,CIRCLEDOT;IF(SARLINE<0,-SARLINE,NULL),COLORCYAN,NOTEXT,CIRCLEDOT;//定义M周期,可以任意修改M:=20;CON:=H>HV(H,M)&&SARLINE>0;CNX:=REF(CON,1)&&H<REF(H,1);NN:BARSLAST(CNX)+1;COM:=L<LV(L,M)&&SARLINE<0;CMX:=REF(COM,1)&&L>REF(L,1);MM:BARSLAST(CMX)+1;DRAWLINE3(CNX&&REF(EXIST(CNX,NN),1),REF(L,MM),MM,CMX&&REF(EXIST(CMX,MM),1),REF(H,NN),NN,0),COLORRED,LINETHICK3;DRAWLINE3(CMX&&REF(EXIST(CMX,MM),1),REF(H,NN),NN,CNX&&REF(EXIST(CNX,NN),1),REF(L,MM),MM,0),COLORGREEN,LINETHICK3;//倒数第二条画线MBV:=MAX(MM,NN);NBV:=MIN(MM,NN);ADM1:=BACKSET(ISLASTBAR&&MM=MBV,MBV+1);ADN1:=BACKSET(ISLASTBAR&&MM=MBV,NBV+1);DRAWLINE1(CROSS(ADM1=1,0.5),L,CROSS(ADN1=1,0.5),H,0),COLORRED,LINETHICK3;ADM2:=BACKSET(ISLASTBAR&&NN=MBV,MBV+1);ADN2:=BACKSET(ISLASTBAR&&NN=MBV,NBV+1);DRAWLINE1(CROSS(ADM2=1,0.5),H,CROSS(ADN2=1,0.5),L,0),COLORGREEN,LINETHICK3;//最后一条画线DRAWLINE3(ISLASTBAR&&H<REF(H,NBV)&&NBV=NN,L,0,1,REF(H,NN),NN,0),COLORGREEN,LINETHICK3;DRAWLINE3(ISLASTBAR&&L>REF(L,NBV)&&NBV=MM,H,0,1,REF(L,MM),MM,0),COLORRED,LINETHICK3;图片
缠论画线策略原理:
创M周期新高,并且M均线高于10均线,确定定位点;创M周期新低,并且M均线低于10均线,确定定位点;定位点之间取高点和低点进行连线。源码:M:=5;//M值需要大于等于5G:=MA(C,5);D:=MA(C,10);NNH:=BARSLAST(H=HHV(H,M)) ,NODRAW;NNL:=BARSLAST(L=LLV(L,M)) ,NODRAW;NN:=IF(REF(G,NNH)>REF(D,NNH) AND NNH<=M-3,NNH,IF(REF(G,NNL)<REF(D,NNL) AND NNL<=M-3,NNL,M-2)) ,NODRAW;NNN:=IF(ISLASTBAR AND NN>0,NN,M-2) ,NODRAW;H1:=REF(H,NNN)=HHV(H,M-1);L1:=REF(L,NNN)=LLV(L,M-1);FG01:=BACKSET(H1,NNN+1)>BACKSET(H1,NNN),NODRAW;//只设置前面第M-1个FD01:=BACKSET(L1,NNN+1)>BACKSET(L1,NNN) ,NODRAW;FG02:=FG01=FD01 AND G>D,NODRAW;FD02:=FG01=FD01 AND G<D,NODRAW;TTTT:=BARSLAST(FD01),NODRAW;FG0:=FG01 AND IF(FG02=1,H=HHV(H,BARSLAST(REF(FD01,1))+1),H=HHV(H,IF(BARSLAST(L=LLV(L,M))>=M-2,M-2,BARSLAST(FD01)))) AND FD02=0 ,NODRAW;FD0:=FD01 AND IF(FD02=1,L=LLV(L,BARSLAST(REF(FG01,1))+1),L=LLV(L,IF(BARSLAST(H=HHV(L,M))>=M-2,M-2,BARSLAST(FG01)))) AND FG02=0 ,NODRAW;//高低点间周期GT:=BARSLAST(FG0),NODRAW;DT:=BARSLAST(FD0),NODRAW;//第一次处理高低点间多余的点LLLL:=DT=0 AND REF(DT,1)<GT AND L>REF(L,REF(DT,1)+1),NODRAW;FG1:=BACKSET(REFX(GT,1)=0 AND GT<DT AND REFX(H,1)>=REF(H,GT),GT+1),NODRAW;FD1:=BACKSET(REFX(DT,1)=0 AND DT<GT AND REFX(L,1)<=REF(L,DT),DT+1),NODRAW;FG11:=IF(GT=0 AND REF(GT,1)<DT AND IF(REF(G,BARSLAST(L=LLV(L,M)))>REF(D,BARSLAST(L=LLV(L,M))),BARSLAST(L=LLV(L,M))<M-2,1) AND H<REF(H,REF(GT,1)+1),1,0),NODRAW;FD11:=IF(DT=0 AND REF(DT,1)<GT AND IF(REF(G,BARSLAST(H=HHV(H,M)))<REF(D,BARSLAST(H=HHV(H,M))),BARSLAST(H=HHV(H,M))<M-2,1) AND L>REF(L,REF(DT,1)+1),1,0),NODRAW;//再次周期GT1:=BARSLAST(FG11<>1 AND FG1<>1 AND FG0),NODRAW;DT1:=BARSLAST(FD11<>1 AND FD1<>1 AND FD0),NODRAW;FD2:=BACKSET(REFX(GT1,1)=0 AND DT1<3 AND GT1-DT1<4 AND REF(L,DT1)>LLV(L,GT1+M-2),DT1+1),NODRAW;FG2A:=BACKSET(REFX(GT1,1)=0 AND DT1<3 AND GT1-DT1<4 AND REF(L,DT1)<=LLV(L,GT1+M-2) AND REF(H,GT1)>HHV(H,GT1+M-2),GT1+1),NODRAW;FG2B:=IF(GT1=0 AND DT1<4 AND REF(GT1,1)-DT1<4 AND REF(L,DT1)<=LLV(L,REF(GT1,1)+M-1) AND H>HHV(H,REF(GT1,1)+M-1),1,0),NODRAW;FG2:=BACKSET(REFX(DT1,1)=0 AND GT1<3 AND DT1-GT1<4 AND REF(H,GT1)<HHV(H,DT1+M-2),GT1+1),NODRAW;FD2A:=BACKSET(REFX(DT1,1)=0 AND GT1<3 AND DT1-GT1<4 AND REF(H,GT1)>=HHV(L,DT1+M-2) AND REF(L,DT1)>LLV(L,DT1+M-2),DT1+1),NODRAW;FD2B:=IF(DT1=0 AND GT1<4 AND REF(DT1,1)-GT1<4 AND REF(H,GT1)>=HHV(H,REF(DT1,1)+6) AND L>LLV(L,REF(DT1,1)+M-1),1,0),NODRAW;TTTTTT:= H<REF(H,REF(GT1,1)+1) AND DT1<4,NODRAW;HHHHHH:=REF(LLV(L,10),DT1),NODRAW;//前长后短;FG21:=IF(GT1=0 AND DT1<4 AND H<=REF(H,REF(GT1,1)+1) ,1,0),NODRAW;FD21:=IF(DT1=0 AND GT1<4 AND L>=REF(L,REF(DT1,1)+1) ,1,0),NODRAW;//前短后长,前低后高(去低);FD231:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND GT1-DT1<4 AND REFX(H,1)>REF(H,GT1) AND REF(L,DT1)>REF(LLV(L,10),DT1),DT1+1),NODRAW;FG23:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND GT1-DT1<4 AND REFX(H,1)>REF(H,GT1) AND (REF(H,GT1)<REF(HHV(H,13),GT1) OR REF(FD231,DT1)=0),GT1+1),NODRAW;//前短后长,去2;FG231:=BACKSET(REFX(DT1,1)=0 AND GT1>3 AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)<REF(L,DT1) AND REF(H,GT1)<REF(HHV(H,10),GT1) ,GT1+1),NODRAW;FD23:=BACKSET(REFX(DT1,1)=0 AND GT1>3 AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)<REF(L,DT1) AND ( REF(L,DT1)>REF(LLV(L,13),DT1) OR REF(FG231,GT1)=0),DT1+1),NODRAW;//前短后长,去3;FDD23:=REF(H,GT1)<REF(HHV(H,10),GT1) OR REF(FD23,DT1)=0,NODRAW;FD24:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND GT1-DT1<4 AND REFX(H,1)<HHV(H,GT1+3) AND REF(L,DT1)>LLV(L,DT1+5),DT1+1),NODRAW;FG24:=BACKSET(REFX(DT1,1)=0 AND GT1>3 AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)>LLV(L,DT1+3) AND REF(H,GT1)<HHV(H,GT1+5),GT1+1),NODRAW;//做两次高低点间多余的点GT2:=BARSLAST(FG21<>1 AND FG23<>1 AND FG231<>1 AND FG24<>1 AND FG2<>1 AND FG2A<>1 AND FG2B<>1 AND GT1=0),NODRAW;DT2:=BARSLAST(FD21<>1 AND FD23<>1 AND FD231<>1 AND FD24<>1 AND FD2<>1 AND FD2A<>1 AND FD2B<>1 AND DT1=0),NODRAW;FG3:=BACKSET(REFX(GT2,1)=0 AND GT2<DT2 AND REFX(H,1)>=REF(H,GT2),GT2+1),NODRAW;FD3:=BACKSET(REFX(DT2,1)=0 AND DT2<GT2 AND REFX(L,1)<=REF(L,DT2),DT2+1),NODRAW;FG31:=IF(GT2=0 AND REF(GT2,1)<DT2 AND H<REF(H,REF(GT2,1)+1),1,0),NODRAW;FD31:=IF(DT2=0 AND REF(DT2,1)<GT2 AND L>REF(L,REF(DT2,1)+1),1,0),NODRAW;GT3:=BARSLAST(GT2=0 AND FG3<>1 AND FG31<>1 ),NODRAW;DT3:=BARSLAST(DT2=0 AND FD3<>1 AND FD31<>1),NODRAW;FG4:=BACKSET(REFX(GT3,1)=0 AND GT3<DT3 AND REFX(H,1)>=REF(H,GT3),GT3+1),NODRAW;FD4:=BACKSET(REFX(DT3,1)=0 AND DT3<GT3 AND REFX(L,1)<=REF(L,DT3),DT3+1),NODRAW;FG41:=IF(GT3=0 AND REF(GT3,1)<DT3 AND H<REF(H,REF(GT3,1)+1),1,0),NODRAW;FD41:=IF(DT3=0 AND REF(DT3,1)<GT3 AND L>REF(L,REF(DT3,1)+1),1,0),NODRAW;HHH:=GT3=0 AND FG31<>1 AND FG3<>1,NODRAW;LLL:=DT3=0 AND FD31<>1 AND FD3<>1,NODRAW;DRAWLINE1(HHH ,H,LLL,L,0),COLORGREEN,LINETHICK3;//绿色DRAWLINE1(LLL,L,HHH ,H,0),COLORRED,LINETHICK3;//红色//最后一段画线N1:=BARSLAST(HHH)+1;N2:=BARSLAST(LLL)+1;DRAWLINE3(ISLASTBAR&&MIN(N1,N2)=N2&&L>REF(L,N2-1),REF(L,N2-1),N2-1,ISLASTBAR,H,0,0),COLORRED,LINETHICK3;//红色DRAWLINE3(ISLASTBAR&&MIN(N1,N2)=N1&&H<REF(H,N1-1),REF(H,N1-1),N1-1,ISLASTBAR,L,0,0),COLORGREEN,LINETHICK3;//绿色图片
PS:
1、模型中含有未来函数,仅用来看盘分析,不能以此作为依据进行程序化交易;
2、大家可以根据这些基本思路进行改编,结合平时的交易经验,形成自己的看盘思路。
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报。