混沌交易之基本分形公式
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
混沌交易之基本分形公式
{基本分形}
VAR1:=CROSS(FILTER(BACKSET(REF(HIGH,2)=HHV(HIGH,5),3),2),0.5);{上分形信号}
VAR2:=CROSS(FILTER(BACKSET(REF(LOW,2)=LLV(LOW,5),3),2),0.5);{下分形信号}
VAR3:=BARSLAST(VAR1);
VAR4:=BARSLAST(VAR2);
前上分形最高价:IF(VAR3=0,HIGH,REF(HIGH,VAR3)),POINTDOT,LINETHICK4,COLOREA9185;{在上分形信号出现的位置画图标}
前下分形最低价:IF(VAR4=0,LOW,REF(LOW,VAR4)),POINTDOT,LINETHICK4,COLOR3791B5;{在下分形信号出现的位置画图标}
VAR5:=CROSS(HIGH,REF(HIGH,VAR3));{最高价破上分形信号}
VAR6:=CROSS(REF(LOW,VAR4),LOW);{最低价破下分形信号}
DRAWICON(VAR5,LOW,1);{在最高价破上分形信号的位置画图标}
DRAWICON(VAR6,HIGH,2);{在最低价破下分形信号的位置画图标};
置换移动平均线公式
ma1:ref(ma(c,3),3);
ma2:ref(ma(c,7),5);
ma3:ref(ma(c,25),5);
判断超买、超卖的非趋势摆动指标(实际就是不用百分比表示的7日的乖离率)公式
摆动值:(CLOSE-MA(CLOSE,7)),coloryellow;
中轴:0,colorwhite;
B:=(CLOSE-MA(CLOSE,7));
超买:(hhv(b,M)-0)*N/100,colorred;
超卖:(llv(b,M)-0)*N/100,colorgreen;
M,N是参数,M为取样天数,一般取60天,N是最大波动的百分比,可以按照资料介绍的60、70、80、90设置。
合并即涨
Var0:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;
Var3:=SMA(Var0,3,1);
Var1:=SMA(Var3,4,1)-10;
Var4:=(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))*100;
Var5:=SMA(Var4,3,1);
Var2:=SMA(Var5,4,1)-90;
STICKLINE(REF(Var1,1)
STICKLINE(REF(Var1,1)>Var1,Var1,REF(Var1,1),5,0),COLOR00ff00;
STICKLINE(REF(Var2,1)>Var2,Var2,REF(Var2,1),10,0),COLOR0000FF;
STICKLINE(REF(Var2,1)
一品操盘
{N:1,8,1;}
WR:=ABS(100-100*(HHV(HIGH,5)-CLOSE)/(HHV(HIGH,5)-LLV(LOW,5)));
IF(WR>0,WR,0),COLORYELLOW;
涨:CROSS(WR,50),POINTDOT,COLOR0000FF;
强:CROSS(WR,80),POINTDOT,COLORYELLOW;
回:CROSS(80,WR) AND WR>50,POINTDOT,COLORWHITE;
险:=COUNT(WR>60,7)>=5 AND WR>90;
跑:=COUNT(WR>60,7)>=5 AND CROSS(80,WR);
慌:WR<=10 AND WR>0,POINTDOT,COLOR00FF00;
绝:WR=0,POINTDOT,COLORFF6600;
买:REF(WR,1)<10 AND C>REF(C,1) AND C>O,POINTDOT,COLORWHITE;
攻:WR>=90 AND WR<100 OR (H=HHV(H,5) AND H/REF(C,1)>=1.05),POINTDOT,COLORFF00FF;
停:WR=100,POINTDOT,COLORRED;
优选:IF((涨 AND COUNT(WR<=10,6) AND REF(WR,1)>10)*100,100,50),COLORFF6666,LINETHICK2;
FLSZ:=V*N>REF(V,1) AND C>REF(C,1) AND C>O;
助涨:(涨 OR 强) AND FLSZ,POINTDOT,COLORFF00FF;
DRAWICON(优选=100,50,1);
{以下设置副图显示方式}
STICKLINE(WR>=50,50,WR,1,0),COLORWHITE;
STICKLINE(WR>=90 AND WR<100,100,95,4,0),COLORWHITE;
STICKLINE(WR=100,100,95,4,0),COLORFF00FF;
STICKLINE(WR<=10 AND WR>0,0,5,4,0),COLORWHITE;
STICKLINE(WR=0,0,5,4,0),COLORFF6600;
DRAWTEXT(涨,60,'涨'),COLOR0000FF;
DRAWTEXT(助涨,25,'▲'),COLORFF00FF;
DRAWTEXT(助涨,20,'‖'),CO
LORFF00FF;
DRAWTEXT(强,70,'强'),COLORYELLOW;
DRAWTEXT(回,50,'回'),COLORWHITE;
DRAWTEXT(险,100,'●'),COLOR0000FF;
DRAWTEXT(跑,100,'跑'),COLORFFFF00;
DRAWTEXT(慌,20,'慌'),COLOR00FF00;
DRAWTEXT(绝,20,'绝'),COLORWHITE;
DRAWTEXT(买,50,'买'),COLORWHITE;
DRAWTEXT(攻,50,'攻'),COLORFF00FF;
DRAWTEXT(停,85,'停'),COLOR0000FF;
50,COLORFFFF00,LINETHICK2;
10,COLOR00FF00;
90,COLOR00FF00;
顶底奇准
买:=MA(CLOSE,1);
卖:=(LOW+HIGH+CLOSE)/3;
奇:= MA(卖,5);
准:= HHV(奇,10);
急卖奇准:IF(HHV((买<准),5),50,10),COLORFF6699;
STICKLINE(急卖奇准=10,50,10,1,1),COLORFF6699;
短卖奇准:IF(HHV((买<准),10),50,20),COLORGREEN;
STICKLINE(短卖奇准=20,50,20,1,0),COLORGREEN;
TR:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW -
REF(CLOSE,1)))),5);
HD:=(HIGH - REF(HIGH,1));
LD:=(REF(LOW,1) - LOW);
DMP:=(SUM(IF(((HD > 0) AND (HD > LD)),HD,0),5) );
DMM:=SUM(IF(((LD > 0) AND (LD > HD)),LD,0),5);
神偷线:=(((DMP ) * 100) / TR);
辅助线:=((DMM * 100) / TR);
XXX:=(MA(((ABS((辅助线 - 神偷线)) / (辅助线 + 神偷线)) * 100),3));
奇准:= MA(卖,5);
买卖:=LLV(奇准,10);
底部关注:IF(((XXX > 88) AND (神偷线 < 5.8)),95,50),LINETHICK1,COLORYELLOW;
STICKLINE(底部关注=95,50,95,1.5,0),COLORYELLOW;
急买奇准:IF(LLV((买<买卖),5),75,50),COLORRED,LINETHICK1;
STICKLINE(急买奇准=75,50,75,1.5,0),COLORRED;
短买奇准:IF(LLV((买<买卖),10),85,50),COLORRED,LINETHICK1;
STICKLINE(短买奇准=85,50,85,1.5,0),COLORRED;
ADXR:=((XXX + REF(XXX,3)) / 2);
VAR1:=MA(LOW,1);
VAR2:=MA(HIGH,2);
VAR3:=MA(CLOSE,2);
VAR7:=REF(VAR3,1);
动向趋势线:XXX,LINETHICK2,COLORFFAA66;
底部提示
{★底部提示:副}
Var2:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
Var3:=SMA(SMA(Var2,3,1),3,1)/28.57;
Var4:=EMA(Var3,5);
Var5:=3*Var3-2*Var4;
AA:=CROSS(Var5,Var3) AND Var3<2.1 and c>o;
Var6:=(2*CLOSE+HIGH+LOW)/4;
Var7:=LLV(LOW,13);
Var8:=HHV(HIGH,13);
Var9:=EMA((Var6-Var7)/(Var8-Var7)*100,13);
VarA:=EMA(0.667*REF(Var9,1)+0.333*Var9,2);
多:Var9,COLORRED,POINTDOT;
空:EMA(0.382*REF(Var9,2)+0.618*Var9,12),COLORgreen;
STICKLINE(Var9>VarA,Var9,VarA,6,0),COLORred;
STICKLINE(Var9<=VarA,Var9,VarA,6,0),COLORFFCC66;
STICKLINE(AA,0,30,40,1),coloryellow;
STICKLINE(AA,16,29,38,0),colorred;
STICKLINE(AA,1,14,38,0),colorred;
STICKLINE(AA,15,15,40,1),coloryellow;
STICKLINE(AA,30,50,10,0),coloryellow;
STICKLINE(AA,53,55,10,1),colorred;
STICKLINE(AA,57,59,10,1),colorred;
STICKLINE(AA,61,63,10,1),colorred;
STICKLINE(AA,65,67,10,1),colorred;
STICKLINE(AA,69,75,12,0),colorffcccc;
DRAWTEXT(AA,85,'底'),coloryellow;
生命线
VAR1:=(C-LLV(L,13))/(HHV(H,13)-LLV(L,13))*100;
牛:SMA(VAR1,7,1);
VAR2:=SMA(牛,5,1);
熊:IF(CROSS(
牛,VAR2) AND CROSS(MA(C,5),MA(C,13) AND 牛>50),VAR2*2,VAR2);
VAR3:=EMA(C,8);
VAR4:=EMA(C,20);
STICKLINE(牛>VAR2,牛,熊,0,0);
STICKLINE(牛
VAR5:=10;
低吸区:IF(短线进出<=10,10,0);
买入:IF(CROSS(短线进出,VAR5),20,0);
VAR6:=(2*C+H+L+O)/5;
VAR7:=LLV(L,33); VAR8:=HHV(H,33);
目前位置:EMA((VAR6-VAR7)/(VAR8-VAR7)*100,5);
生命线:EMA(0.667*REF(目前位置,1)+0.333*目前位置,4),CIRCLEDOT;
VAR9:=IF(CROSS(生命线,目前位置) AND 目前位置>=77,77,89);
VARA:=IF(CROSS(目前位置,20) OR CROSS(目前位置,生命线) AND 目前位置>20,20,5);
卖出区:VAR9;
VARB:=LLV(L,55);
VARC:=HHV(H,34);
VARD:=EMA((VAR6-VARB)/(VARC-VARB)*100,3);
VARE:=(目前位置+VARD)/2; VARF:=EMA(0.667*REF(VARD,1)+0.333*目前位置,2);
VAR10:=EMA(VARE,5);
VAR11:=EMA(0.667*REF(VAR10,1)+0.333*VAR10,2); 强弱:50,POINTDOT; 100,POINTDOT; 20;