(1条消息) 麟龙指标通达信指标公式源码

麟龙撞击交易指标套

撞击交易包括三个指标

BOLL-M 布林线-传统版(系统) 主图指标(这个指标是通达信系统自带指标)这里就不发出来,自己调用。

中期方向线(跟指标套一的中期方向线有点不一样)副图指标。

决策曲线 副图指标

另外加发一个麟龙特色主图指标和两个附图(量能饱和度 ,四量决策)

特定均线 主图。

特定均线

EXP1:EMA(C,5),COLORWHITE;

EXP2:EMA(C,8),COLORGREEN;

EXP3:EMA(C,13),COLOR000599;

EXP4:EMA(C,17),COLORYELLOW;

EXP5:EMA(C,34),COLOR0000EE;

EXP6:EMA(C,50),COLORMAGENTA;

EXP7:EMA(C,365),COLORBLUE;

STICKLINE(CLOSE>=O ,H,L-0.008,0,0),COLOR0030FF;

STICKLINE(CLOSE>=O ,C,O,2.5,0),COLOR0030FF;

STICKLINE(CLOSE>=O ,C,O,2,0),COLOR0030FF;

STICKLINE(CLOSE>=O ,C,O,1,0),COLOR0030FF;

STICKLINE(CLOSE>=O ,C,O,0,0),COLOR0030FF;

STICKLINE(CLOSE

STICKLINE(O>C ,C,O,2.5,0 ),COLORGREEN;

STICKLINE(O>C ,C,O,2,0 ),COLORGREEN;

STICKLINE(O>C ,C,O,1,0 ),COLORGREEN;

STICKLINE(O>C,C,O,0,0) ,COLORGREEN;

J:=CROSS(C,EXP1);

J1:=CROSS(EXP1,C);

中期方向线

时间:DATE+1900/00/00,NODRAW ,COLORWHITE;

DIFF:=EMA(CLOSE,30)-EMA(CLOSE,120);

DEA:=EMA(DIFF,12);

A1:=DIFF>DEA;

中期方向线:DIFF-DEA,LINETHICK0;

DRAWBAND(中期方向线,RGB(160,0,0),0,RGB(0,130,0));

MB:=EMA(中期方向线,20);

超买线:MB+1.96*STD(中期方向线,9),COLORYELLOW;

超卖线:MB-1.96*STD(中期方向线,9),COLORCYAN;

决策曲线

MA1:=MA(CLOSE,5);

MA2:=MA(CLOSE,10);

P01:=IF(MA1>MA2,1,IF(MA2>MA1,-1,0));

MA3:=MA(CLOSE,3);

MA4:=MA(CLOSE,5);

P02:=IF(MA3>MA4,1,IF(MA4>MA3,-1,0));

MA5:=MA(CLOSE,12);

MA6:=MA(CLOSE,50);

P03:=IF(MA5>MA6,1,IF(MA6>MA5,-1,0));

{KDJ}

RSV:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100;

K:=EMA(RSV,3);

D:=EMA(K,3);

P04:=IF(K>D,2,IF(D>K,-1,0));

{MACD}

DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);

DEA:=EMA(DIF,9);

MACD:=(DIF-DEA)*2;

P05:=IF(DIF>DEA,2,IF(DEA>DIF,-1,0));

{TRIX}

TR2:=EMA(EMA(EMA(CLOSE,12),12),12);

TRIX:=(TR2-REF(TR2,1))/REF(TR2,1)*100;

MATRIX:=MA(TRIX,9) ;

P06:=IF(TRIX>MATRIX,1,IF(MATRIX>TRIX,-1,0));

{DMI}

TR1:=EMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),7);

HD :=HIGH-REF(HIGH,1);

LD :=REF(LOW,1)-LOW;

DMP:=EMA(IF(HD>0 AND HD>LD,HD,0),7);

DMM:=EMA(IF(LD>0 AND LD>HD,LD,0),7);

PDI:= DMP*100/TR;

MDI:= DMM*100/TR;

ADX:= EMA(ABS(MDI-PDI)/(MDI+PDI)*100,7);

ADXR:=EMA(ADX,7);

P07:=IF(PDI>MDI AND ADX>PDI AND ADX>50,1,

IF(PDI>MDI AND ADX>50,-1,0));{9}

{RSI}

LC:=REF(CLOSE,1);

RSI1:=EMA(MAX(CLOSE-LC,0),5)/EMA(ABS(CLOSE-LC),5)*100;{10}

P08:=IF(RSI1>80,1,IF(RSI1<20,-1,0));{10}

{CCI}

TYP:=(HIGH+LOW+CLOSE)/3;

CCI:=(TYP-MA(TYP,8))/(0.015*AVEDEV(TYP,8));

P09:=IF(CCI>180,1,IF(CCI

{W%R}

WR1:=(CLOSE-LLV(LOW,6))/(HHV(HIGH,6)-LLV(LOW,6))*100;

P10:= IF(WR1>80,1,IF(WR1<20,-1,0));{13}

{OSC}

OSC:=100*(CLOSE-MA(CLOSE,20));

P11:=IF(OSC>0,1,IF(OSC<0,-1,0));{14}

{MTM}

MOM:=CLOSE-REF(CLOSE,7);

P12:=IF(MOM>0,1,IF(MOM<0,-1,0));{15}

{DPO}

DPO:=CLOSE-REF(MA(CLOSE,11),11/2+1);

P13:=IF(DPO>0,1,IF(DPO<0,-1,0));{16}

{布林线}

MB:=MA(CLOSE,12);

R:=(CLOSE-MB)*(CLOSE-MB);

X1:=MA(R,12);

X2:=SQRT(X1);

D1:=1;

UPPER:=MB+(D1*X2);

LOWER:=MB-(D1*X2);

P14:IF(C>UPPER,1,IF(CLOSE

{BRAR}

BR:=SUM(MAX(0,HIGH-REF(CLOSE,1)),14)/SUM(MAX(0,REF(CLOSE,1)-LOW),14)*100;

AR:=SUM(HIGH-OPEN,14)/SUM(OPEN-LOW,14)*100;

P15:=IF(BR>350 OR AR>180,1,IF(BR<45 OR AR<45,-1,0));{21}

{VR}

TH:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,0),14);

TL:=SUM(IF(CLOSE

TQ:=SUM(IF(CLOSE=REF(CLOSE,1),VOL,0),14);

VR:=0100*(TH*2+TQ)/(TL*2+TQ);

P16:=IF(VR>350,1,IF(VR<45,-1,0));{24}

{WVAD}

WVAD:=SUM((CLOSE-OPEN)/(HIGH-LOW)*VOL,6)/10000;

P17:=IF(WVAD>0,1,IF(WVAD<0,-1,0));{25}

{EMV}

VOLUME:=MA(VOL,4)/VOL;

MID1:=100*(HIGH+LOW-REF(HIGH+LOW,1))/(HIGH+LOW);

EMV:=MA(MID1*VOLUME*(HIGH-LOW)/MA(HIGH-LOW,4),4);

P18:=IF(EMV>0,1,IF(EMV<0,-1,0));{26}

{OBV}

VA:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);

OBV:=SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0);

MAOBV:=EMA(OBV,24);

P19:=IF(OBV>MAOBV,1,IF(OBV

{PVI}

PVI:= PVI,COLORWHITE;

MPVI:=EMA(PVI,24),COLORYELLOW;

P20:=IF(PVI>MPVI,1,IF(PVI

{NVI}

NVI:=NVI,COLORWHITE;

MNVI:=EMA(NVI,24),COLORYELLOW;

P21:=IF(NVI>MNVI,1,IF(NVI

{MASS}

MASS:=SUM(MA(HIGH-LOW,9)/MA(MA(HIGH-LOW,9),9),25);

MA7:=MA(CLOSE,9);

P22:=IF(MA7>REF(MA7,1) AND MASS>26.5,1,IF(MA7

{VHF}

NUM:=ABS(HHV(HIGH,15)-LLV(LOW,15));

DEN:=SUM(ABS(CLOSE-REF(CLOSE,1)),15);

VHF:=IF(DEN=0,0,NUM/DEN);

VHF1:=EMA(VHF,240);

P23:=IF(VHF>VHF1,1,IF(VHF

{PUCU}

PU:=MA(CLOSE,13);

CU:=MA(VOL,13);

PU1:=(PU-REF(PU,1))/REF(PU,1)*100;

CU1:=(CU-REF(CU,1))/REF(CU,1)*100;

逆时针曲线:=PU1+CU1;

P24:=IF(逆时针曲线>REF(逆时针曲线,1),1,IF(逆时针曲线

{ASI}

LC2:=REF(CLOSE,1);

AA:=ABS(HIGH-LC2);

BB:=ABS(LOW-LC2);

CC:=ABS(HIGH-REF(LOW,1));

DD:=ABS(LC2-REF(OPEN,1));

R2:=IF(AA>BB AND AA>CC,AA+BB/2+DD/4,IF(BB>CC AND BB>AA,BB+AA/2+DD/4,CC+DD/4));

X01:=(CLOSE-LC2+(CLOSE-OPEN)/2+LC2-REF(OPEN,1));

SI:=16*X01/R2*MAX(AA,BB);

ASI:=SUM(SI,0),COLORWHITE;

MASI:=MA(ASI,6),COLORYELLOW;

P25:=IF(CLOSE>LLV(CLOSE,13) AND ASI=LLV(ASI,13),-1,0);

{BIAS}

BIAS1 :=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;

P26:=IF(BIAS1>10,1,IF(BIAS1

{DKX}

MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;

DKX:=(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+

16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+

13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+

10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+

7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+

4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210;

MADKX:=MA(DKX,4);

P27:=IF(DKX>MADKX,2,IF(DKX

{PLJJ}

WY1001:=(2*CLOSE+HIGH+LOW)/4;

WY1002:=EMA(WY1001,4);

WY1003:=EMA(WY1002,4);

WY1004:=EMA(WY1003,4);

XYS0:=(WY1004-REF(WY1004,1))/REF(WY1004,1)*100;

PJGJ:=AMOUNT/VOL/100;

SSRYDJX:=MA(PJGJ,13);

SSRCJL:=EMA(VOL,13);

SSRCJE:=EMA(AMOUNT,13);

SSRCBJX:=SSRCJE/SSRCJL/100;

CYS13:=(CLOSE-SSRCBJX)/SSRCBJX*100;

XYSHSL:=EMA(VOL/CAPITAL*100,13);

ZZX:=0;

XYS1:=MA(XYS0,2);

XYS2:=MA(XYS0,1);

P28:=IF(XYS2>XYS1,1,IF(XYS2

JC: (48+P01+P02+P03+P04+P05+P06+P07+P08+P09+P10+P11+P12+P13+P14+P15+P16+

P17+P18+P19+P20+P21+P22+P23+P24+P25+P26+P27+P28),COLORWHITE;

MAJCQX:MA(JC,3),COLORYELLOW;

BOLL:=MA(JC,20);

UB:BOLL+2*STD(JC,20),COLORYELLOW;

LB:BOLL-2*STD(JC,20),COLORGREEN;

IF(JC<56,JC,JC),COLORWHITE,LINETHICK1;

IF(JC>56,JC,JC),COLORRED,LINETHICK1;

IF(JC<56,JC,56),COLORWHITE,LINETHICK1;

IF(JC>56,56,56),COLORRED,LINETHICK1;

STICKLINE(C>0,36,36,10,0),COLOR808000;

STICKLINE(C>0,56,56,10,0),COLOR808000;

STICKLINE(C>0,71,71,10,0),COLOR808000;

STICKLINE(C>0,44,44,10,0),COLOR808000;

量能饱和度N1:=4;

N2:=8;

N3:=16;

M:=6;

N:=34;

HH:=MAX(HIGH,REF(CLOSE,1));

LL:=MIN(LOW,REF(CLOSE,1));

AA:=SUM(CLOSE-LL,N1)/SUM(HH-LL,N1);

BB:=SUM(CLOSE-LL,N2)/SUM(HH-LL,N2);

CC:=SUM(CLOSE-LL,N3)/SUM(HH-LL,N3);

B:(AA/N1+BB/N2+CC/N3)*N1*N2*N3/(N1*N2+N2*N3+N1*N3)*100,COLORRED,LINETHICK2;

S:EMA(B,M),COLORCYAN,LINETHICK2;

SAT:=(AMOUNT/C)/(HHV(AMOUNT,N)/HHV(C,N));

饱和度:IF(SAT>1,1,SAT)*100;

量能≤5:STICKLINE(饱和度<5,0,5,4,0),COLORYELLOW;

量能5~80:STICKLINE(饱和度>5 AND 饱和度<80,0,80,4,0),COLORYELLOW;

量能80~97:STICKLINE(饱和度>80 AND 饱和度<98,0,97,4,0),COLORYELLOW;

量能≥97:STICKLINE(饱和度>=97,5,饱和度,4,0),COLORYELLOW;

{IF BARSTATUS=2 AND (饱和度) THEN BEGIN DRAWTEXTREL(0,100,"饱和度:"+NUMTOSTRN(饱和度,2)),LINETHICK6,COLORCCFFCC;END;

DIFF : (EMA(CLOSE,9) - EMA(CLOSE,17))*50,COLORRED;};

四量决策副图

M3:=MA(CLOSE,3),COLORRED;

M13:=MA(CLOSE,13),COLORRED;

M34:=MA(CLOSE,34),COLORRED;

X:=BARSLAST(REF(CROSS(C,MA(C,120)),1)) AND CROSS(MA(C,20),MA(C,120));

STICKLINE(M3>=M13 AND M34>=REF(M34,1),8,9,1,1 ),COLORRED;

STICKLINE(M3=REF(M34,1),8,9,1,1 ),COLORYELLOW;

STICKLINE(M3

STICKLINE(M3>=M13 AND M34

XG:=(M3>=M13 AND M34=M13 AND M34>=REF(M34,1))AND REF((M3

XG1:=(M3>=M13 AND M34>=REF(M34,1))AND REF((M3=REF(M34,1)),1);

MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;

牛线:=(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,COLORGREEN{COLORRED};

马线:=MA(牛线,6),COLORMAGENTA{COLORYELLOW};

STICKLINE(C>牛线,6,7,2,0),COLORRED{COLORGREEN},LINETHICK2;

STICKLINE(C

STICKLINE(牛线>=C AND C>=马线,6,7,2,0),COLORGREEN{COLORMAGENTA}{COLORYELLOW},LINETHICK2;

A:=MAX(MA(C,60),MA(C,120));

B:=MIN(MA(C,60),MA(C,120));

STICKLINE(C>=A,4,5,2,0),COLORRED{COLORGREEN},LINETHICK2;

STICKLINE(C<=B,4,5,2,0),COLORGREEN{COLORRED},LINETHICK2;

STICKLINE(A>=C AND C>=B,4,5,2,0),COLORGREEN{COLORMAGENTA}{COLORYELLOW},LINETHICK2;

E:=MAX(MA(C,45),MA(C,90));

F:=MIN(MA(C,45),MA(C,90));

STICKLINE(C>E,2,3,2,0),COLORRED{COLORGREEN},LINETHICK2;

STICKLINE(C

STICKLINE(E>=C AND C>=F,2,3,2,0),COLORGREEN{COLORMAGENTA}{COLORYELLOW},LINETHICK2;

J:=MAX(MA(C,30),MA(C,60));

K:=MIN(MA(C,30),MA(C,60));

STICKLINE(C>J,0,1,2,0),COLORRED{COLORGREEN},LINETHICK2;

STICKLINE(C

STICKLINE(J>=C AND C>=K,0,1,2,0),COLORGREEN{COLORMAGENTA}{COLORYELLOW},LINETHICK2;

{DRAWICON(XG OR XG1,10,13);}

全绿:=((J>=C AND C>=K) OR C=C AND C>=F) OR C=C AND C>=B) OR C<=B) AND

((牛线>=C AND C>=马线) OR C

全红:=C>J AND C>E AND C>=A AND C>牛线 AND (M3>=M13 AND M34>=REF(M34,1));

RSV:=(CLOSE - LLV(LOW,18))/(HHV(HIGH,18) - LLV(LOW,18))*100;

KK:=EMA(RSV,3);

D:=EMA(KK,3);

JJJ:=(3*KK-2*D);

KDJ1:=REF(COUNT(JJJ=3,1) AND REF(JJJ,1)<20;

KDJ2:=JJJ>REF(JJJ,1);

JJ:=MAX(MA(C,30),MA(C,60));

KKK:=MIN(MA(C,30),MA(C,60));

全绿A:=((JJ>=C AND C>=KKK) OR C=C AND C>=F) OR C=C AND C>=B) OR C<=B) AND

((牛线>=C AND C>=马线) OR C

全绿选股:IF(FILTER(KDJ1 AND KDJ2,3)AND 全绿A,10,-2),COLOR00FFFF,LINETHICK1;

DRAWICON(全绿选股=10,-1,1);

全红选股:IF(全红 AND REF(全红,1)=0,10,-2),COLORFF00FF,LINETHICK1;

DRAWICON(全红选股=10,-1,1);

(0)

相关推荐