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);
【本文仅提供源码,并无公式下载,如需公式,请参照下面公式编辑录像自行编辑成公式】 |