当前位置:首页 > 教育 > 正文

文华指标公式 1

[1]在指标线上标出价位的方法

M1:=MA(CLOSE,5);

M2:=MA(CLOSE,10);

M3:=MA(CLOSE,20);

M4:=MA(CLOSE,30);

PARTLINE(M1>0,M1,COLORWHITE);

PARTLINE(M2>0,M2,COLORYELLOW);

PARTLINE(M3>0,M3,COLORGREEN);

PARTLINE(M4>0,M4,COLORMAGENTA);

Q1:=VALUEWHEN(ISLASTBAR,M1);

Q2:=VALUEWHEN(ISLASTBAR,M2);

Q3:=VALUEWHEN(ISLASTBAR,M3);

Q4:=VALUEWHEN(ISLASTBAR,M4);

DRAWNUMBER(LOW>0,Q1,Q1,0,COLORWHITE);

DRAWNUMBER(LOW>0,Q2,Q2,0,COLORYELLOW);

DRAWNUMBER(LOW>0,Q3,Q3,0,COLORGREEN);

DRAWNUMBER(LOW>0,Q4,Q4,0,COLORMAGENTA);

图示:

[2]文华红绿竹线

T:=CLOSE>OPEN;

DRAWLINE(T=1,HIGH,T=1,LOW,COLORRED);

DRAWLINE(T=0,HIGH,T=0,LOW,COLORGREEN);

DRAWSL(T=1,CLOSE,0,1,0,COLORRED);

DRAWSL(T=0,CLOSE,0,1,0,COLORGREEN);

图示:

[3]黎明

C:=CLOSE;

H:=HIGH;

L:=LOW;

O:=OPEN;

VAR1:=(HHV(HIGH,9)-LLV(LOW,9));

VAR2:=(HHV(HIGH,9)-CLOSE);

VAR3:=(CLOSE-LLV(LOW,9));

VAR4:=VAR2/VAR1*100-70 ;

VAR5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;

VAR6:=(2*C+H+L)/4;

VAR7:=SMA((VAR3/VAR1*100),3,1);

VAR8:=LLV(LOW,34);

VAR9:=SMA(VAR7,3,1)-SMA(VAR4,9,1);

VAR10:= IF(VAR9>100,VAR9-100,0);

VARA:=HHV(HIGH,34);

FXA:VAR10*2, COLORWHITE;

X:SMA(FXA,2,1),COLORYELLOW;

FXB:EMA((VAR6-VAR8)/(VARA-VAR8)*100,13),COLORCYAN;

B1:EMA(0.667*REF(FXB,1)+0.333*FXB,2), COLORRED;

FXC:SMA(VAR5,20,1),COLORBLUE;

Y:SMA(FXC,5,1),COLORCYAN;

STICKLINE(FXB-B1>0,FXB,B1,COLORCYAN,0);

STICKLINE(FXB-B1<0,FXB,B1,COLORRED,0);

图示:

[4]智慧火车轨

C:=CLOSE;

HCG:MA(C,30);

HCGU:MA(C,30),COLORYELLOW;

HCGD:HCG-MA(C,30)*0.004,COLORYELLOW;

MA1:=MA(C,5);

DRAWLINE(MA1>HCG,HCG,MA1>HCG,HCG-(HCG*0.004),COLORRED);

DRAWLINE(MA1

图示:

[5]一笑趋势

QS0:=((CLOSE - LLV(LOW,120)) / (HHV(HIGH,120) - LLV(LOW,120)));

QS1:=((QS0 / 1) * EMA(CLOSE,20));

QS:=SMA(QS1,3,1);

QD0:=((CLOSE - LLV(LOW,119)) / (HHV(HIGH,119) - LLV(LOW,119)));

QD1:=((QD0 / 1) * EMA(CLOSE,20));

QD:=SMA(QD1,5,1);

QF0:=((CLOSE - LLV(LOW,118)) / (HHV(HIGH,118) - LLV(LOW,118)));

QF1:=((QF0 / 1) * EMA(CLOSE,20));

QF:=SMA(QF1,5,1);

PX1:=((((QS + QD) + QF) / 3) + EMA(CLOSE,20));

PX2:=MA(PX1,2);

PX3:=MA(PX1,3);

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

MA1:=MA(YY,45);

C:=(PX1 - MA1);

M:=(PX2 - MA1);

O:=(PX3 - MA1);

MA2:MA(C,8);

BO:0.5,COLORRED;

DRAWLINE((C >= M),C,(C >= M),(O - 0.03),COLORRED);

STICKLINE((C >= M),M,(O - 0.03),COLORRED,0);

DRAWLINE((C <= M),C,(C <= M),(O + 0.03),COLORBLUE);

STICKLINE((C <= M),M,(O + 0.03),COLORBLUE,0);

LIFE:MA(C,13),COLORGREEN;

A:MA(LLV(C,120),3),COLORBLUE;

B:MA(HHV(C,120),3),COLORRED;

图示:

[6]三峡再现

C:=CLOSE;

H:=HIGH;

L:=LOW;

O:=OPEN;

VAR1:=(HHV(HIGH,9)-LLV(LOW,9));

VAR2:=(HHV(HIGH,9)-CLOSE);

VAR3:=(CLOSE-LLV(LOW,9));

VAR4:=VAR2/VAR1*100-70 ;

VAR5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;

VAR6:=(2*C+H+L)/4;

VAR7:=SMA((VAR3/VAR1*100),3,1);

VAR8:=LLV(LOW,34);

VAR9:=SMA(VAR7,3,1)-SMA(VAR4,9,1);

VAR10:= IF(VAR9>100,VAR9-100,0);

VARA:=HHV(HIGH,34);

FXA:=VAR10*2, COLORWHITE;

X:=SMA(FXA,2,1),COLORYELLOW;

FXB:EMA((VAR6-VAR8)/(VARA-VAR8)*100,13),COLORCYAN;

B1:EMA(0.667*REF(FXB,1)+0.333*FXB,2), COLORRED;

FXC:SMA(VAR5,20,1),COLORBLUE;

Y:SMA(FXC,5,1),COLORCYAN;

A:=SMA(FXA,2,1)-FXA;

B:=EMA(0.667*REF(FXB,1)+0.333*FXB,2)-FXB;

S:EMA(0.382*REF(FXB,2)+0.618*FXB,12),COLORYELLOW;

STICKLINE(FXB-B1>0,FXB,B1,COLORCYAN,0);

STICKLINE(FXB-B1<0,FXB,B1,COLORRED,0);

STICKLINE(FXC-SMA(FXC,5,1)>0,FXC,SMA(FXC,5,1) ,COLORBLUE,0);

STICKLINE(FXC-SMA(FXC,5,1)<0,FXC,SMA(FXC,5,1),COLORYELLOW,0);

图示:

[7]三笑姻缘

VAR1:=(HHV(HIGH,8)-LLV(LOW,8));

VAR2:=(HHV(HIGH,8)-CLOSE);

VAR3:=(CLOSE-LLV(LOW,8));

VAR4:=VAR2/VAR1*100-70 ;

VAR5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;

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

VAR7:=SMA((VAR3/VAR1*100),3,1);

VAR8:=LLV(LOW,30);

VAR9:=SMA(VAR7,3,1)-SMA(VAR4,9,1);

VAR10:= IF(VAR9>100,VAR9-100,0);

VARA:=HHV(HIGH,30);

B:=EMA((VAR6-VAR8)/(VARA-VAR8)*100,8);

B1:=EMA(B,5);

STICKLINE(B>0 && B-B1>=0,79,80,COLORGREEN,0);

STICKLINE(B>0 && B-B1<0,79,80,COLORRED,0);

STICKLINE(B>0 && B-B1>=0,49,50,COLORCYAN,0);

STICKLINE(B>0 && B-B1<0,49,50,COLORRED,0);

STICKLINE(B>0 && B-B1>=0,19,20,COLORGREEN,0);

STICKLINE(B>0 && B-B1<0,19,20,COLORRED,0);

STICKLINE(B-B1>0,B,B1,COLORCYAN,1);

STICKLINE(B-B1<0,B,B1,COLORRED,1);

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

K:SMA(RSV,M1,1);

D:SMA(K,M2,1);

J:3*K-2*D;

图示:

[8]一言九鼎

XZZ:ZIGZAG(CLOSE,10,1);

PRE:MA(LLV(CLOSE,9)*1.1,14),COLORGREEN;

SUP:MA(HHV(CLOSE,26)*0.9,14),COLORRED;

TMP:=OPEN-CLOSE; DRAWLINE(TMP>0,LOW,TMP>0,OPEN,COLORCYAN);

DRAWLINE(TMP>0,HIGH,TMP>0,CLOSE,COLORCYAN);

DRAWLINE(TMP<0,LOW,TMP<0,OPEN,COLORRED);

DRAWLINE(TMP<0,HIGH,TMP<0,CLOSE,COLORRED);

DRAWLINE(ABS(TMP)<0.1,LOW,ABS(TMP)<0.1,OPEN,COLORWHITE);

DRAWLINE(ABS(TMP)<0.1,HIGH,ABS(TMP)<0.1,CLOSE,COLORWHITE);

STICKLINE(TMP>0,OPEN,CLOSE,COLORCYAN,0);

STICKLINE(TMP<=0,OPEN,CLOSE,COLORRED,0);

图示:

[9]菲波纳奇射线及卓夫对角线

通常图表中下降及上升趋势的斜率在反弹及回落时的斜率应该是一样的力度(图中黄色线),所以我们用反弹及回落的斜率来判断反弹及回落的力度强弱(我称作“台球理论”),台球理论的细节就不谈了。

公式顶底的定义可以根据自己的意愿改变

M:=BARPOS;

HH1:=IF(HIGH>=REF(HIGH,1)&&HIGH>=REF(HIGH,2)&&HIGH>=REF(HIGH,3) &&HIGH>=REF(HIGH,4)&&HIGH>=REF(HIGH,5)&& HIGH>REFX(HIGH,1)&&HIGH>REFX(HIGH,2)&&HIGH>REFX(HIGH,3) &&HIGH>REFX(HIGH,4) &&HIGH>REFX(HIGH,5),M,0);

LL1:=IF(LOW<=REF(LOW,1)&&LOW<=REF(LOW,2)&&LOW<=REF(LOW,3) &&LOW<=REF(LOW,4)&&LOW<=REF(LOW,5)&& LOW

HH2:=VALUEWHEN(HH1>0,HH1);

LL2:=VALUEWHEN(LL1>0,LL1);

M1:=VALUEWHEN(HH2<>REF(HH2,1),M);

M2:=ISLASTBAR;

M3:=IF(M2=1,M1,M-10000);

P1:=IF(M3

P2:=IF(P1

P3:=IF(P2

P4:=IF(P3

P5:=IF(P4

P6:=IF(P5

P7:=IF(P6

P8:=IF(P7

P9:=IF(P8

P10:=IF(P9

P11:=IF(P10

P12:=IF(P11

P13:=IF(P12

P14:=IF(P13

P15:=IF(P14

P16:=IF(P15

P17:=IF(P16

P18:=IF(P17

P19:=IF(P18

P20:=IF(P19

T1:=IF(P20

MM1:=VALUEWHEN(LL2<>REF(LL2,1),M);

MM3:=IF(M2=1,MM1,M-10000);

PP1:=IF(MM3

PP2:=IF(PP1

PP3:=IF(PP2

PP4:=IF(PP3

PP5:=IF(PP4

PP6:=IF(PP5

PP7:=IF(PP6

PP8:=IF(PP7

PP9:=IF(PP8

PP10:=IF(PP9

PP11:=IF(PP10

PP12:=IF(PP11

PP13:=IF(PP12

PP14:=IF(PP13

PP15:=IF(PP14

PP16:=IF(PP15

PP17:=IF(PP16

PP18:=IF(PP17

PP19:=IF(PP18

PP20:=IF(PP19

T2:=IF(PP20

H1:=VALUEWHEN(HH2<>REF(HH2,1),HIGH);

H3:=IF(M2=1,H1,M-10000);

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=H&&K4>=L,K4);

XX:=VALUEWHEN(KK<=H&&KK>=L,KK);

POLYLINE(K0<=H&&K0>=L,X0,COLORYELLOW);

POLYLINE(K1<=H&&K1>=L,X1,COLORGREEN);

POLYLINE(K2<=H&&K1>=L,X2,COLORMAGENTA);

POLYLINE(K3<=H&&K1>=L,X3,COLORRED);

POLYLINE(K4<=H&&K1>=L,X4,COLORLIGHTBLUE);

POLYLINE(KK<=H&&KK>=L,XX,COLORYELLOW);

图示:

[10]两点趋势线

M:=BARPOS;

H:=HIGH;

L:=LOW;

H1:=IF(H>=REF(H,1)&&H>=REF(H,2)&&H>=REF(H,3)&&H>=REF(H,4)&&H>=REF(H,5)&& H>REFX(H,1)&&H>REFX(H,2)&&H>REFX(H,3)&&H>REFX(H,4)&&H>REFX(H,5),HIGH,0);

L1:=IF(L<=REF(L,1)&&L<=REF(L,2)&&L<=REF(L,3)&&L<=REF(L,4)&&L<=REF(L,5)&& L

H2:=VALUEWHEN(H1>0,H1);

L2:=VALUEWHEN(L1>0,L1);

H3:=IF(H2<>REF(H2,1),H2-L2,0);

L3:=IF(L2<>REF(L2,1),H2-L2,0);

HH:=IF(H3>0,REFX(M,H3),0);

LL:=IF(L3>0,REFX(M,L3),0);

P1:=M=REF(HH,1);

P2:=M=REF(HH,2);

P3:=M=REF(HH,3);

P4:=M=REF(HH,4);

P5:=M=REF(HH,5);

P6:=M=REF(HH,6);

P7:=M=REF(HH,7);

P8:=M=REF(HH,8);

P9:=M=REF(HH,9);

P10:=M=REF(HH,10);

P11:=M=REF(HH,11);

P12:=M=REF(HH,12);

P13:=M=REF(HH,13);

P14:=M=REF(HH,14);

P15:=M=REF(HH,15);

P16:=M=REF(HH,16);

P17:=M=REF(HH,17);

P18:=M=REF(HH,18);

P19:=M=REF(HH,19);

P20:=M=REF(HH,20);

P21:=M=REF(HH,21);

P22:=M=REF(HH,22);

P23:=M=REF(HH,23);

P24:=M=REF(HH,24);

P25:=M=REF(HH,25);

P26:=M=REF(HH,26);

P27:=M=REF(HH,27);

P28:=M=REF(HH,28);

P29:=M=REF(HH,29);

P30:=M=REF(HH,30);

P31:=M=REF(HH,31);

P32:=M=REF(HH,32);

P33:=M=REF(HH,33);

P34:=M=REF(HH,34);

P35:=M=REF(HH,35);

P36:=M=REF(HH,36);

P37:=M=REF(HH,37);

P38:=M=REF(HH,38);

P39:=M=REF(HH,39);

P40:=M=REF(HH,40);

P41:=M=REF(HH,41);

P42:=M=REF(HH,42);

P43:=M=REF(HH,43);

P44:=M=REF(HH,44);

P45:=M=REF(HH,45);

P46:=M=REF(HH,46);

P47:=M=REF(HH,47);

P48:=M=REF(HH,48);

P49:=M=REF(HH,49);

P50:=M=REF(HH,50);

P51:=M=REF(HH,51);

D1:=M=REF(LL,1);

D2:=M=REF(LL,2);

D3:=M=REF(LL,3);

D4:=M=REF(LL,4);

D5:=M=REF(LL,5);

D6:=M=REF(LL,6);

D7:=M=REF(LL,7);

D8:=M=REF(LL,8);

D9:=M=REF(LL,9);

D10:=M=REF(LL,10);

D11:=M=REF(LL,11);

D12:=M=REF(LL,12);

D13:=M=REF(LL,13);

D14:=M=REF(LL,14);

D15:=M=REF(LL,15);

D16:=M=REF(LL,16);

D17:=M=REF(LL,17);

D18:=M=REF(LL,18);

D19:=M=REF(LL,19);

D20:=M=REF(LL,20);

D21:=M=REF(LL,21);

D22:=M=REF(LL,22);

D23:=M=REF(LL,23);

D24:=M=REF(LL,24);

D25:=M=REF(LL,25);

D26:=M=REF(LL,26);

D27:=M=REF(LL,27);

D28:=M=REF(LL,28);

D29:=M=REF(LL,29);

D30:=M=REF(LL,30);

D31:=M=REF(LL,31);

D32:=M=REF(LL,32);

D33:=M=REF(LL,33);

D34:=M=REF(LL,34);

D35:=M=REF(LL,35);

D36:=M=REF(LL,36);

D37:=M=REF(LL,37);

D38:=M=REF(LL,38);

D39:=M=REF(LL,39);

D40:=M=REF(LL,40);

D41:=M=REF(LL,41);

D42:=M=REF(LL,42);

D43:=M=REF(LL,43);

D44:=M=REF(LL,44);

D45:=M=REF(LL,45);

D46:=M=REF(LL,46);

D47:=M=REF(LL,47);

D48:=M=REF(LL,48);

D49:=M=REF(LL,49);

D50:=M=REF(LL,50);

D51:=M=REF(LL,51);

PP:=P1+P2+P3+P4+P5+P6+P7+P8+P9+P10+P11+P12+P13+P14+P15+P16+P17+P18+P19+P20+P21+P22+P23+P24+P25+P26+P27+P28+P29+P30+P31+P32+P33+P34+P35+P36+P37+P38+P39+P40+P41+P42+P43+P44+P45+P46+P47+P48+P49+P50+P51;

DD:=D1+D2+D3+D4+D5+D6+D7+D8+D9+D10+D11+D12+D13+D14+D15+D16+D17+D18+D19+D20+D21+D22+D23+D24+D25+D26+D27+D28+D29+D30+D31+D32+D33+D34+D35+D36+D37+D38+D39+D40+D41+D42+D43+D44+D45+D46+D47+D48+D49+D50+D51;

N:=BARSLAST(H1);

N1:=BARSLAST(L1);

F:=IF(H1>0,(H1-REF(H1,N))/N,0);

F1:=IF(L1>0,(L1-REF(L1,N1))/N1,0);

DRAWSL(H1>0&&H2

DRAWSL(L1>0&&L2>REF(L2,1),L2,F1,1,2,COLORGREEN);

POLYLINE(H1>0,H2,COLORMAGENTA);

POLYLINE(L1>0,L2,COLORGREEN);

图示:

你可能想看:

有话要说...

取消
扫码支持 支付码