指南针指标源码

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

指南针指标源码


dy_多空博弈
ssl:=ema(c,3);
ssl,colorgreen;
mm:ema((slope(c,22)*20+c),55),colorwhite;
stickline(ssl>mm,ssl,mm,1,0),colormagenta;
stickline(ssl<=mm,ssl,mm,1,0),colorgreen;
stickline(c>=o,c,o,8,0),colorred;
stickline(c>=o,h,l,0,0),colorred;
stickline(c<=o,c,o,8,0),colorgreen;
stickline(c<=o,h,l,0,0),colorgreen;

===================================
dy_辅成交量
mid:=(high+low+close)/3;
cr26:=sum(max(0,high-ref(mid,1)),26)/sum(max(0,ref(mid,1)-l),26)*100;
chiu:=sma(cr26,25,1);
chiu1:=ema(cr26,5);
chiu2:=ema(cr26,10);
chiu1,colorred;
chiu,coloryellow;
chiu2,colorwhite;
stickline(chiu1>0,chiu1,0,5,0),colorred;

===================================
dy_辅助判市
b53:=(ma(close,9)-ref(ma(close,9),1))/ref(ma(close,9),1)*100;
jx:=atan(b53)/3.1416*180;
dysmk1:=sma(jx,10,1);
dysmd1:=sma(dysmk1,5,1);
dysmd:dysmd1,colorgreen;
dysmk:dysmk1,coloryellow;
stickline(dysmk>dysmd,dysmk,dysmd,2,0),colorred;
stickline(dysmk<=dysmd,dysmk,dysmd,2,0),colorgreen;
20;
-20;

===================================
dy_神密波段
kav:=(2*close+high+low)/4;
ak:=ema((kav-llv(low,34))/(hhv(high,34)-llv(low,34))*100,34);
dd:=ema(0.667*ref(ak,1)+0.333*ak,5);
mk:=ema((kav-llv(low,34))/(hhv(high,34)-llv(low,34))*100,5);
nk:=ema(mk,5);
nk,colorgreen;
dd,colorwhite;
ak,coloryellow;
stickline(mk>nk,mk,nk,5,0),colorred;
stickline(mk<=nk,mk,nk,5,0),colorgreen;
13;
35;
79;

===================================
z出手就赢
dy11:=(2*close+high+low)/4;
dy22:=llv(low,34);
dy33:=hhv(high,34);
a11:=ema((dy11-dy22)/(dy33-dy22)*100,9);
b11:=ema((0.667*ref(a11,1)+0.333*a11),2);
dya:=ema((dy11-dy22)/(dy33-dy22)*100,30);
dyb:=ema(dya,5);
stickline(dyb>=a11,dyb,a11,6,0),coloryellow;
stickline(dyb>=a11,b11,dya,0,0),coloryellow;
stickline(dyb<=a11,dyb,a11,6,0),colorred;
stickline(dyb<=a11,b11,dya,0,0),colorred;

===================================
z飞越巅峰
生命线:0,colorwhite;
散户:=sma((((hhv(h,9)-c)/(hhv(h,9)-llv(l,9))*200)-125),9,1);
a:=((c-llv(l,9))/(hhv(h,9)-llv(l,9))*200)-105;
b:=sma(a,3,1);
主力:sma(b,3,1),coloryellow;

===================================
z海底捕金
var1:=amount/vol/100;
var2:=(3*high+low+open+2*close)/7;
var3:=sum(amount,5)/var1/100;
dcyc:=dma(var2,(-1)*vol/var3);
上天揽月:(close-dcyc)/dcyc*100,coloryellow;
下海捉鳖:(1-winner(c))*100,color339933;

===================================
z

金山银山(主图叠加)
diff:=ema(close,12)-ema(close,26);
dea:=ema(diff,9);
ma(c,8),colorwhite;
ma(c,21),coloryellow;
多头:stickline(diff>dea,c,o,8,0),colorred;
stickline(diff>dea,h,l,0,0),colorred;
空头:stickline(diff<=dea,c,o,8,0),colorcyan;
stickline(diff<=dea,h,l,0,0),colorcyan;
drawtext(cross(diff,dea),l-0.2,'买入'),colorwhite;
drawtext(cross(dea,diff),h+0.2,'卖出'),colorgreen;

===================================
z战无不胜
危机线:85,colorred;
中间线:50,colorwhite;
安全线:15,colorgreen;
v1:=(2*close+high+low)/4;
v2:=llv(low,34);
va:=hhv(high,34);
防线b:=ema((v1-v2)/(va-v2)*100,13);
防线bb:=ema((0.667*ref(防线b,1)+0.333*防线b),2);
战术线:防线b,coloryellow,pointdot;
战略线:ema(0.382*ref(防线b,2)+0.618*防线b,12),coloryellow;
stickline(防线b>防线bb,防线b,防线bb,6,0),colorred;
stickline(防线b<=防线bb,防线b,防线bb,6,0),colorcyan;

===================================
z走向辉煌
var1:=amount/vol/100;
var2:=(3*high+low+open+2*close)/7;
var3:=sum(amount,3)/var1/100;
var4:=sum(amount,10)/var1/100;
cyc3:=dma(var2,vol/var3);
cyc10:=dma(var2,vol/var4);
cyc10,coloryellow;
stickline(cyc3>cyc10,cyc3,cyc10,6,0),colorred;
stickline(cyc3<=cyc10,cyc3,cyc10,6,0),colorgreen;

===================================
F全盘穿越
套牢盘:100*(1-WINNER(C)),colorgreen;
vr1:=BARSLAST(cross(90,套牢盘));
穿越天数:vr1,,LINETHICK0;
drawicon(cross(10,套牢盘),6,12),;
a1:=sum(VOL,13)/CAPITAL;
cyf:100-(100/(1+a1)),colorred,linethick2;
a2:=AMOUNT/(100*vol);
中线成本均线:=ma(a2,13);
cys:100*(c-中线成本均线)/中线成本均线+50,coloryellow,;
stickline(cys>50,50,cys,4,0),coloryellow,;
stickline(cys<50,50,cys,4,0),colorf0f000,;
10,colorccff66;
20,colorwhite;
90,colorccff66;

===================================
0amv原码
Var1:=移动平均(成交额,10,1)/1000000;
Var2:=向前引用(Var1,1);
Var3:=简单移动平均(向前引用(收盘价,1),5);
收盘:Var1*收盘价/Var3*1/10,COLOR009900,LINETHICK0,点状线;
开盘:Var1*开盘价/Var3*1/10,点状线,COLOR009900,LINETHICK0;
最高:Var1*最高价/Var3*1/10,点状线,COLOR009900,LINETHICK0;
最低:Var1*最低价/Var3*1/10,点状线,COLOR009900,LINETHICK0;
生命线:指数平滑移动平均(收盘,12),COLORCYAN;
昨收盘:=向前引用(收盘,1),点状线,COLOR009900,LINETHICK0;
涨跌:=(收盘-向前引用(收盘,1))/向前引用(收盘,1)*100,点状线,COLOR009900,LINETHICK0;
画柱线(收盘>开盘,收盘,开盘,5,0),COLORRED;
画柱线(收盘>开盘,最高,最大值(收盘,开盘),0,1),COLORRED;
画柱线(收盘>开盘,最小值(收

盘,开盘),最低,0,1),COLORRED;
画柱线(收盘<开盘,收盘,开盘,5,0),COLORGREEN;
画柱线(收盘<开盘,最高,最大值(收盘,开盘),0,1),COLORGREEN;
画柱线(收盘<开盘,最小值(收盘,开盘),最低,0,1),COLORGREEN;

[ Last edited by 理想财神 on 2005-5-7 at 22:02 ]


[指南针] 陆续推出28个指南针源码指标
1、BB BAND
布林线宽
n=30
Var1:=MA(CLOSE,N);
Var2:=Var1+2*STD(CLOSE,N);
变盘: 5, POINTDOT;
布林宽度: (Var2-Var1)/Var1*100;
警戒: 30, POINTDOT;





2、CBW
成本带宽
n1=97.5,n2=2.5
CBW: 100*(COST(N1)-COST(N2))/COST(N1);



3、CBXQD
成本均线强度
n=4,n1=5,n2=13,n3=34
Var1:=AMOUNT/(100*VOL);
Var2:=MA(Var1,N1);
Var3:=MA(Var1,N2);
Var4:=MA(Var1,N3);
Var5:=DMA(CLOSE,VOL/CAPITAL);
CYR5: 100*(Var2-REF(Var2,N))/REF(Var2,N);
CYR13: 100*(Var3-REF(Var3,N))/REF(Var3,N);
CYR34: 100*(Var4-REF(Var4,N))/REF(Var4,N);
CYR无穷: 100*(Var5-REF(Var5,N))/REF(Var5,1);

4、CKD
相对价位
Var1:=AMOUNT/(100*VOL);
Var2:=MA(Var1,13);
Var3:=DMA(Var1,VOL/CAPITAL);
CKDP: 100*(Var2-COST(0))/(COST(100)-COST(0));
CKDW: 100*(Var3-COST(0))/(COST(100)-COST(0));

5、CMACD
CMACD指标
n1=5,n2=13
Var1:=AMOUNT/(100*VOL);
Var2:=MA(Var1,N1);
Var3:=MA(Var1,N2);
CMACD: 100*(Var2-Var3)/Var3, COLORSTICK;
----------------------------------------------------------------
6、CYB
优化布林线
n=20
MB: MA(CLOSE,N);
上轨: MB+STD(CLOSE,N);
下轨: MB-STD(CLOSE,N);
上极限: MB+2*STD(CLOSE,N);
下极限: MB-2*STD(CLOSE,N);
STICKLINE(open>=close ,close ,open,9,0 ),COLORaaaaaa;
STICKLINE(open>=close ,close ,open,6,0 ),COLORbbbbbb;
STICKLINE(open>=close ,close ,open,2.4,0 ),COLORcccccc;
STICKLINE(open>=close ,close ,open,1.1,0 ),COLORdddddd;

STICKLINE(close>open,close,open,9,0 ),COLOr6666cc;
STICKLINE(close>open,close,open,6 ,0 ),COLOR7777dd;
STICKLINE(close>open,close,open,2.4 ,0 ),COLOR8888ee;
STICKLINE(close>open,close,open,1.1 ,0 ),COLOR9999ff;

STICKLINE(close>open,open,low,0.5,0 ),COLOR1199ff;
STICKLINE(close>open,close,HIGH,0.5 ,0 ),COLOR1199ff;
STICKLINE(open>=close,close,low,0.5 ,0 ),COLORcccccc;
STICKLINE(open>=close,open,HIGH,0.5 ,0 ),COLORcccccc;
----------------------------------------------------------
7、CYC
成本均线
n1=5,n2=13,n3=34
Var1:=AMOUNT/(100*VOL);
短线成本均线: MA(Var1,N1);
中线成本均线: MA(Var1,N2);
长线成本均线: MA(Var1,N3);
无穷成本均线: DMA(CLOSE,VOL/CAPITAL);
STICKLINE(open>=close ,close ,open,9,0 ),COLORaaaaaa;
STICKLINE(open>=close ,close ,open,6,0 ),COLORbbbbbb;
STICKLINE(open>=close ,close ,open,2.4,0 ),COLORcccccc;
STICKLINE(open>=close ,close ,open,1.1,0 ),COLORdddddd;

STICKLINE(close>open,close,open,9,0 ),COLOr6666cc;
STICKLINE(close>open,close,open,6 ,0 ),COLOR7777dd;
STICKLINE(close>open,close,open,2.4 ,0 ),COLOR8888ee;
STICKLINE(close>open,close,open,1.1 ,0 ),COLOR9999ff;

STICKLINE(close>open,open,low,0.5,0 ),COLOR1199ff;
STICKLINE(close>open,close

,HIGH,0.5 ,0 ),COLOR1199ff;
STICKLINE(open>=close,close,low,0.5 ,0 ),COLORcccccc;
STICKLINE(open>=close,open,HIGH,0.5 ,0 ),COLORcccccc;
----------------------------------------------------------------
8、CYC2
成本均线
p1=5,p2=13,p3=34
CYC1:0.01*EMA(AMOUNT,P1)/EMA(VOL,P1);
CYC2:0.01*EMA(AMOUNT,P2)/EMA(VOL,P2);
CYC3:0.01*EMA(AMOUNT,P3)/EMA(VOL,P3);
CYC∞:DMA(AMOUNT/(100*VOL),VOL/(100*FINANCE(7)));
-----------------------------------------------------------------
9、CYD
承接因子
n=21
CYDS:WINNER(CLOSE)/(VOL/CAPITAL);
CYDN:WINNER(CLOSE)/MA(VOL/CAPITAL,N);
-----------------------------------------------------------------
10、CYD2
承接因子
A:=WINNER(CLOSE )*CAPITAL;
承接因子:A/VOL;
333、CYDD
指南针动态承接因子
Var1:=WINNER(CLOSE);
Var2:=DMA(Var1,VOL/CAPITAL);
Var3:=DMA(VOL,VOL/CAPITAL)/CAPITAL;
CYDD: Var1/Var3;
CYDD1: Var2/Var3;
1, POINTDOT;
-----------------------------------------------------------------
11、CYE
市场趋势
MAL:=MA(CLOSE,5);
MAS:=MA(MA(CLOSE,20),5);
CYEL:(MAL-REF(MAL,1))/REF(MAL,1)*100;
CYES:(MAS-REF(MAS,1))/REF(MAS,1)*100;
-------------------------------------------------------------------
12、CYF
市场能量
n=21
HSL:=VOL/CAPITAL*100;
CYF:100-100/(1+EMA(HSL,N)*100);
---------------------------------------------------------------------
13、CYOBV
优化累积能量线
n=34
NOBV1: SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE--------------------------------------------------------------------------------
14、CYQKL
博弈K线长度
100*(WINNER(CLOSE)-WINNER(OPEN)), COLORSTICK;
-------------------------------------------------------------------------------
15、CYR
市场强弱
n=13,m=5
DIVE:=0.01*EMA(AMOUNT,N)/EMA(VOL,N);
CYR:(DIVE/REF(DIVE,1)-1)*100;
MACYR:MA(CYR,M);
-------------------------------------------------------------------------------
16、CYS
市场盈亏指标
n1=5,n2=13,n3=34
Var1:=AMOUNT/(100*VOL);
Var2:=MA(Var1,N1);
Var3:=MA(Var1,N2);
Var4:=MA(Var1,N3);
Var5:=DMA(CLOSE,VOL/CAPITAL);
CYS5: 100*(CLOSE-Var2)/Var2;
CYS13: 100*(CLOSE-Var3)/Var3;
CYS34: 100*(CLOSE-Var4)/Var4;
CYS无穷: 100*(CLOSE-Var5)/Var5;
----------------------------------------------------------------------------
17、CYS2
市场盈亏
CYC13:=0.01*EMA(AMOUNT,13)/EMA(VOL,13);
CYS:(CLOSE-CYC13)/CYC13*100;
----------------------------------------------------------------------------
18、CYS-YJJ
市场盈亏
p1=4,p2=5
VAR2:=VOL*CLOSE;
VAR3:=EMA(VAR2,13)/EMA(VOL,13);
CYS: (EMA(CLOSE,P1)-VAR3)/VAR3*100;
ML: EMA(CYS,P2);
LO: 0, POINTDOT;
----------------------------------------------------------------------------
19、CYW
主力控盘
VAR1:=CLOSE-LOW;
VAR2:=HIGH-LOW;
VAR3:=CLOSE-HIGH;
VAR4:=IF(CLOSE>=0,(VAR1/VAR2+VAR3/VAR2)*VOL,(VAR3/VAR2+VAR1/VAR2)*VOL);
CYW: SUM(VAR4,10)/10000, COLORSTICK;
------------------------------------------------------------------------------
20、CYW-YJJ
主力控盘
p1=16

,p2=8,p3=45
VAR1:=1;
VAR2:=CLOSE-REF(CLOSE,1);
VAR3:=IF(CLOSE-REF(CLOSE,1)>=0,VAR2,0);
VAR4:=REF(CLOSE,1)-CLOSE;
VAR5:=IF(CLOSE-REF(CLOSE,1)<=0,VAR4,0);
VAR6:=SUM(VAR3,P1)/SUM(VAR5,P1);
VAR7:=100-100/(1+VAR6);
VAR8:=EMA(VAR7,P1);
VAR9:=EMA(VAR8,P2);
VARA:=EMA(VAR8,P3);
MO: (VAR8-VARA)*VAR1;
ML: (VAR9-VARA)*VAR1;
MODE: MO*VAR1, COLORSTICK;
---------------------------------------------------------------------------------
21、DKBL
成本多空布林线
n=10,p=3
Var1:=AMOUNT/(100*VOL);
Var2:=MA(Var1,3);
Var3:=MA(Var1,6);
Var4:=MA(Var1,12);
Var5:=MA(Var1,24);
BBI: (Var2+Var3+Var4+Var5)/4;
UPR: BBI+P*STD(BBI,N);
DWN: BBI-P*STD(BBI,N);
STICKLINE(open>=close ,close ,open,9,0 ),COLORaaaaaa;
STICKLINE(open>=close ,close ,open,6,0 ),COLORbbbbbb;
STICKLINE(open>=close ,close ,open,2.4,0 ),COLORcccccc;
STICKLINE(open>=close ,close ,open,1.1,0 ),COLORdddddd;

STICKLINE(close>open,close,open,9,0 ),COLOr6666cc;
STICKLINE(close>open,close,open,6 ,0 ),COLOR7777dd;
STICKLINE(close>open,close,open,2.4 ,0 ),COLOR8888ee;
STICKLINE(close>open,close,open,1.1 ,0 ),COLOR9999ff;

STICKLINE(close>open,open,low,0.5,0 ),COLOR1199ff;
STICKLINE(close>open,close,HIGH,0.5 ,0 ),COLOR1199ff;
STICKLINE(open>=close,close,low,0.5 ,0 ),COLORcccccc;
STICKLINE(open>=close,open,HIGH,0.5 ,0 ),COLORcccccc;
-------------------------------------------------------------------
22、JBCYS
CYS越低的股涨得越好。
JBCYF: MA(CLOSE,13)*(CLOSE-MA(CLOSE,13));
-------------------------------------------------------------------
23、MYP
指南针年最大收益指标
Var1:=LLV(HIGH,240);
MYP: 100*(CLOSE-Var1)/Var1;
-------------------------------------------------------------------
24、PAS1
筹码穿透率
Var1:=100*VOL/CAPITAL;
Var2:=100*(WINNER(CLOSE)-REF(WINNER(CLOSE),1));
筹码穿透率: Var2/Var1, VOLSTICK;
-------------------------------------------------------------------
348、P-CBY
博弈均线
博弈均线: MA(WINNER(CLOSE)*100,3);
Var1:=COST(0);
Var2:=COST(5);
Var3:=COST(45);
Var4:=COST(55);
Var5:=COST(95);
Var6:=COST(100);
底部线: (Var4-Var3)*100/(Var6-Var1);
牛熊线: (Var5-Var2)*100/(Var6-Var1);
---------------------------------------------------------------------
25、RPY
年相对价位
n=240
Var1:=REF(HHV(CLOSE,N),1);
Var2:=REF(LLV(CLOSE,N),1);
100*(CLOSE-Var2)/(Var1-Var2);
------------------------------------------------------------------------
26、RPY2
两年相对价位
Var1:=REF(HHV(CLOSE,480),1);
Var2:=REF(LLV(CLOSE,480),1);
100*(CLOSE-Var2)/(Var1-Var2);
-------------------------------------------------------------------------
27、SDR
锁定筹码
Var1:=1.1*CLOSE;
Var2:=0.9*CLOSE;
Var3:=100*(WINNER(Var1)-WINNER(Var2));
锁定筹码: 100-Var3;
-------------------------------------------------------------------------
28、博奕K线
Var1:=MA(WINNER(CLOSE)*100,3);
底部线: (COST(55)-COST(45))*100/(COST(97)-COST(3));
牛熊线: (COST(65)-COST(35))*100/(COST(97)-COST(3))

,COLORRED;
压力线: (COST(95)-COST(5))*100/(COST(97)-COST(3));
STICKLINE(WINNER(CLOSE)*100>=WINNER(OPEN)*100,WINNER(OPEN)*100,WINNER(CLOSE)*100,5,1),COLORRED;
STICKLINE(WINNER(OPEN)*100>WINNER(CLOSE)*100,WINNER(CLOSE)*100,WINNER(OPEN)*100,5,0),COLORGREEN;
STICKLINE(WINNER(CLOSE)*100>=WINNER(OPEN)*100,WINNER(CLOSE)*100,WINNER(HIGH)*100,0.5,1),COLORRED;
STICKLINE(WINNER(CLOSE)*100>=WINNER(OPEN)*100,WINNER(OPEN)*100,WINNER(LOW)*100,0.5,1),COLORRED;
STICKLINE(WINNER(OPEN)*100>WINNER(CLOSE)*100,WINNER(CLOSE)*100,WINNER(LOW)*100,0.5,0),COLORGREEN;
STICKLINE(WINNER(OPEN)*100>WINNER(CLOSE)*100,WINNER(OPEN)*100,WINNER(HIGH)*100,0.5,0),COLORGREEN;
DRAWTEXT(CLOSE/OPEN>88,LOW,'');
博奕柱线
ABS(WINNER(CLOSE)-WINNER(OPEN))*100, VOLSTICK;




相关文档
最新文档