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

全套混沌操作法公式、源码[通达信公式]

相关标签:

 


分形图:

 

原理解析:


 

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

源码:

 


Var1:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);
Var2:=CROSS(Var1,0.9);
Var3:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);
Var4:=CROSS(Var3,0.9);
STICKLINE(Var2,HIGH,HIGH*1.01,5,0),Color00E40E;
STICKLINE(Var4,LOW,LOW*0.99,5,0),Color00E40E;
Var5:=IF(Var2,HIGH,IF(Var4,LOW,0));
POLYLINE(Var5,Var5),Colorff00ff;
Var6:=BACKSET(REF(HIGH,2)=HHV(HIGH,5) AND LOW<REF(LOW,1) AND HIGH<REF(HIGH,1),3);
Var7:=BACKSET(REF(HIGH,2)=HHV(HIGH,5) AND LOW>REF(LOW,1) AND HIGH>REF(HIGH,1),3);
Var8:=BACKSET(REF(HIGH,2)=HHV(HIGH,5) AND HIGH<REF(HIGH,1) AND LOW>REF(LOW,1)
AND REF(LOW,1)>REF(LOW,2) AND REF(HIGH,1)<REF(HIGH,2),3);
Var9:=BACKSET(REF(LOW,2)=LLV(LOW,5) AND LOW>REF(LOW,1) AND HIGH>REF(HIGH,1),3);
VarA:=BACKSET(REF(LOW,2)=LLV(LOW,5) AND LOW<REF(LOW,1) AND HIGH<REF(HIGH,1),3);
VarB:=BACKSET(REF(LOW,2)=LLV(LOW,5) AND HIGH<REF(HIGH,1) AND LOW>REF(LOW,1)
AND REF(LOW,1)>REF(LOW,2) AND REF(HIGH,1)<REF(HIGH,2),3);
坚定: STICKLINE(CROSS(Var6,0.9),HIGH,HIGH*1.01,5,0),Color0000FF;
STICKLINE(CROSS(Var9,0.9),LOW,LOW*0.99,5,0),Color0000FF;
犹豫: STICKLINE(CROSS(Var7,0.9),HIGH,HIGH*1.01,5,0),Color00E5E9;
STICKLINE(CROSS(VarA,0.9),LOW,LOW*0.99,5,0),Color00E5E9;
等待: STICKLINE(CROSS(Var8,0.9),HIGH,HIGH*1.01,5,0),ColorFF4100;
STICKLINE(CROSS(VarB,0.9),LOW,LOW*0.99,5,0),ColorFF4100;
压力: REF(HIGH,BARSLAST(Var2)), POINTDOT,ColorEA91B5;
STICKLINE(CLOSE,REF(HIGH,BARSLAST(Var2)),REF(HIGH,BARSLAST(Var2)),5,0),ColorEA91B5;
支撑: REF(LOW,BARSLAST(Var4)), POINTDOT,Color3791B5;
STICKLINE(CLOSE,REF(LOW,BARSLAST(Var4)),REF(LOW,BARSLAST(Var4)),5,0),Color3791B5;现价:CLOSE,POINTDOT,Color000F89;
MFI:参数名:N 14 2 300
TYP := (HIGH + LOW + CLOSE)/3;
SUM(IF(TYP>REF(TYP,1),TYP*VOL,0),N)/SUM(IF(TYP<REF(TYP,1),TYP*VOL,0),N)
5/34/5 MACD:
ma(c,5)-ma(c,34) COLORSTICK ;ma(ma(c,5)-ma(c,34),5);
s:=EMA((ma(c,5)-ma(c,34)),3);
s1:=s<ref(s,1)and s>0;
s2:=s<ref(s,1)and s<0;STICKLINE(s>=0,0,s,8,1),COLORRED;
STICKLINE(s1,0,s,5,0),COLOR00ffff;
STICKLINE(s2,0,s,4,0),COLORffffff;
四种视窗:
MFI:(H-L)*100000/V;
MA5:MA(MFI,5);
A1:MFI>=REF(MFI,1)*1.1 AND V>=REF(V,1)*1.1;
A2:MFI<=REF(MFI,1)*0.9 AND V<=REF(V,1)*0.9;
A3:MFI>=REF(MFI,1)*1.1 AND V<=REF(V,1)*0.9;
A4:MFI<=REF(MFI,1)*0.9 AND V>=REF(V,1)*1.1;
DRAWTEXT(A2,4,'衰退'),linethick3;
DRAWTEXT(A1,1,'绿灯'),linethick3;
DRAWTEXT(A3,3,'伪装'),linethick3;
DRAWTEXT(A4,2,'蛰伏'),linethick3;
0.1以下为《证券交易新空间》一书中的全部指标源码。鳄鱼线:
Var1:=(H+L)/2;
上唇:REF(SMA(Var1,5,1),3),COLORGREEN;
牙齿:REF(SMA(Var1,8,1),5),COLORRED;
下颚:REF(SMA(Var1,13,1),8),COLORBLUE;颚鱼分形:Var1:=(H+L)/2;
上唇:REF(SMA(Var1,5,1),3),COLORGREEN;
牙齿:REF(SMA(Var1,8,1),5),COLORRED;
下颚:REF(SMA(Var1,13,1),8),COLORBLUE;Var1:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);
Var2:=CROSS(Var1,0.9);
Var3:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);
Var4:=CROSS(Var3,0.9);
drawicon(Var2,HIGH*1.01,4),Color00E40E;
drawicon(Var4,LOW*0.99,5),Color00E40E;
Var5:=IF(Var2,HIGH,IF(Var4,LOW,0));
{POLYLINE(Var5,Var5),Colorff00ff;}
Var6:=BACKSET(REF(HIGH,2)=HHV(HIGH,5) AND LOW<REF(LOW,1) AND HIGH<REF(HIGH,1),3);
Var7:=BACKSET(REF(HIGH,2)=HHV(HIGH,5) AND LOW>REF(LOW,1) AND HIGH>REF(HIGH,1),3);
Var8:=BACKSET(REF(HIGH,2)=HHV(HIGH,5) AND HIGH<REF(HIGH,1) AND LOW>REF(LOW,1)
AND REF(LOW,1)>REF(LOW,2) AND REF(HIGH,1)<REF(HIGH,2),3);
Var9:=BACKSET(REF(LOW,2)=LLV(LOW,5) AND LOW>REF(LOW,1) AND HIGH>REF(HIGH,1),3);
VarA:=BACKSET(REF(LOW,2)=LLV(LOW,5) AND LOW<REF(LOW,1) AND HIGH<REF(HIGH,1),3);
VarB:=BACKSET(REF(LOW,2)=LLV(LOW,5) AND HIGH<REF(HIGH,1) AND LOW>REF(LOW,1)
AND REF(LOW,1)>REF(LOW,2) AND REF(HIGH,1)<REF(HIGH,2),3);上向分形: REF(HIGH,BARSLAST(Var2)), POINTDOT,ColorEA91B5;
STICKLINE(CLOSE,REF(HIGH,BARSLAST(Var2)),REF(HIGH,BARSLAST(Var2)),5,0),COLORMAGENTA;
向下分形: REF(LOW,BARSLAST(Var4)), POINTDOT,Color3791B5;
STICKLINE(CLOSE,REF(LOW,BARSLAST(Var4)),REF(LOW,BARSLAST(Var4)),5,0),COLORYELLOW;AO:
Var1:=(H+L)/2;
AO:SMA(Var1,5,1)-SMA(Var1,34,1),COLOR6699CC;
STICKLINE(AO>=REF(AO,1),0,AO,6,1),COLORRED;
STICKLINE(AO<=REF(AO,1),0,AO,6,1),COLORGREEN;
AO,COLOR000000;
AC:
Var1:=(H+L)/2;
AO:=SMA(Var1,5,1)-SMA(Var1,34,1);
AC:SMA((AO-SMA(AO,5,1)),5,1),COLOR6699CC;
STICKLINE(AC>=REF(AC,1),0,AC,6,1),COLORRED;
STICKLINE(AC<=REF(AC,1),0,AC,6,1),COLORGREEN;
AC,COLOR000000;区域:
Var1:=(H+L)/2;
AO:=SMA(Var1,5,1)-SMA(Var1,34,1);
AC:=SMA((AO-SMA(AO,5,1)),5,1);
AO>REF(AO,1) AND AC>REF(AC,1),COLORRED;
AO<REF(AO,1) AND AC<REF(AC,1),COLORGREEN;
AO>REF(AO,1) AND AC<REF(AC,1),COLORGRAY;
AO<REF(AO,1) AND AC>REF(AC,1),COLORGRAY;
OSC:
参数名:SHORT 5 1 999
LONG 35 1 999
MA1:=MA((HIGH+LOW)/2,SHORT);
MA2:=MA((HIGH+LOW)/2,LONG);
MA1-MA2,STICK,COLORgreen;OSCMACD:
参数名:LONG 35 1 999
SHORT 5 1 999
OSC: (MA(CLOSE,SHORT)-MA(CLOSE,LONG))/MA(CLOSE,SHORT)*100, COLORSTICK;
OSCMACD: MA(OSC,5);

 

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

 

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

怎么收费,代编流程等详情请点击查阅!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

 


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

相关文章

    没有相关内容