斐睿 / 指標 / 指南針指標公式源碼

0 0

   

指南針指標公式源碼

2018-06-10  斐睿

  做股票的朋友都會接觸到一些指標,股市最精準指標是那個呢?當然答案病不確定,有一種指南針指標在實戰中的作用是不可忽略的,那指南針指標公式源碼是怎樣的?今天贏家江恩的主編老師就來詳細的講解。

  【全套指南針指標公式源碼】

  BB BAND

  指南針布林線寬指標

  n=30

  Var1:=MA(CLOSE,N);

  Var2:=Var1+2*STD(CLOSE,N);

  變盤: 5, POINTDOT;

  布林寬度: (Var2-Var1)/Var1*100;

  警戒: 30, POINTDOT;

  CBW

  指南針成本帶寬

  n1=97.5,n2=2.5

  CBW: 100*(COST(N1)-COST(N2))/COST(N1);

  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);

  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));

  CMACD

  指南針CMACD指標

  n1=5,n2=13

  Var1:=AMOUNT/(100*VOL);

  Var2:=MA(Var1,N1);

  Var3:=MA(Var1,N2);

  CMACD: 100*(Var2-Var3)/Var3, COLORSTICK;

  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;

  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;

指南針CYC指標

  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)));

  CYD

  承接因子

  n=21

  CYDS:WINNER(CLOSE)/(VOL/CAPITAL);

  CYDN:WINNER(CLOSE)/MA(VOL/CAPITAL,N);

  CYD2

  承接因子

  A:=WINNER(CLOSE )*CAPITAL;

  承接因子:A/VOL;

  CYDD

  指南針動態承接因子

  Var1:=WINNER(CLOSE);

  Var2:=DMA(Var1,VOL/CAPITAL);

  Var3:=DMA(VOL,VOL/CAPITAL)/CAPITAL;

  CYDD: Var1/Var3;

  CYDD1: Var2/Var3;

  1, POINTDOT;

  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;

  CYF

  市場能量

  n=21

  HSL:=VOL/CAPITAL*100;

  CYF:100-100/(1+EMA(HSL,N)*100);

  CYOBV

  指南針優化累積能量線

  n=34

  NOBV1: SUM(IF(CLOSE|REF(CLOSE,1),VOL,IF(CLOSE CYQKL

  指南針博弈K線長度

  100*(WINNER(CLOSE)-WINNER(OPEN)), COLORSTICK;

  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);

  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;

  CYS2

  市場盈虧

  CYC13:=0.01*EMA(AMOUNT,13)/EMA(VOL,13);

  CYS:(CLOSE-CYC13)/CYC13*100;

  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;

  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;

  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;

  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;

  JBCYS

  CYS越低的股漲得越好。

  JBCYF: MA(CLOSE,13)*(CLOSE-MA(CLOSE,13));

  MYP

  指南針年最大收益指標

  Var1:=LLV(HIGH,240);

  MYP: 100*(CLOSE-Var1)/Var1;

  PAS1

  指南針籌碼穿透率

  Var1:=100*VOL/CAPITAL;

  Var2:=100*(WINNER(CLOSE)-REF(WINNER(CLOSE),1));

  籌碼穿透率: Var2/Var1, VOLSTICK;

  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);

  RPY

  指南針年相對價位

  n=240

  Var1:=REF(HHV(CLOSE,N),1);

  Var2:=REF(LLV(CLOSE,N),1);

  100*(CLOSE-Var2)/(Var1-Var2);

  RPY2

  指南針兩年相對價位

  Var1:=REF(HHV(CLOSE,480),1);

  Var2:=REF(LLV(CLOSE,480),1);

  100*(CLOSE-Var2)/(Var1-Var2);

  SDR

  指南針鎖定籌碼

  Var1:=1.1*CLOSE;

  Var2:=0.9*CLOSE;

  Var3:=100*(WINNER(Var1)-WINNER(Var2));

  鎖定籌碼: 100-Var3;

  博奕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;

  【指南針CI個性指標實戰】

國金證券走勢圖

  上圖是國金證券的一段走勢圖:在4月9日個性指標創出新高,但股價并無創出新高,出現背離。后期股價順應個性指標走勢創出新高后連續上攻。

  指南針CI指標的特性就是把股票走勢強于大盤或弱于大盤的概念指標化,CI在設計上把股價運動中與大盤走勢相同的部分過濾掉,只留下每只股票走勢中獨立于大盤的部分。如果把大盤走勢看作是反映了所有股票的共性,那么減去大盤走勢后留下的就是每只股票的個性,所以稱之為個性指標。

  指南針指標非常多,這里就僅僅列舉出其中的個性指標給大家提供學習思路,如若您想要學習更多技術指標請關注本欄目的更新,如若想要學習rsi指標相關知識點可點擊進入,最后預祝大家投資愉快。




CBAND——指南針布林線寬指標

Var1:=MA(CLOSE,N);
Var2:=Var1+2*STD(CLOSE,N);
變盤: 5, POINTDOT;
布林寬度: (Var2-Var1)/Var1*100;
警戒: 30, POINTDOT;

{N 30 5 100} 

CBW——指南針成本帶寬

CBW: 100*(COST(N1)-COST(N2))/COST(N1);

{N1 97.5 0 100   N2 2.5 0 100} 

CBXQD——指南針成本均線強度

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);


{N 4 N1 5 N2 13 N3 34} 

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)); 

CMACD——指南針CMACD指標

Var1:=AMOUNT/(100*VOL);
Var2:=MA(Var1,N1);
Var3:=MA(Var1,N2);
CMACD: 100*(Var2-Var3)/Var3, COLORSTICK;

{N1 5   N2 13} 

CYB——指南針優化布林線

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 ),COLOR;

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; 

CYC1——指南針成本均線

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 ),COLOR;

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;


{N1 5   N2   13   N3 34} 

CYC2——指南針成本均線

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∞MA(AMOUNT/(100*VOL),VOL/(100*FINANCE(7)));


{P1 5   P2 13 P3 34] 

CYD——指南針承接因子

CYDS:WINNER(CLOSE)/(VOL/CAPITAL);
CYDN:WINNER(CLOSE)/MA(VOL/CAPITAL,N);


{年 21} 

CYD2——指南針承接因子

A:=WINNER(CLOSE )*CAPITAL;
承接因子:A/VOL; 

CYDD——指南針動態承接因子

Var1:=WINNER(CLOSE);
Var2:=DMA(Var1,VOL/CAPITAL);
Var3:=DMA(VOL,VOL/CAPITAL)/CAPITAL;
CYDD: Var1/Var3;
CYDD1: Var2/Var3;
1, POINTDOT; 

CYE——指南針市場趨勢

MAL:=MA(CLOSE,5);
MAS:=MA(MA(CLOSE,20),5);
CYELMAL-REF(MAL,1))/REF(MAL,1)*100;
CYESMAS-REF(MAS,1))/REF(MAS,1)*100; 

CYF——指南針市場能量

HSL:=VOL/CAPITAL*100;
CYF:100-100/(1+EMA(HSL,N)*100);

{N   21} 

CYOBV——指南針優化累積能量線

NOBV1: SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),0-VOL,0)),N)/CAPITAL;

{N   34} 

CYQKL——指南針博弈K線長度

100*(WINNER(CLOSE)-WINNER(OPEN)), COLORSTICK; 

CYR——指南針市場強弱

DIVE:=0.01*EMA(AMOUNT,N)/EMA(VOL,N);
CYRDIVE/REF(DIVE,1)-1)*100;
MACYR:MA(CYR,M);


{N 13   M 5} 

CYS——指南針盈虧指標

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;



{N1 5   N2   13   N3 34} 

CYW-YJJ——主力控盤

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;


{P1 16   P2 8   P3   45} 

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;

    本站是提供個人知識管理的網絡存儲空間,所有內容均由用戶發布,不代表本站觀點。如發現有害或侵權內容,請點擊這里 或 撥打24小時舉報電話:4000070609 與我們聯系。

    來自: 斐睿 > 《指標》

    猜你喜歡

    0條評論

    發表

    請遵守用戶 評論公約

    類似文章 更多
    喜歡該文的人也喜歡 更多

    2016年排五走势图